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

Function memAllocUser

src/backend/opencl/memory.cpp:74–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void *memAllocUser(const size_t &bytes) {
75 dim4 dims(bytes);
76 void *ptr = memoryManager().alloc(true, 1, dims.get(), 1);
77 auto buf = static_cast<cl_mem>(ptr);
78 return new cl::Buffer(buf, true);
79}
80
81void memFree(cl::Buffer *ptr) {
82 cl::Buffer *buf = reinterpret_cast<cl::Buffer *>(ptr);

Callers

nothing calls this directly

Calls 2

allocMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected