MCPcopy Create free account
hub / github.com/astra-toolbox/astra-toolbox / CDataStorageDLPackCPU

Method CDataStorageDLPackCPU

python/astra/src/dlpack.cpp:53–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51
52template<class DLT>
53CDataStorageDLPackCPU<DLT>::CDataStorageDLPackCPU(DLT *tensor_m)
54 : m_pTensor(tensor_m)
55{
56 // We assume all sanity checks have already been done
57
58 uint8_t* data = static_cast<uint8_t*>(m_pTensor->dl_tensor.data);
59 data += m_pTensor->dl_tensor.byte_offset;
60
61 this->m_pfData = reinterpret_cast<float*>(data);
62}
63
64template<class DLT>
65CDataStorageDLPackCPU<DLT>::~CDataStorageDLPackCPU()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected