|
1 |
| -// REQUIRES: opencl |
2 |
| - |
3 | 1 | // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -L %opencl_libs_dir -lOpenCL
|
4 | 2 | // RUN: env SYCL_DEVICE_TYPE=HOST %t.out
|
5 | 3 | // RUN: %CPU_RUN_PLACEHOLDER %t.out
|
6 | 4 | // RUN: %GPU_RUN_PLACEHOLDER %t.out
|
7 |
| -// RUN: %ACC_RUN_PLACEHOLDER %t.out |
8 | 5 |
|
9 | 6 | //==--------------- sampler.cpp - SYCL sampler basic test ------------------==//
|
10 | 7 | //
|
@@ -50,37 +47,10 @@ int main() {
|
50 | 47 | A.get_filtering_mode() == B.get_filtering_mode());
|
51 | 48 |
|
52 | 49 | // Check assignment operator
|
53 |
| - if (!Queue.is_host()) { |
54 |
| - // OpenCL sampler |
55 |
| - cl_int Err = CL_SUCCESS; |
56 |
| -#ifdef CL_VERSION_2_0 |
57 |
| - const cl_sampler_properties sprops[] = { |
58 |
| - CL_SAMPLER_NORMALIZED_COORDS, |
59 |
| - static_cast<cl_sampler_properties>(true), |
60 |
| - CL_SAMPLER_ADDRESSING_MODE, |
61 |
| - static_cast<cl_sampler_properties>(CL_ADDRESS_REPEAT), |
62 |
| - CL_SAMPLER_FILTER_MODE, |
63 |
| - static_cast<cl_sampler_properties>(CL_FILTER_LINEAR), |
64 |
| - 0}; |
65 |
| - cl_sampler ClSampler = |
66 |
| - clCreateSamplerWithProperties(Queue.get_context().get(), sprops, &Err); |
67 |
| -#else |
68 |
| - cl_sampler ClSampler = |
69 |
| - clCreateSampler(Queue.get_context().get(), true, CL_ADDRESS_REPEAT, |
70 |
| - CL_FILTER_LINEAR, &Err); |
71 |
| -#endif |
72 |
| - // If device doesn't support sampler - skip it |
73 |
| - if (Err == CL_INVALID_OPERATION) |
74 |
| - return 0; |
| 50 | + B = sycl::sampler(sycl::coordinate_normalization_mode::normalized, |
| 51 | + sycl::addressing_mode::repeat, |
| 52 | + sycl::filtering_mode::linear); |
75 | 53 |
|
76 |
| - CHECK_OCL_CODE(Err); |
77 |
| - B = sycl::sampler(ClSampler, Queue.get_context()); |
78 |
| - } else { |
79 |
| - // Host sampler |
80 |
| - B = sycl::sampler(sycl::coordinate_normalization_mode::normalized, |
81 |
| - sycl::addressing_mode::repeat, |
82 |
| - sycl::filtering_mode::linear); |
83 |
| - } |
84 | 54 | assert(B.get_addressing_mode() == sycl::addressing_mode::repeat);
|
85 | 55 | assert(B.get_coordinate_normalization_mode() ==
|
86 | 56 | sycl::coordinate_normalization_mode::normalized);
|
|
0 commit comments