class nbla::CudaCachedArray

class CudaCachedArray : public nbla::CudaArray

Array allocated on CUDA device with a CudaMemory obtained by Cuda::caching_allocator().

Public Functions

explicit CudaCachedArray(const Size_t size, dtypes dtype, const Context &ctx, const AllocatorMemoryPtr mem = nullptr, const Size_t offset = 0)

Constructor.

Parameters:
  • size – Length of array.

  • dtype – Data type.

  • ctx – Context specifies device ID.