Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 9e2394e

Browse files
committed
fixed queue constructor mistake.
Signed-off-by: JackAKirk <[email protected]>
1 parent ab479c8 commit 9e2394e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

SYCL/DeviceLib/built-ins/ext_native_math_fp16.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414

1515
int main() {
1616

17+
sycl::queue q;
18+
1719
if (!q.get_device().has(sycl::aspect::fp16)) {
1820
std::cout << "skipping fp16 tests: requires fp16 device aspect."
1921
<< std::endl;
2022
return 0;
2123
}
2224

23-
sycl::queue q;
24-
25-
const half tv[16] = {-2.0, -1.5, -1.0, 0.0, 2.0, 1.5, 1.0, 0.0,
25+
const sycl::half tv[16] = {-2.0, -1.5, -1.0, 0.0, 2.0, 1.5, 1.0, 0.0,
2626
-1.7, 1.7, -1.2, 1.2, -3.0, 3.0, -10.0, 10.0};
27-
const half tl[16] = {-0.97, -0.91, -0.77, -0.1, 0.95, 0.89, 0.75, -0.1,
27+
const sycl::half tl[16] = {-0.97, -0.91, -0.77, -0.1, 0.95, 0.89, 0.75, -0.1,
2828
-0.94, 0.92, -0.84, 0.82, -1.0, 0.98, -1.10, 0.98};
29-
const half tu[16] = {-0.95, -0.89, -0.75, 0.1, 0.97, 0.91, 0.77, 0.1,
29+
const sycl::half tu[16] = {-0.95, -0.89, -0.75, 0.1, 0.97, 0.91, 0.77, 0.1,
3030
-0.92, 0.94, -0.82, 0.84, -0.98, 1.00, -0.98, 1.10};
3131

3232
native_tanh_tester<sycl::half>(q, tv[0], tl[0], tu[0]);
@@ -56,11 +56,11 @@ native_tanh_tester<sycl::half16>(
5656
{tu[0], tu[1], tu[2], tu[3], tu[4], tu[5], tu[6], tu[7], tu[8], tu[9],
5757
tu[10], tu[11], tu[12], tu[13], tu[14], tu[15]});
5858

59-
const half ev[16] = {-2.0, -1.5, -1.0, 0.0, 2.0, 1.5, 1.0, 0.0,
59+
const sycl::half ev[16] = {-2.0, -1.5, -1.0, 0.0, 2.0, 1.5, 1.0, 0.0,
6060
-2.0, -1.5, -1.0, 0.0, 2.0, 1.5, 1.0, 0.0};
61-
const half el[16] = {0.1, 0.34, 0.4, -0.9, 3.9, 2.7, 1.9, -0.9,
61+
const sycl::half el[16] = {0.1, 0.34, 0.4, -0.9, 3.9, 2.7, 1.9, -0.9,
6262
0.1, 0.34, 0.4, -0.9, 3.9, 2.7, 1.9, -0.9};
63-
const half eu[16] = {0.3, 0.36, 0.6, 1.1, 4.1, 2.9, 2.1, 1.1,
63+
const sycl::half eu[16] = {0.3, 0.36, 0.6, 1.1, 4.1, 2.9, 2.1, 1.1,
6464
0.3, 0.36, 0.6, 1.1, 4.1, 2.9, 2.1, 1.1};
6565

6666
native_exp2_tester<sycl::half>(q, ev[0], el[0], eu[0]);

0 commit comments

Comments
 (0)