SOFA API  b3f2f2a4
Open source framework for multi-physics simuation
sofa::helper::MemoryManager< T > Class Template Reference

#include <MemoryManager.h>

Detailed Description

template<class T>
class sofa::helper::MemoryManager< T >

Generic MemoryManager Its use is informative only and it cannot be instancied (linkage error otherwise).

Static Public Member Functions

static int numDevices ()
 
static void hostAlloc (host_pointer *hPointer, int n)
 
static void memsetHost (host_pointer hPointer, int value, size_t n)
 
static void hostFree (const host_pointer hSrcPointer)
 
static void deviceAlloc (int d, device_pointer *dPointer, int n)
 
static void deviceFree (int d, const device_pointer dSrcPointer)
 
static void memcpyHostToDevice (int d, device_pointer dDestPointer, const host_pointer hSrcPointer, size_t n)
 
static void memcpyDeviceToHost (int d, host_pointer hDestPointer, const void *dSrcPointer, size_t n)
 
static void memcpyDeviceToDevice (int d, device_pointer dDestPointer, const device_pointer dSrcPointer, size_t n)
 
static void memsetDevice (int d, device_pointer dDestPointer, int value, size_t n)
 
static int getBufferDevice ()
 
static bool bufferAlloc (buffer_id_type *, int, bool)
 
static void bufferFree (const buffer_id_type)
 
static bool bufferRegister (const buffer_id_type)
 
static void bufferUnregister (const buffer_id_type)
 
static bool bufferMapToDevice (device_pointer *, const buffer_id_type)
 
static void bufferUnmapToDevice (device_pointer *, const buffer_id_type)
 
static device_pointer deviceOffset (device_pointer dPointer, size_t offset)
 
static device_pointer null ()
 
static bool isNull (device_pointer p)
 

Function details

◆ bufferAlloc()

template<class T >
static bool sofa::helper::MemoryManager< T >::bufferAlloc ( buffer_id_type ,
int  ,
bool   
)
inlinestatic

◆ bufferFree()

template<class T >
static void sofa::helper::MemoryManager< T >::bufferFree ( const  buffer_id_type)
inlinestatic

◆ bufferMapToDevice()

template<class T >
static bool sofa::helper::MemoryManager< T >::bufferMapToDevice ( device_pointer ,
const  buffer_id_type 
)
inlinestatic

◆ bufferRegister()

template<class T >
static bool sofa::helper::MemoryManager< T >::bufferRegister ( const  buffer_id_type)
inlinestatic

◆ bufferUnmapToDevice()

template<class T >
static void sofa::helper::MemoryManager< T >::bufferUnmapToDevice ( device_pointer ,
const  buffer_id_type 
)
inlinestatic

◆ bufferUnregister()

template<class T >
static void sofa::helper::MemoryManager< T >::bufferUnregister ( const  buffer_id_type)
inlinestatic

◆ deviceAlloc()

template<class T >
static void sofa::helper::MemoryManager< T >::deviceAlloc ( int  d,
device_pointer dPointer,
int  n 
)
static

◆ deviceFree()

template<class T >
static void sofa::helper::MemoryManager< T >::deviceFree ( int  d,
const device_pointer  dSrcPointer 
)
static

◆ deviceOffset()

template<class T >
static device_pointer sofa::helper::MemoryManager< T >::deviceOffset ( device_pointer  dPointer,
size_t  offset 
)
inlinestatic

◆ getBufferDevice()

template<class T >
static int sofa::helper::MemoryManager< T >::getBufferDevice ( )
static

◆ hostAlloc()

template<class T >
static void sofa::helper::MemoryManager< T >::hostAlloc ( host_pointer hPointer,
int  n 
)
inlinestatic

◆ hostFree()

template<class T >
static void sofa::helper::MemoryManager< T >::hostFree ( const host_pointer  hSrcPointer)
static

◆ isNull()

template<class T >
static bool sofa::helper::MemoryManager< T >::isNull ( device_pointer  p)
inlinestatic

◆ memcpyDeviceToDevice()

template<class T >
static void sofa::helper::MemoryManager< T >::memcpyDeviceToDevice ( int  d,
device_pointer  dDestPointer,
const device_pointer  dSrcPointer,
size_t  n 
)
static

◆ memcpyDeviceToHost()

template<class T >
static void sofa::helper::MemoryManager< T >::memcpyDeviceToHost ( int  d,
host_pointer  hDestPointer,
const void *  dSrcPointer,
size_t  n 
)
static

◆ memcpyHostToDevice()

template<class T >
static void sofa::helper::MemoryManager< T >::memcpyHostToDevice ( int  d,
device_pointer  dDestPointer,
const host_pointer  hSrcPointer,
size_t  n 
)
static

◆ memsetDevice()

template<class T >
static void sofa::helper::MemoryManager< T >::memsetDevice ( int  d,
device_pointer  dDestPointer,
int  value,
size_t  n 
)
static

◆ memsetHost()

template<class T >
static void sofa::helper::MemoryManager< T >::memsetHost ( host_pointer  hPointer,
int  value,
size_t  n 
)
inlinestatic

◆ null()

template<class T >
static device_pointer sofa::helper::MemoryManager< T >::null ( )
inlinestatic

◆ numDevices()

template<class T >
static int sofa::helper::MemoryManager< T >::numDevices ( )
static

Enum details

◆ anonymous enum

template<class T >
anonymous enum
Enumerator
MAX_DEVICES 

◆ anonymous enum

template<class T >
anonymous enum
Enumerator
BSIZE 

◆ anonymous enum

template<class T >
anonymous enum
Enumerator
SUPPORT_GL_BUFFER