Commit aca161d1 authored by bader's avatar bader

cleaned up the code a bit ...

parent cea20be7
......@@ -122,14 +122,6 @@ SWE_BlockCUDA::SWE_BlockCUDA(float _offsetX, float _offsetY, const int i_cudaDev
cudaMalloc((void**)&bd, size);
checkCUDAError("allocate device memory for bd");
//----> COULD BE IMPLEMENTED AS (INEFFICIENT) REFERENCE IMPLEMENTATION
// // allocate CUDA unknowns: maxmimum height and velocity
// size = (nx/TILE_SIZE)*(ny/TILE_SIZE)*sizeof(float);
// cudaMalloc((void**)&maxhd, size);
// checkCUDAError("allocate device memory for maxhd");
// cudaMalloc((void**)&maxvd, size);
// checkCUDAError("allocate device memory for maxvd");
// allocate consecutive memory for 2 columns with three unknowns each
// (h, hu, hv, excluding b) for copy/ghost layer at bottom/top boundary
size = nx+2;
......
......@@ -205,27 +205,3 @@ void kernelTopCopyLayer(float* hd, float* hud, float* hvd,
}
// //******************************************************************
// // kernels to implement boundary conditions
// //******************************************************************
//
//
// /**
// * CUDA kernel for maximum reduction
// * required to compute maximum water height and velocities to determine
// * allow time step
// */
// __global__
// void kernelMaximum(float* maxhd, float* maxvd, int start, int size) {
// int tx = start+threadIdx.x;
// for (int i=size>>1; i>0; i>>=1) {
// __syncthreads();
// if (tx < i) {
// if( maxhd[tx] < maxhd[tx+i] ) maxhd[tx] = maxhd[tx+i];
// if( maxvd[tx] < maxvd[tx+i] ) maxvd[tx] = maxvd[tx+i];
// };
// };
// }
//
//
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment