xpu
xpu::ptr_prop Class Reference

Properties of a pointer. Properties of a pointer allocated with malloc_device, malloc_host or malloc_shared. More...

Public Member Functions

 ptr_prop ()=delete
 
 ptr_prop (const void *)
 Create a pointer property object from a pointer. More...
 
void * ptr () const
 
mem_type type () const
 
bool is_host () const
 
xpu::device device () const
 
driver_t backend () const
 

Detailed Description

Properties of a pointer. Properties of a pointer allocated with malloc_device, malloc_host or malloc_shared.

Constructor & Destructor Documentation

◆ ptr_prop() [1/2]

xpu::ptr_prop::ptr_prop ( )
delete

◆ ptr_prop() [2/2]

xpu::ptr_prop::ptr_prop ( const void *  )
explicit

Create a pointer property object from a pointer.

Parameters
ptrPointer to the memory.

Member Function Documentation

◆ backend()

driver_t xpu::ptr_prop::backend ( ) const
inline
Returns
The backend used to allocate the memory.
See also
driver_t

◆ device()

xpu::device xpu::ptr_prop::device ( ) const
inline
Returns
The device the memory is allocated on.

◆ is_host()

bool xpu::ptr_prop::is_host ( ) const
inline
Returns
If the memory is allocated on the host.

◆ ptr()

void* xpu::ptr_prop::ptr ( ) const
inline
Returns
The pointer.

◆ type()

mem_type xpu::ptr_prop::type ( ) const
inline
Returns
The type of the memory.
See also
mem_type

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