Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
Mila::Dnn::Serialization::TensorBlob< MR > Struct Template Referenceexport

Concrete tensor blob owning a TensorBuffer-backed raw byte buffer. More...

Inheritance diagram for Mila::Dnn::Serialization::TensorBlob< MR >:
Collaboration diagram for Mila::Dnn::Serialization::TensorBlob< MR >:

Public Member Functions

 TensorBlob (const TensorBlob &)=delete
 TensorBlob (TensorBlob &&)=default
 TensorBlob (TensorMetadata meta, TensorBuffer< dtype_t::UINT8, MR > buf)
const void * data () const noexcept override
const TensorMetadatagetMetadata () const noexcept override
TensorBloboperator= (const TensorBlob &)=delete
TensorBloboperator= (TensorBlob &&)=default
size_t sizeBytes () const noexcept override
Public Member Functions inherited from Mila::Dnn::Serialization::ITensorBlob
 ITensorBlob ()=default
 ITensorBlob (const ITensorBlob &)=delete
 ITensorBlob (ITensorBlob &&)=default
virtual ~ITensorBlob ()=default
ITensorBloboperator= (const ITensorBlob &)=delete
ITensorBloboperator= (ITensorBlob &&)=default

Public Attributes

TensorBuffer< dtype_t::UINT8, MR > data_buffer
TensorMetadata metadata

Detailed Description

template<typename MR = Compute::CpuMemoryResource>
requires isValidTensor<dtype_t::UINT8, MR>
struct Mila::Dnn::Serialization::TensorBlob< MR >

Concrete tensor blob owning a TensorBuffer-backed raw byte buffer.

The memory resource controls the allocation strategy:

TensorBlob<CpuMemoryResource> — pageable host memory (default) TensorBlob<CudaPinnedMemoryResource> — pinned host memory; copyFromBlob issues a direct DMA to device with no hidden driver staging

Template Parameters
MRMemory resource type. Must satisfy isValidTensor<UINT8, MR>.

Constructor & Destructor Documentation

◆ TensorBlob() [1/3]

template<typename MR = Compute::CpuMemoryResource>
Mila::Dnn::Serialization::TensorBlob< MR >::TensorBlob ( TensorMetadata meta,
TensorBuffer< dtype_t::UINT8, MR > buf )
inline
Here is the caller graph for this function:

◆ TensorBlob() [2/3]

template<typename MR = Compute::CpuMemoryResource>
Mila::Dnn::Serialization::TensorBlob< MR >::TensorBlob ( TensorBlob< MR > && )
default
Here is the call graph for this function:

◆ TensorBlob() [3/3]

template<typename MR = Compute::CpuMemoryResource>
Mila::Dnn::Serialization::TensorBlob< MR >::TensorBlob ( const TensorBlob< MR > & )
delete
Here is the call graph for this function:

Member Function Documentation

◆ data()

template<typename MR = Compute::CpuMemoryResource>
const void * Mila::Dnn::Serialization::TensorBlob< MR >::data ( ) const
inlineoverridevirtualnoexcept

◆ getMetadata()

template<typename MR = Compute::CpuMemoryResource>
const TensorMetadata & Mila::Dnn::Serialization::TensorBlob< MR >::getMetadata ( ) const
inlineoverridevirtualnoexcept

◆ operator=() [1/2]

template<typename MR = Compute::CpuMemoryResource>
TensorBlob & Mila::Dnn::Serialization::TensorBlob< MR >::operator= ( const TensorBlob< MR > & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

template<typename MR = Compute::CpuMemoryResource>
TensorBlob & Mila::Dnn::Serialization::TensorBlob< MR >::operator= ( TensorBlob< MR > && )
default
Here is the call graph for this function:

◆ sizeBytes()

template<typename MR = Compute::CpuMemoryResource>
size_t Mila::Dnn::Serialization::TensorBlob< MR >::sizeBytes ( ) const
inlineoverridevirtualnoexcept

Member Data Documentation

◆ data_buffer

template<typename MR = Compute::CpuMemoryResource>
TensorBuffer<dtype_t::UINT8, MR> Mila::Dnn::Serialization::TensorBlob< MR >::data_buffer

◆ metadata

template<typename MR = Compute::CpuMemoryResource>
TensorMetadata Mila::Dnn::Serialization::TensorBlob< MR >::metadata

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