Calls to copyBuf in both overloads of DeviceArray::fromHost were passing the wrong lengths. They were using size_bytes() which is larger than the staging buffer if end - begin defines a sub-range.
The call to copyBuf in DeviceArray::rangeToHost was passing the wrong length. It was using size_bytes() which is larger than the staging buffer if offset_end - offset_begin defines a sub-range.
The call to copyBuf in DeviceArray::rangeToHost was missing a sizeof(T) factor on src_offset.
copyBuf
in both overloads ofDeviceArray::fromHost
were passing the wrong lengths. They were usingsize_bytes()
which is larger than the staging buffer ifend - begin
defines a sub-range.copyBuf
inDeviceArray::rangeToHost
was passing the wrong length. It was usingsize_bytes()
which is larger than the staging buffer ifoffset_end - offset_begin
defines a sub-range.copyBuf
inDeviceArray::rangeToHost
was missing asizeof(T)
factor onsrc_offset
.