|
ngscopeclient v0.2
|
Memory pool for temporary working buffers. More...
#include <ScratchBufferManager.h>
Public Types | |
| enum | PoolID_uint8 { U8_GPU_WAVEFORM } |
| enum | PoolID_uint32 { U32_GPU_WAVEFORM } |
| enum | PoolID_float32 { F32_GPU_WAVEFORM } |
| enum | PoolID_int64 { I64_GPU_WAVEFORM , I64_GPU_SMALL } |
Static Public Member Functions | |
| static size_t | GetTotalSize () |
| Get the total number of bytes in scratch buffers. | |
| static size_t | GetPoolSize (PoolID_uint8 id) |
| Get the total number of bytes in a specific scratch buffer pool. | |
| static size_t | GetPoolSize (PoolID_uint32 id) |
| Get the total number of bytes in a specific scratch buffer pool. | |
| static size_t | GetPoolSize (PoolID_float32 id) |
| Get the total number of bytes in a specific scratch buffer pool. | |
| static size_t | GetPoolSize (PoolID_int64 id) |
| Get the total number of bytes in a specific scratch buffer pool. | |
| static void | clear () |
| Flush all cached buffers. | |
| static bool | OnMemoryPressure (MemoryPressureLevel level, MemoryPressureType type, size_t requestedSize) |
| Called when we run out of (probably) VRAM. | |
| static std::shared_ptr< AcceleratorBuffer< uint8_t > > | Allocate (PoolID_uint8 pool) |
| static std::shared_ptr< AcceleratorBuffer< uint32_t > > | Allocate (PoolID_uint32 pool) |
| static std::shared_ptr< AcceleratorBuffer< float > > | Allocate (PoolID_float32 pool) |
| static std::shared_ptr< AcceleratorBuffer< int64_t > > | Allocate (PoolID_int64 pool) |
| static void | Free (std::shared_ptr< AcceleratorBuffer< uint8_t > > &p, PoolID_uint8 pool) |
| static void | Free (std::shared_ptr< AcceleratorBuffer< uint32_t > > &p, PoolID_uint32 pool) |
| static void | Free (std::shared_ptr< AcceleratorBuffer< float > > &p, PoolID_float32 pool) |
| static void | Free (std::shared_ptr< AcceleratorBuffer< int64_t > > &p, PoolID_int64 pool) |
Static Protected Attributes | |
| static std::mutex | m_poolMutex |
| Mutex for all pools. | |
| static std::list< std::shared_ptr< AcceleratorBuffer< uint8_t > > > | m_pool_u8_gpu_waveform |
| Pool for U8_GPU_WAVEFORM. | |
| static std::list< std::shared_ptr< AcceleratorBuffer< uint32_t > > > | m_pool_u32_gpu_waveform |
| Pool for U32_GPU_WAVEFORM. | |
| static std::list< std::shared_ptr< AcceleratorBuffer< float > > > | m_pool_f32_gpu_waveform |
| Pool for F32_GPU_WAVEFORM. | |
| static std::list< std::shared_ptr< AcceleratorBuffer< int64_t > > > | m_pool_i64_gpu_waveform |
| Pool for I64_GPU_WAVEFORM. | |
| static std::list< std::shared_ptr< AcceleratorBuffer< int64_t > > > | m_pool_i64_gpu_small |
| Pool for I64_GPU_SMALL. | |
Memory pool for temporary working buffers.