Refactoring - broke 2nd order

This commit is contained in:
André R. Brodtkorb
2018-11-09 11:46:34 +01:00
parent 812ebcc9ba
commit e98ae0a979
21 changed files with 499023 additions and 611 deletions

View File

@@ -217,8 +217,12 @@ class CudaArray2D:
copy.set_dst_device(self.data.gpudata)
#Set offsets of upload in destination
copy.dst_x_in_bytes = x_halo*self.data.strides[1]
copy.dst_y = y_halo
# This handles the cases where cpu_data contains ghost cell values
# and also when it does not
x_offset = (nx_halo - cpu_data.shape[1]) // 2
y_offset = (ny_halo - cpu_data.shape[0]) // 2
copy.dst_x_in_bytes = x_offset*self.data.strides[1]
copy.dst_y = y_offset
#Set destination pitch
copy.dst_pitch = self.data.strides[0]