Open main menu

CDOT Wiki β

Changes

BetaT

175 bytes added, 17:51, 3 April 2017
Optimizing Problems
__global__ void Calculate (float* u, float* un,int nx, int c, float dx, float dt)
{
int j = blockIdx.x * blockDim.x + threadIdx.x;
int i = blockIdx.y * blockDim.y + threadIdx.y;
un[i * nx + it-1] = u[i * nx + it-1];
__syncthreads();
u[it] = un[1 * nx + it - 1]; __syncthreads(); u[i * nx + it ] = un[i * nx + it- 1] - total * (un[i * nx + it - 1] - un[(i - 1) * nx + it - 1]); __syncthreads(); } } }
212
edits