pic-sycl.cc uses C99
jeffhammond opened this issue · 1 comments
jeffhammond commented
This is probably wrong...
pic-sycl.cc:
"pic-sycl.cc", line 129: error: a type qualifier is not allowed
void finish_distribution(const uint64_t n, particle_t p[const n])
^
"pic-sycl.cc", line 129: error: a parameter is not allowed
void finish_distribution(const uint64_t n, particle_t p[const n])
^
"pic-sycl.cc", line 526: error: class "hipsycl::sycl::cpu_selector" has no member "select_device"
d = sycl::cpu_selector{}.select_device();
^
"pic-sycl.cc", line 528: error: class "hipsycl::sycl::gpu_selector" has no member "select_device"
d = sycl::gpu_selector{}.select_device();
^
"pic-sycl.cc", line 530: error: class "hipsycl::sycl::host_selector" has no member "select_device"
d = sycl::host_selector{}.select_device();
^
"pic-sycl.cc", line 533: error: class "hipsycl::sycl::default_selector" has no member "select_device"
d = sycl::default_selector{}.select_device();
^
6 errors detected in the compilation of "pic-sycl.cc".
keryell commented
In
void finish_distribution(const uint64_t n, particle_t p[const n])
you could just use particle_t p[]
or if you are courageous sycl::span
from SYCL 2020.
d = sycl::default_selector{}.select_device();
is the old weird Java-like factory from SYCL 1.2 which has been removed.
Now you can just use
d = sycl::device { sycl::default_selector_v };
or probably in the case of the default selector which select the default device, just:
d = {};
For more details: https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:device-selector