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

Function memFree

src/backend/oneapi/memory.cpp:97–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95
96template<typename T>
97void memFree(sycl::buffer<T> *ptr) {
98 if (ptr) {
99 sycl::buffer<std::byte> *optr =
100 static_cast<sycl::buffer<std::byte> *>((void *)ptr);
101 size_t bytes = ptr->byte_size();
102 *optr = ptr->template reinterpret<std::byte>(sycl::range(bytes));
103 memoryManager().unlock(optr, false);
104 }
105}
106
107void memFreeUser(void *ptr) { memoryManager().unlock(ptr, true); }
108

Callers

nothing calls this directly

Calls 2

rangeFunction · 0.70
unlockMethod · 0.45

Tested by

no test coverage detected