Open main menu

CDOT Wiki β

Changes

BetaT

14 bytes added, 19:53, 1 April 2017
New Kernel
__global__ void Initalize(float* u, float* un, int nx, int nt, float dx)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
int j = blockIdx.y * blockDim.y + threadIdx.y;
if (i < nx && j < nx)
{
}
}
The old code was:
for (int k = 0; k <= nx - 1; k++)
if (k*dx >= 0.5 && k*dx <= 1)
212
edits