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

Function writeDeviceDataArray

src/backend/cpu/Array.cpp:323–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321
322template<typename T>
323void writeDeviceDataArray(Array<T> &arr, const void *const data,
324 const size_t bytes) {
325 if (!arr.isOwner()) { arr = copyArray<T>(arr); }
326 memcpy(arr.get(), static_cast<const T *const>(data), bytes);
327}
328
329template<typename T>
330void Array<T>::setDataDims(const dim4 &new_dims) {

Callers 1

write_arrayFunction · 0.50

Calls 2

isOwnerMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected