DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::ext::oneapi::weak_object< SYCLObjT > Class Template Reference

#include <sycl/ext/oneapi/weak_object.hpp>

Inheritance diagram for sycl::_V1::ext::oneapi::weak_object< SYCLObjT >:
Collaboration diagram for sycl::_V1::ext::oneapi::weak_object< SYCLObjT >:

Public Types

using object_type = typename detail::weak_object_base< SYCLObjT >::object_type
 
- Public Types inherited from sycl::_V1::ext::oneapi::detail::weak_object_base< SYCLObjT >
using object_type = SYCLObjT
 

Public Member Functions

constexpr weak_object () noexcept=default
 
 weak_object (const SYCLObjT &SYCLObj) noexcept
 
 weak_object (const weak_object &Other) noexcept=default
 
 weak_object (weak_object &&Other) noexcept=default
 
weak_objectoperator= (const SYCLObjT &SYCLObj) noexcept
 
weak_objectoperator= (const weak_object &Other) noexcept=default
 
weak_objectoperator= (weak_object &&Other) noexcept=default
 
std::optional< SYCLObjT > try_lock () const noexcept
 
SYCLObjT lock () const
 
- Public Member Functions inherited from sycl::_V1::ext::oneapi::detail::weak_object_base< SYCLObjT >
constexpr weak_object_base () noexcept
 
 weak_object_base (const SYCLObjT &SYCLObj) noexcept
 
 weak_object_base (const weak_object_base &Other) noexcept=default
 
 weak_object_base (weak_object_base &&Other) noexcept=default
 
void reset () noexcept
 
void swap (weak_object_base &Other) noexcept
 
bool expired () const noexcept
 
bool owner_before (const SYCLObjT &Other) const noexcept
 
bool owner_before (const weak_object_base &Other) const noexcept
 

Additional Inherited Members

- Protected Member Functions inherited from sycl::_V1::ext::oneapi::detail::weak_object_base< SYCLObjT >
template<class Obj >
decltype(weak_object_base< Obj >::MObjWeakPtr) friend detail::getSyclWeakObjImpl (const weak_object_base< Obj > &WeakObj)
 
- Protected Attributes inherited from sycl::_V1::ext::oneapi::detail::weak_object_base< SYCLObjT >
std::invoke_result_t< decltype(sycl::detail::getSyclObjImpl< SYCLObjT >), SYCLObjT >::weak_type MObjWeakPtr
 

Detailed Description

template<typename SYCLObjT>
class sycl::_V1::ext::oneapi::weak_object< SYCLObjT >

Definition at line 41 of file weak_object.hpp.

Member Typedef Documentation

◆ object_type

template<typename SYCLObjT >
using sycl::_V1::ext::oneapi::weak_object< SYCLObjT >::object_type = typename detail::weak_object_base<SYCLObjT>::object_type

Definition at line 43 of file weak_object.hpp.

Constructor & Destructor Documentation

◆ weak_object() [1/4]

template<typename SYCLObjT >
constexpr sycl::_V1::ext::oneapi::weak_object< SYCLObjT >::weak_object ( )
constexprdefaultnoexcept

◆ weak_object() [2/4]

template<typename SYCLObjT >
sycl::_V1::ext::oneapi::weak_object< SYCLObjT >::weak_object ( const SYCLObjT &  SYCLObj)
inlinenoexcept

Definition at line 46 of file weak_object.hpp.

◆ weak_object() [3/4]

template<typename SYCLObjT >
sycl::_V1::ext::oneapi::weak_object< SYCLObjT >::weak_object ( const weak_object< SYCLObjT > &  Other)
defaultnoexcept

◆ weak_object() [4/4]

template<typename SYCLObjT >
sycl::_V1::ext::oneapi::weak_object< SYCLObjT >::weak_object ( weak_object< SYCLObjT > &&  Other)
defaultnoexcept

Member Function Documentation

◆ lock()

template<typename SYCLObjT >
SYCLObjT sycl::_V1::ext::oneapi::weak_object< SYCLObjT >::lock ( ) const
inline

Definition at line 65 of file weak_object.hpp.

References sycl::_V1::make_error_code().

◆ operator=() [1/3]

template<typename SYCLObjT >
weak_object& sycl::_V1::ext::oneapi::weak_object< SYCLObjT >::operator= ( const SYCLObjT &  SYCLObj)
inlinenoexcept

Definition at line 51 of file weak_object.hpp.

References sycl::_V1::detail::getSyclObjImpl().

◆ operator=() [2/3]

template<typename SYCLObjT >
weak_object& sycl::_V1::ext::oneapi::weak_object< SYCLObjT >::operator= ( const weak_object< SYCLObjT > &  Other)
defaultnoexcept

◆ operator=() [3/3]

template<typename SYCLObjT >
weak_object& sycl::_V1::ext::oneapi::weak_object< SYCLObjT >::operator= ( weak_object< SYCLObjT > &&  Other)
defaultnoexcept

◆ try_lock()

template<typename SYCLObjT >
std::optional<SYCLObjT> sycl::_V1::ext::oneapi::weak_object< SYCLObjT >::try_lock ( ) const
inlinenoexcept

Definition at line 59 of file weak_object.hpp.


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