DPC++ Runtime
Runtime libraries for oneAPI DPC++
ReleaseGuard< T > Class Template Reference

RAII object that calls the reference count release function on the held PI object on destruction. More...

Public Member Functions

 ReleaseGuard ()=delete
 
 ReleaseGuard (T Obj)
 Obj can be nullptr. More...
 
 ReleaseGuard (ReleaseGuard &&Other) noexcept
 
 ReleaseGuard (const ReleaseGuard &)=delete
 
 ~ReleaseGuard ()
 Calls the related PI object release function if the object held is not nullptr or if dismiss has not been called. More...
 
ReleaseGuardoperator= (const ReleaseGuard &)=delete
 
ReleaseGuardoperator= (ReleaseGuard &&Other)
 
void dismiss ()
 End the guard and do not release the reference count of the held PI object. More...
 
 ReleaseGuard ()=delete
 
 ReleaseGuard (T Obj)
 Obj can be nullptr. More...
 
 ReleaseGuard (ReleaseGuard &&Other) noexcept
 
 ReleaseGuard (const ReleaseGuard &)=delete
 
 ~ReleaseGuard ()
 Calls the related PI object release function if the object held is not nullptr or if dismiss has not been called. More...
 
ReleaseGuardoperator= (const ReleaseGuard &)=delete
 
ReleaseGuardoperator= (ReleaseGuard &&Other)
 
void dismiss ()
 End the guard and do not release the reference count of the held PI object. More...
 

Detailed Description

template<typename T>
class ReleaseGuard< T >

RAII object that calls the reference count release function on the held PI object on destruction.

The dismiss function stops the release from happening on destruction.

Definition at line 728 of file pi_cuda.cpp.

Constructor & Destructor Documentation

◆ ReleaseGuard() [1/8]

template<typename T >
ReleaseGuard< T >::ReleaseGuard ( )
delete

◆ ReleaseGuard() [2/8]

template<typename T >
ReleaseGuard< T >::ReleaseGuard ( T  Obj)
inlineexplicit

Obj can be nullptr.

Definition at line 763 of file pi_cuda.cpp.

◆ ReleaseGuard() [3/8]

template<typename T >
ReleaseGuard< T >::ReleaseGuard ( ReleaseGuard< T > &&  Other)
inlinenoexcept

Definition at line 764 of file pi_cuda.cpp.

◆ ReleaseGuard() [4/8]

template<typename T >
ReleaseGuard< T >::ReleaseGuard ( const ReleaseGuard< T > &  )
delete

◆ ~ReleaseGuard() [1/2]

template<typename T >
ReleaseGuard< T >::~ReleaseGuard ( )
inline

Calls the related PI object release function if the object held is not nullptr or if dismiss has not been called.

Definition at line 772 of file pi_cuda.cpp.

References cl::sycl::detail::pi::die().

◆ ReleaseGuard() [5/8]

template<typename T >
ReleaseGuard< T >::ReleaseGuard ( )
delete

◆ ReleaseGuard() [6/8]

template<typename T >
ReleaseGuard< T >::ReleaseGuard ( T  Obj)
inlineexplicit

Obj can be nullptr.

Definition at line 653 of file pi_hip.cpp.

◆ ReleaseGuard() [7/8]

template<typename T >
ReleaseGuard< T >::ReleaseGuard ( ReleaseGuard< T > &&  Other)
inlinenoexcept

Definition at line 654 of file pi_hip.cpp.

◆ ReleaseGuard() [8/8]

template<typename T >
ReleaseGuard< T >::ReleaseGuard ( const ReleaseGuard< T > &  )
delete

◆ ~ReleaseGuard() [2/2]

template<typename T >
ReleaseGuard< T >::~ReleaseGuard ( )
inline

Calls the related PI object release function if the object held is not nullptr or if dismiss has not been called.

Definition at line 662 of file pi_hip.cpp.

References cl::sycl::detail::pi::die().

Member Function Documentation

◆ dismiss() [1/2]

template<typename T >
void ReleaseGuard< T >::dismiss ( )
inline

End the guard and do not release the reference count of the held PI object.

Definition at line 686 of file pi_hip.cpp.

◆ dismiss() [2/2]

template<typename T >
void ReleaseGuard< T >::dismiss ( )
inline

End the guard and do not release the reference count of the held PI object.

Definition at line 796 of file pi_cuda.cpp.

Referenced by cuda_piMemBufferPartition(), and hip_piMemBufferPartition().

◆ operator=() [1/4]

template<typename T >
ReleaseGuard& ReleaseGuard< T >::operator= ( const ReleaseGuard< T > &  )
delete

◆ operator=() [2/4]

template<typename T >
ReleaseGuard& ReleaseGuard< T >::operator= ( const ReleaseGuard< T > &  )
delete

◆ operator=() [3/4]

template<typename T >
ReleaseGuard& ReleaseGuard< T >::operator= ( ReleaseGuard< T > &&  Other)
inline

Definition at line 678 of file pi_hip.cpp.

◆ operator=() [4/4]

template<typename T >
ReleaseGuard& ReleaseGuard< T >::operator= ( ReleaseGuard< T > &&  Other)
inline

Definition at line 788 of file pi_cuda.cpp.


The documentation for this class was generated from the following files: