Skip to content

Commit

Permalink
mxp: Clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
cmpfeil committed Jan 30, 2025
1 parent 855e4d5 commit 99d6660
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions tests/test_mxp_truncated_mantissa_t.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,11 @@ TEST(mxp_truncated_mantissa, error_bounds_complex_float)

std::srand(time(nullptr));
for (int j = 0; j < x.size(); ++j)
x(j) = complex32_t{1.f + 1.f * std::rand() /
std::numeric_limits<decltype(std::rand())>::max(),
1.f + 1.f * std::rand() /
std::numeric_limits<decltype(std::rand())>::max()};
x(j) =
complex32_t{1.f + 1.f * std::rand() /
std::numeric_limits<decltype(std::rand())>::max(),
1.f + 1.f * std::rand() /
std::numeric_limits<decltype(std::rand())>::max()};

Loop<0, 23, run_test_error_bounds<gt::space::host>>::Run(x, y);
}
Expand All @@ -412,10 +413,10 @@ TEST(mxp_truncated_mantissa, error_bounds_complex_double)

std::srand(time(nullptr));
for (int j = 0; j < x.size(); ++j)
x(j) = complex64_t{1. + 1. * std::rand() /
std::numeric_limits<decltype(std::rand())>::max(),
1. + 1. * std::rand() /
std::numeric_limits<decltype(std::rand())>::max()};
x(j) = complex64_t{
1. + 1. * std::rand() / std::numeric_limits<decltype(std::rand())>::max(),
1. +
1. * std::rand() / std::numeric_limits<decltype(std::rand())>::max()};

Loop<0, 52, run_test_error_bounds<gt::space::host>>::Run(x, y);
}
Expand Down Expand Up @@ -631,7 +632,7 @@ TEST(mxp_truncated_mantissa, device_error_bounds_float)
std::srand(time(nullptr));
for (int j = 0; j < h_x.size(); ++j)
h_x(j) = 1.f + 1.f * std::rand() /
std::numeric_limits<decltype(std::rand())>::max();
std::numeric_limits<decltype(std::rand())>::max();

gt::gtensor_device<float, 1> x(n);
gt::gtensor_device<float, 1> y(n);
Expand Down Expand Up @@ -668,10 +669,11 @@ TEST(mxp_truncated_mantissa, device_error_bounds_complex_float)

std::srand(time(nullptr));
for (int j = 0; j < h_x.size(); ++j)
h_x(j) = complex32_t{1.f + 1.f * std::rand() /
std::numeric_limits<decltype(std::rand())>::max(),
1.f + 1.f * std::rand() /
std::numeric_limits<decltype(std::rand())>::max()};
h_x(j) =
complex32_t{1.f + 1.f * std::rand() /
std::numeric_limits<decltype(std::rand())>::max(),
1.f + 1.f * std::rand() /
std::numeric_limits<decltype(std::rand())>::max()};

gt::gtensor_device<complex32_t, 1> x(n);
gt::gtensor_device<complex32_t, 1> y(n);
Expand All @@ -690,10 +692,10 @@ TEST(mxp_truncated_mantissa, device_error_bounds_complex_double)

std::srand(time(nullptr));
for (int j = 0; j < h_x.size(); ++j)
h_x(j) = complex64_t{1. + 1. * std::rand() /
std::numeric_limits<decltype(std::rand())>::max(),
1. + 1. * std::rand() /
std::numeric_limits<decltype(std::rand())>::max()};
h_x(j) = complex64_t{
1. + 1. * std::rand() / std::numeric_limits<decltype(std::rand())>::max(),
1. +
1. * std::rand() / std::numeric_limits<decltype(std::rand())>::max()};

gt::gtensor_device<complex64_t, 1> x(n);
gt::gtensor_device<complex64_t, 1> y(n);
Expand Down

0 comments on commit 99d6660

Please sign in to comment.