ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::core::StdGPUAllocator< T > Class Template Reference

#include <StdGPUHashBackend.h>

Public Types

using value_type = T
 T. More...
 

Public Member Functions

 StdGPUAllocator ()=default
 Default constructor. More...
 
 StdGPUAllocator (int device_id)
 Constructor from device. More...
 
 StdGPUAllocator (const StdGPUAllocator &)=default
 Default copy constructor. More...
 
StdGPUAllocatoroperator= (const StdGPUAllocator &)=default
 Default copy assignment operator. More...
 
 StdGPUAllocator (StdGPUAllocator &&)=default
 Default move constructor. More...
 
StdGPUAllocatoroperator= (StdGPUAllocator &&)=default
 Default move assignment operator. More...
 
template<typename U >
 StdGPUAllocator (const StdGPUAllocator< U > &other)
 Rebind copy constructor. More...
 
T * allocate (std::size_t n)
 Allocates memory of size n. More...
 
void deallocate (T *p, std::size_t n)
 Deallocates memory from pointer p of size n . More...
 
bool operator== (const StdGPUAllocator &other)
 Returns true if the instances are equal, false otherwise. More...
 
bool operator!= (const StdGPUAllocator &other)
 Returns true if the instances are not equal, false otherwise. More...
 

Detailed Description

template<typename T>
class cloudViewer::core::StdGPUAllocator< T >

Class satisfying the Allocator requirements defined by the C++ standard. This bridge makes the MemoryManager interface accessible to all classes and containers in stdgpu that use the standard Allocator interface.

This allows to allocate (potentially cached) GPU memory in stdgpu.

Definition at line 33 of file StdGPUHashBackend.h.

Member Typedef Documentation

◆ value_type

template<typename T >
using cloudViewer::core::StdGPUAllocator< T >::value_type = T

T.

Definition at line 36 of file StdGPUHashBackend.h.

Constructor & Destructor Documentation

◆ StdGPUAllocator() [1/5]

template<typename T >
cloudViewer::core::StdGPUAllocator< T >::StdGPUAllocator ( )
default

Default constructor.

◆ StdGPUAllocator() [2/5]

template<typename T >
cloudViewer::core::StdGPUAllocator< T >::StdGPUAllocator ( int  device_id)
inlineexplicit

Constructor from device.

Definition at line 42 of file StdGPUHashBackend.h.

◆ StdGPUAllocator() [3/5]

template<typename T >
cloudViewer::core::StdGPUAllocator< T >::StdGPUAllocator ( const StdGPUAllocator< T > &  )
default

Default copy constructor.

◆ StdGPUAllocator() [4/5]

template<typename T >
cloudViewer::core::StdGPUAllocator< T >::StdGPUAllocator ( StdGPUAllocator< T > &&  )
default

Default move constructor.

◆ StdGPUAllocator() [5/5]

template<typename T >
template<typename U >
cloudViewer::core::StdGPUAllocator< T >::StdGPUAllocator ( const StdGPUAllocator< U > &  other)
inline

Rebind copy constructor.

Definition at line 58 of file StdGPUHashBackend.h.

Member Function Documentation

◆ allocate()

template<typename T >
T* cloudViewer::core::StdGPUAllocator< T >::allocate ( std::size_t  n)
inline

Allocates memory of size n.

Definition at line 62 of file StdGPUHashBackend.h.

◆ deallocate()

template<typename T >
void cloudViewer::core::StdGPUAllocator< T >::deallocate ( T *  p,
std::size_t  n 
)
inline

Deallocates memory from pointer p of size n .

Definition at line 69 of file StdGPUHashBackend.h.

◆ operator!=()

template<typename T >
bool cloudViewer::core::StdGPUAllocator< T >::operator!= ( const StdGPUAllocator< T > &  other)
inline

Returns true if the instances are not equal, false otherwise.

Definition at line 80 of file StdGPUHashBackend.h.

References cloudViewer::core::StdGPUAllocator< T >::operator==().

◆ operator=() [1/2]

template<typename T >
StdGPUAllocator& cloudViewer::core::StdGPUAllocator< T >::operator= ( const StdGPUAllocator< T > &  )
default

Default copy assignment operator.

◆ operator=() [2/2]

template<typename T >
StdGPUAllocator& cloudViewer::core::StdGPUAllocator< T >::operator= ( StdGPUAllocator< T > &&  )
default

Default move assignment operator.

◆ operator==()

template<typename T >
bool cloudViewer::core::StdGPUAllocator< T >::operator== ( const StdGPUAllocator< T > &  other)
inline

Returns true if the instances are equal, false otherwise.

Definition at line 75 of file StdGPUHashBackend.h.

Referenced by cloudViewer::core::StdGPUAllocator< T >::operator!=().


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