Skip to content

Commit 79e6996

Browse files
author
Hugh Delaney
committed
Exclude windows from test
1 parent 2a828f4 commit 79e6996

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

sycl/test-e2e/DeviceLib/cmath_test.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ namespace s = sycl;
2121
constexpr s::access::mode sycl_read = s::access::mode::read;
2222
constexpr s::access::mode sycl_write = s::access::mode::write;
2323

24-
#define TEST_NUM 62
24+
#define TEST_NUM 61
2525

26-
float ref[TEST_NUM] = {1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0.5, 0, 0, 1,
27-
0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 2, 0, 1, 2, 5, 0,
28-
0, 0, 0, 0.5, 0.5, NAN, NAN, 2, 0, 0, 0, 0, 0, 0, 0, 0,
29-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
26+
float ref[TEST_NUM] = {1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0.5, 0, 0, 1, 0,
27+
2, 0, 0, 0, 0, 0, 1, 0, 1, 2, 0, 1, 2, 5, 0, 0,
28+
0, 0, 0.5, 0.5, NAN, NAN, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
29+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
3030

3131
float refIptr = 1;
3232

@@ -56,7 +56,6 @@ template <class T> void device_cmath_test_1(s::queue &deviceQueue) {
5656
float subnormal;
5757
*((uint32_t *)&subnormal) = 0x7FFFFF;
5858

59-
res_access[i++] = std::fabs(-1.0f);
6059
res_access[i++] = std::cos(0.0f);
6160
res_access[i++] = std::sin(0.0f);
6261
res_access[i++] = std::round(1.0f);
@@ -144,15 +143,15 @@ template <class T> void device_cmath_test_1(s::queue &deviceQueue) {
144143
assert(quo == 0);
145144
}
146145

147-
// MSVC implements std::ldexp<float> and std::frexp<float> by invoking the
148-
// 'double' version of corresponding C math functions(ldexp and frexp). Those
149-
// 2 functions can only work on Windows with fp64 extension support from
150-
// underlying device.
146+
// MSVC implements std::ldexp<float>, std::fabs<float> and std::frexp<float> by
147+
// invoking the 'double' version of corresponding C math functions(ldexp, fabs
148+
// and frexp). Those functions can only work on Windows with fp64 extension
149+
// support from underlying device.
151150
#ifndef _WIN32
152151
template <class T> void device_cmath_test_2(s::queue &deviceQueue) {
153152
s::range<1> numOfItems{2};
154153
T result[2] = {-1};
155-
T ref[2] = {0, 2};
154+
T ref[3] = {0, 2, 1};
156155
// Variable exponent is an integer value to store the exponent in frexp
157156
// function
158157
int exponent = -1;
@@ -167,6 +166,7 @@ template <class T> void device_cmath_test_2(s::queue &deviceQueue) {
167166
int i = 0;
168167
res_access[i++] = std::frexp(0.0f, &exp_access[0]);
169168
res_access[i++] = std::ldexp(1.0f, 1);
169+
res_access[i++] = std::fabs(-1.0f);
170170
});
171171
});
172172
}

0 commit comments

Comments
 (0)