File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include < CL/sycl.hpp>
2
+
3
+ int main () {
4
+ cl::sycl::range<1 > ndRng (1 );
5
+ int32_t kernelResult;
6
+ cl::sycl::queue testQueue;
7
+ {
8
+ cl::sycl::buffer<int32_t , 1 > buffer (&kernelResult, ndRng);
9
+ testQueue.submit ([&](cl::sycl::handler &h) {
10
+ auto resultPtr = buffer.template get_access <cl::sycl::access::mode::write>(h);
11
+ h.single_task <class kernel >([=]() {
12
+ float inputData_0 (0.1 );
13
+ float inputData_1 (0.5 );
14
+ resultPtr[0 ] = cl::sycl::isordered (inputData_0,inputData_1);
15
+ });
16
+ });
17
+ }
18
+ // Should be 1 according to spec since it's a scalar type not a vector
19
+ std::cout << " Kernel result: " << std::to_string (kernelResult) << std::endl;
20
+ assert (kernelResult == 1 && " Incorrect result" );
21
+
22
+ return 0 ;
23
+ }
You can’t perform that action at this time.
0 commit comments