Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pic-sycl.cc uses C99 #601

Open
jeffhammond opened this issue Jan 5, 2022 · 1 comment
Open

pic-sycl.cc uses C99 #601

jeffhammond opened this issue Jan 5, 2022 · 1 comment

Comments

@jeffhammond
Copy link
Member

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
Copy link

keryell commented Jan 6, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants