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

Method nativeAlloc

src/backend/cuda/memory.cpp:153–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151size_t Allocator::getMaxMemorySize(int id) { return getDeviceMemorySize(id); }
152
153void *Allocator::nativeAlloc(const size_t bytes) {
154 void *ptr = NULL;
155 CUDA_CHECK(cudaMalloc(&ptr, bytes));
156 AF_TRACE("nativeAlloc: {:>7} {}", bytesToString(bytes), ptr);
157 return ptr;
158}
159
160void Allocator::nativeFree(void *ptr) {
161 AF_TRACE("nativeFree: {}", ptr);

Callers

nothing calls this directly

Calls 1

bytesToStringFunction · 0.85

Tested by

no test coverage detected