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

Function alloc

src/api/cpp/device.cpp:104–111  ·  view source on GitHub ↗

Alloc device memory

Source from the content-addressed store, hash-verified

102
103// Alloc device memory
104void *alloc(const size_t elements, const af::dtype type) {
105 void *ptr;
106 AF_DEPRECATED_WARNINGS_OFF
107 AF_THROW(af_alloc_device(&ptr, elements * size_of(type)));
108 AF_DEPRECATED_WARNINGS_ON
109 // FIXME: Add to map
110 return ptr;
111}
112
113// Alloc device memory
114void *allocV2(const size_t bytes) {

Callers

nothing calls this directly

Calls 2

size_ofFunction · 0.85
af_alloc_deviceFunction · 0.50

Tested by

no test coverage detected