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

Function writeHostDataArray

src/backend/cpu/Array.cpp:313–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311
312template<typename T>
313void writeHostDataArray(Array<T> &arr, const T *const data,
314 const size_t bytes) {
315 if (!arr.isOwner()) { arr = copyArray<T>(arr); }
316 arr.eval();
317 // Ensure the memory being written to isnt used anywhere else.
318 getQueue().sync();
319 memcpy(arr.get(), data, bytes);
320}
321
322template<typename T>
323void writeDeviceDataArray(Array<T> &arr, const void *const data,

Callers 1

write_arrayFunction · 0.50

Calls 5

getQueueFunction · 0.50
isOwnerMethod · 0.45
evalMethod · 0.45
syncMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected