Changes

Jump to: navigation, search

BetaT

50 bytes added, 18: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;
// removes from instructions because no need to do this NX amount of times
float total = c*dt / dx;
if (i < nx && j < nx)
{
for (int it = 1; it <= nx- 1; it++)
{
212
edits

Navigation menu