Skip to content

Commit

Permalink
Merge pull request #748 from henryiii/add_test_mactypes
Browse files Browse the repository at this point in the history
Support for set_arg on macOS
  • Loading branch information
jszuppe committed Feb 10, 2019
2 parents 827371a + 4ab0939 commit 8c7412f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/boost/compute/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <boost/compute/device.hpp>
#include <boost/compute/event.hpp>
#include <boost/compute/kernel.hpp>
#include <boost/compute/types.hpp>
#include <boost/compute/memory_object.hpp>
#include <boost/compute/platform.hpp>
#include <boost/compute/program.hpp>
Expand Down
16 changes: 16 additions & 0 deletions test/test_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <boost/compute/buffer.hpp>
#include <boost/compute/kernel.hpp>
#include <boost/compute/types.hpp>
#include <boost/compute/system.hpp>
#include <boost/compute/utility/source.hpp>

Expand Down Expand Up @@ -113,6 +114,21 @@ BOOST_AUTO_TEST_CASE(kernel_set_args)
}
#endif // BOOST_COMPUTE_NO_VARIADIC_TEMPLATES

// Originally failed to compile on macOS (several types are resolved differently)
BOOST_AUTO_TEST_CASE(kernel_set_args_mac)
{
compute::kernel k = compute::kernel::create_with_source(
"__kernel void test(unsigned int a, unsigned long b) { }", "test", context
);

unsigned int a;
unsigned long b;

k.set_arg(0, a);
k.set_arg(1, b);
}


#ifdef BOOST_COMPUTE_CL_VERSION_1_2
BOOST_AUTO_TEST_CASE(get_arg_info)
{
Expand Down

0 comments on commit 8c7412f

Please sign in to comment.