MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / getAllocatedBytes

Method getAllocatedBytes

src/backend/oneapi/Array.cpp:538–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536
537template<typename T>
538size_t Array<T>::getAllocatedBytes() const {
539 if (!isReady()) { return 0; }
540 size_t bytes = memoryManager().allocated(data.get());
541 // External device pointer
542 if (bytes == 0 && data.get()) { return data_dims.elements() * sizeof(T); }
543 return bytes;
544}
545
546#define INSTANTIATE(T) \
547 template Array<T> createHostDataArray<T>(const dim4 &dims, \

Callers 1

af_get_allocated_bytesFunction · 0.45

Calls 3

allocatedMethod · 0.45
getMethod · 0.45
elementsMethod · 0.45

Tested by

no test coverage detected