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

Add __stdcall to "nullary_kernel" in test_command_queue.cpp #842

Open
yuxianch opened this issue Sep 24, 2019 · 0 comments
Open

Add __stdcall to "nullary_kernel" in test_command_queue.cpp #842

yuxianch opened this issue Sep 24, 2019 · 0 comments

Comments

@yuxianch
Copy link

In windows, there is an error when compiling test_command_queue.cpp for mismatch convension.

test_command_queue.cpp:232:11: error: no matching member function for call to 'enqueue_native_kernel'
queue.enqueue_native_kernel(&nullary_kernel);
~~~~~~^~~~~~~~~~~~~~~~~~~~~
../../..\boost/compute/command_queue.hpp:1534:11: note: candidate function not viable: no known conversion from 'void ()()' to 'void ()() attribute((stdcall))' for 1st argument
event enqueue_native_kernel(void (BOOST_COMPUTE_CL_CALLBACK *user_func)(void),
^
../../..\boost/compute/command_queue.hpp:1502:11: note: candidate function not viable: requires at least 6 arguments, but 1 was provided
event enqueue_native_kernel(void (BOOST_COMPUTE_CL_CALLBACK *user_func)(void *),
^

After changing code in test_command_queue.cpp from "static void nullary_kernel()" to "static __stdcall void nullary_kernel()", above error became gone.
This issue is similar with #36.
Please help to fix.

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

1 participant