Skip to content

Commit

Permalink
Add OpenCL version checks to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kylelutz committed Nov 4, 2014
1 parent 4c0c7bd commit 85eb6b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/test_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ callback(cl_event event, cl_int status, void *user_data)

BOOST_AUTO_TEST_CASE(event_callback)
{
REQUIRES_OPENCL_VERSION(1,2);
REQUIRES_OPENCL_VERSION(1, 1);

BOOST_CHECK_EQUAL(callback_invoked, false);
{
Expand All @@ -52,6 +52,8 @@ BOOST_AUTO_TEST_CASE(event_callback)
#if !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS)
BOOST_AUTO_TEST_CASE(lambda_callback)
{
REQUIRES_OPENCL_VERSION(1, 1);

bool lambda_invoked = false;
{
boost::compute::event marker = queue.enqueue_marker();
Expand All @@ -73,6 +75,8 @@ event_promise_fulfiller_callback(cl_event event, cl_int status, void *user_data)

BOOST_AUTO_TEST_CASE(event_to_std_future)
{
REQUIRES_OPENCL_VERSION(1, 1);

std::vector<float> vector(1000, 3.14f);
boost::compute::buffer buffer(context, 1000 * sizeof(float));
auto event = queue.enqueue_write_buffer_async(
Expand Down
2 changes: 2 additions & 0 deletions test/test_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ BOOST_AUTO_TEST_CASE(kernel_set_args)
#ifdef CL_VERSION_1_2
BOOST_AUTO_TEST_CASE(get_arg_info)
{
REQUIRES_OPENCL_VERSION(1, 2);

const char source[] = BOOST_COMPUTE_STRINGIZE_SOURCE(
__kernel void sum_kernel(__global const int *input,
const uint size,
Expand Down

0 comments on commit 85eb6b2

Please sign in to comment.