コード例 #1
0
ファイル: context.hpp プロジェクト: skozilla/compute
 /// Destroys the context object.
 ~context()
 {
     if(m_context){
         BOOST_COMPUTE_ASSERT_CL_SUCCESS(
             clReleaseContext(m_context)
         );
     }
 }
コード例 #2
0
ファイル: image_sampler.hpp プロジェクト: jamboree/compute
 ~image_sampler()
 {
     if(m_sampler){
         BOOST_COMPUTE_ASSERT_CL_SUCCESS(
             clReleaseSampler(m_sampler)
         );
     }
 }
コード例 #3
0
ファイル: wait_list.hpp プロジェクト: EdKeith/compute
 /// 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
ファイル: command_queue.hpp プロジェクト: ariosx/compute
 /// Destroys the command queue.
 ///
 /// \see_opencl_ref{clReleaseCommandQueue}
 ~command_queue()
 {
     if(m_queue){
         BOOST_COMPUTE_ASSERT_CL_SUCCESS(
             clReleaseCommandQueue(m_queue)
         );
     }
 }