Correct remaining bytes in copy 2d kernel

[ROCm/hip commit: dc179e0c33]
Этот коммит содержится в:
Rahul Garg
2018-05-24 08:27:24 +05:30
родитель 08f750571d
Коммит fb1425959e
+1 -1
Просмотреть файл
@@ -1501,7 +1501,7 @@ __global__ void hip_copy2d_n(T* dst, const T* src, size_t width, size_t height,
T *srcPtr = (T *)((uint8_t*) src + idy * srcPitch);
dstPtr[idx] = srcPtr[idx];
} else {
size_t bytesToCopy = width - floorWidth;
size_t bytesToCopy = width - (floorWidth * sizeof(T));
uint8_t *dstPtr = (uint8_t *) ((uint8_t*) dst + idy * destPitch);
uint8_t *srcPtr = (uint8_t *) ((uint8_t*) src + idy * srcPitch);
for(int i =0 ; i < bytesToCopy ; i++) {