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

Method getAllocatedBytes

src/backend/opencl/Array.cpp:541–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

allocatedMethod · 0.45
getMethod · 0.45
elementsMethod · 0.45

Tested by

no test coverage detected