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

Method getMappedPtr

src/backend/oneapi/Array.hpp:329–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327
328 public:
329 mapped_ptr<T> getMappedPtr(cl_map_flags map_flags = CL_MAP_READ |
330 CL_MAP_WRITE) const {
331 if (!isReady()) eval();
332 auto func = [data = data](void *ptr) {
333 if (ptr != nullptr) {
334 // cl_int err = getQueue().enqueueUnmapMemObject(*data, ptr);
335 // UNUSED(err);
336 ptr = nullptr;
337 }
338 };
339
340 // T *ptr = (T *)getQueue().enqueueMapBuffer(
341 //*static_cast<const sycl::buffer<T> *>(get()), CL_TRUE, map_flags,
342 // getOffset() * sizeof(T), elements() * sizeof(T), nullptr, nullptr,
343 // nullptr);
344
345 return mapped_ptr<T>(nullptr, func);
346 }
347
348 friend void evalMultiple<T>(std::vector<Array<T> *> arrays);
349

Callers

nothing calls this directly

Calls 1

evalClass · 0.70

Tested by

no test coverage detected