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

Function pinnedAlloc

src/backend/opencl/memory.cpp:140–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138
139template<typename T>
140T *pinnedAlloc(const size_t &elements) {
141 // TODO: make pinnedAlloc aware of array shapes
142 dim4 dims(elements);
143 void *ptr = pinnedMemoryManager().alloc(false, 1, dims.get(), sizeof(T));
144 return static_cast<T *>(ptr);
145}
146
147template<typename T>
148void pinnedFree(T *ptr) {

Callers

nothing calls this directly

Calls 2

allocMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected