| 20 | namespace compute = boost::compute; |
| 21 | |
| 22 | BOOST_AUTO_TEST_CASE(construct_from_cl_context) |
| 23 | { |
| 24 | cl_device_id id = device.id(); |
| 25 | |
| 26 | // create cl_context |
| 27 | cl_context ctx = clCreateContext(0, 1, &id, 0, 0, 0); |
| 28 | BOOST_VERIFY(ctx); |
| 29 | |
| 30 | // create boost::compute::context |
| 31 | boost::compute::context context(ctx); |
| 32 | |
| 33 | // check context |
| 34 | BOOST_CHECK(cl_context(context) == ctx); |
| 35 | |
| 36 | // cleanup cl_context |
| 37 | clReleaseContext(ctx); |
| 38 | } |
| 39 | |
| 40 | #ifndef BOOST_COMPUTE_NO_RVALUE_REFERENCES |
| 41 | BOOST_AUTO_TEST_CASE(move_constructor) |
nothing calls this directly
no test coverage detected