boostorg / boostorg/compute

Add __stdcall to "nullary_kernel" in test_command_queue.cpp

Open
#842 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.7k
Forks
340
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/boostorg/compute/issues/36).
Please help to fix.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.