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

Method getAllocatedBytes

src/backend/cuda/Array.hpp:244–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

allocatedMethod · 0.45
getMethod · 0.45
elementsMethod · 0.45

Tested by

no test coverage detected