mirror of
https://github.com/smyalygames/FiniteVolumeGPU.git
synced 2026-01-14 15:48:43 +01:00
Refactoring
This commit is contained in:
@@ -293,6 +293,21 @@ __device__ void evolveG(float Q[vars][block_height+2*ghost_cells][block_width+2*
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Helper function for debugging etc.
|
||||
*/
|
||||
template<int shmem_width, int shmem_height, int vars>
|
||||
__device__ void memset(float Q[vars][shmem_height][shmem_width], float value) {
|
||||
for (int k=0; k<vars; ++k) {
|
||||
for (int j=threadIdx.y; j<shmem_height; ++j) {
|
||||
for (int i=threadIdx.x; i<shmem_width; ++i) {
|
||||
Q[k][j][i] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user