Changes

Jump to: navigation, search

BetaT

347 bytes added, 13:51, 5 April 2017
no edit summary
After these implementations, testing the code produced the same results as the original program, so it is a positive confirmation that we can proceed to optimizing the cod using the GPU
== Optimizing Parallelizing with 2 Kernels ==
The kernels have been initialized as a 2D Grid '''dim3 dGrid(nbx, nbx); AND dim3 dBlock(ntpb, ntpb);'''
}
}
 
I will also parallelize the Initialize function below:
 
 
 
void init(float* u, int nx)
{
/*Initialize all values to 0, switching from vector to array. Vector defaults to 0, array defaults to null*/
for (int i = 0; i < nx; i++)
{
for (int k = 0; k < nx; k++)
u[i * nx + k] = 0;
}
}
 
=== CPU VS GPU ===
212
edits

Navigation menu