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

Method getAllocatedBytes

src/backend/cpu/Array.hpp:246–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244 void setDataDims(const dim4 &new_dims);
245
246 size_t getAllocatedBytes() const {
247 if (!isReady()) return 0;
248 size_t bytes = memoryManager().allocated(data.get());
249 // External device poitner
250 if (bytes == 0 && data.get()) {
251 return data_dims.elements() * sizeof(T);
252 }
253 return bytes;
254 }
255
256 T *device();
257

Callers

nothing calls this directly

Calls 3

allocatedMethod · 0.45
getMethod · 0.45
elementsMethod · 0.45

Tested by

no test coverage detected