/// Destroys the context object. ~context() { if(m_context){ BOOST_COMPUTE_ASSERT_CL_SUCCESS( clReleaseContext(m_context) ); } }
~image_sampler() { if(m_sampler){ BOOST_COMPUTE_ASSERT_CL_SUCCESS( clReleaseSampler(m_sampler) ); } }
/// Blocks until all of the events in the wait-list have completed. /// /// Does nothing if the wait-list is empty. void wait() { if(!empty()){ BOOST_COMPUTE_ASSERT_CL_SUCCESS( clWaitForEvents(size(), get_event_ptr()) ); } }
/// Destroys the command queue. /// /// \see_opencl_ref{clReleaseCommandQueue} ~command_queue() { if(m_queue){ BOOST_COMPUTE_ASSERT_CL_SUCCESS( clReleaseCommandQueue(m_queue) ); } }