Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
FMarno committed Apr 20, 2023
1 parent 3840668 commit 9b028cc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/oneapi/mkl/dft/detail/commit_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class dft_values;
template <precision prec, domain dom>
class commit_impl {
public:
commit_impl(sycl::queue queue, mkl::backend backend) : backend_(backend), queue_(queue) {}
commit_impl(sycl::queue queue, mkl::backend backend) : queue_(queue), backend_(backend) {}

// rule of three
commit_impl(const commit_impl& other) = delete;
Expand Down
6 changes: 4 additions & 2 deletions tests/unit_tests/dft/include/compute_inplace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ int DFT_Test<precision, domain>::test_in_place_buffer() {
}

// account for scaling that occurs during DFT
std::for_each(input.begin(), input.end(), [this](auto& x) { x *= forward_elements; });
std::for_each(input.begin(), input.end(),
[this](auto& x) { x *= static_cast<PrecisionType>(forward_elements); });
if constexpr (domain == oneapi::mkl::dft::domain::REAL) {
for (std::size_t j = 0; j < real_first_dims; j++) {
EXPECT_TRUE(check_equal_vector(
Expand Down Expand Up @@ -270,7 +271,8 @@ int DFT_Test<precision, domain>::test_in_place_USM() {
return test_skipped;
}

std::for_each(input.begin(), input.end(), [this](auto& x) { x *= forward_elements; });
std::for_each(input.begin(), input.end(),
[this](auto& x) { x *= static_cast<PrecisionType>(forward_elements); });

if constexpr (domain == oneapi::mkl::dft::domain::REAL) {
for (std::size_t j = 0; j < real_first_dims; j++) {
Expand Down
6 changes: 4 additions & 2 deletions tests/unit_tests/dft/include/compute_out_of_place.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ int DFT_Test<precision, domain>::test_out_of_place_buffer() {
}

// account for scaling that occurs during DFT
std::for_each(input.begin(), input.end(), [this](auto &x) { x *= forward_elements; });
std::for_each(input.begin(), input.end(),
[this](auto &x) { x *= static_cast<PrecisionType>(forward_elements); });

EXPECT_TRUE(check_equal_vector(fwd_data.data(), input.data(), input.size(), abs_error_margin,
rel_error_margin, std::cout));
Expand Down Expand Up @@ -192,7 +193,8 @@ int DFT_Test<precision, domain>::test_out_of_place_USM() {
}

// account for scaling that occurs during DFT
std::for_each(input.begin(), input.end(), [this](auto &x) { x *= forward_elements; });
std::for_each(input.begin(), input.end(),
[this](auto &x) { x *= static_cast<PrecisionType>(forward_elements); });

EXPECT_TRUE(check_equal_vector(fwd.data(), input.data(), input.size(), abs_error_margin,
rel_error_margin, std::cout));
Expand Down
4 changes: 2 additions & 2 deletions tests/unit_tests/dft/source/descriptor_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ inline void recommit_values(sycl::queue& sycl_queue) {
std::make_pair(config_param::TRANSPOSE, bool{ false }),
std::make_pair(config_param::PACKED_FORMAT, config_value::CCE_FORMAT) },
{ std::make_pair(config_param::LENGTHS, std::int64_t{ 10 }),
std::make_pair(config_param::FORWARD_SCALE, PrecisionType( 1.2 )),
std::make_pair(config_param::BACKWARD_SCALE, PrecisionType( 3.4 )) }
std::make_pair(config_param::FORWARD_SCALE, PrecisionType(1.2)),
std::make_pair(config_param::BACKWARD_SCALE, PrecisionType(3.4)) }
};

for (std::size_t i = 0; i < argument_groups.size(); i += 1) {
Expand Down

0 comments on commit 9b028cc

Please sign in to comment.