vt::Mempool#

inline void vt::check_cuda_errors(cudaError_t err, const std::string &message)#

Check the CUDA errors.

Parameters:
  • err – The CUDA error code.

  • message – The error message.

inline int vt::get_number_of_gpus()#

Get the number of GPUs.

Returns:

int: The number of GPUs.

class Mempool#

Public Functions

inline Mempool(size_t pool_size, const std::string &log_filepath = "/tmp/vtensor/memory.log")#

Construct a Mempool object.

Parameters:
  • pool_size – The size of the memory pool.

  • log_filepath – The log file path.

class GlobalMempool#

Public Static Functions

static inline GlobalMempool &get_instance()#

Get the Instance object. It returns the singleton instance of the global memory pool.

Returns:

GlobalMempool&: The global memory pool instance.

class GlobalMempoolInitializer#