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

Method nativeAlloc

src/backend/oneapi/memory.cpp:182–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182void *Allocator::nativeAlloc(const size_t bytes) {
183 auto *ptr = new sycl::buffer<std::byte>(sycl::range(bytes));
184 AF_TRACE("nativeAlloc: {} {}", bytesToString(bytes),
185 static_cast<void *>(ptr));
186 return ptr;
187}
188
189void Allocator::nativeFree(void *ptr) {
190 auto *buf = static_cast<sycl::buffer<std::byte> *>(ptr);

Callers

nothing calls this directly

Calls 3

bytesToStringFunction · 0.85
rangeFunction · 0.70
getQueueFunction · 0.50

Tested by

no test coverage detected