Skip to content

Commit 8c7412f

Browse files
authored
Merge pull request #748 from henryiii/add_test_mactypes
Support for set_arg on macOS
2 parents 827371a + 4ab0939 commit 8c7412f

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

include/boost/compute/core.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <boost/compute/device.hpp>
2323
#include <boost/compute/event.hpp>
2424
#include <boost/compute/kernel.hpp>
25+
#include <boost/compute/types.hpp>
2526
#include <boost/compute/memory_object.hpp>
2627
#include <boost/compute/platform.hpp>
2728
#include <boost/compute/program.hpp>

test/test_kernel.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include <boost/compute/buffer.hpp>
1515
#include <boost/compute/kernel.hpp>
16+
#include <boost/compute/types.hpp>
1617
#include <boost/compute/system.hpp>
1718
#include <boost/compute/utility/source.hpp>
1819

@@ -113,6 +114,21 @@ BOOST_AUTO_TEST_CASE(kernel_set_args)
113114
}
114115
#endif // BOOST_COMPUTE_NO_VARIADIC_TEMPLATES
115116

117+
// Originally failed to compile on macOS (several types are resolved differently)
118+
BOOST_AUTO_TEST_CASE(kernel_set_args_mac)
119+
{
120+
compute::kernel k = compute::kernel::create_with_source(
121+
"__kernel void test(unsigned int a, unsigned long b) { }", "test", context
122+
);
123+
124+
unsigned int a;
125+
unsigned long b;
126+
127+
k.set_arg(0, a);
128+
k.set_arg(1, b);
129+
}
130+
131+
116132
#ifdef BOOST_COMPUTE_CL_VERSION_1_2
117133
BOOST_AUTO_TEST_CASE(get_arg_info)
118134
{

0 commit comments

Comments
 (0)