示例#1
0
 /// Destroys the context object.
 ~context()
 {
     if(m_context){
         BOOST_COMPUTE_ASSERT_CL_SUCCESS(
             clReleaseContext(m_context)
         );
     }
 }
示例#2
0
 ~image_sampler()
 {
     if(m_sampler){
         BOOST_COMPUTE_ASSERT_CL_SUCCESS(
             clReleaseSampler(m_sampler)
         );
     }
 }
示例#3
0
 /// 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())
         );
     }
 }
示例#4
0
 /// Destroys the command queue.
 ///
 /// \see_opencl_ref{clReleaseCommandQueue}
 ~command_queue()
 {
     if(m_queue){
         BOOST_COMPUTE_ASSERT_CL_SUCCESS(
             clReleaseCommandQueue(m_queue)
         );
     }
 }