File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
series/cuda-cpp/finite-difference Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ cudaError_t checkCuda(cudaError_t result)
4343}
4444
4545float fx = 1 .0f , fy = 1 .0f , fz = 1 .0f ;
46- const int mx = 64 , my = 64 , mz = 64 ;
46+ const int mx = 96 , my = 96 , mz = 96 ;
4747
4848// shared memory tiles will be m*-by-*Pencils
4949// sPencils is used when each thread calculates the derivative at one point
@@ -441,10 +441,10 @@ void runTest(int dimension)
441441 sPencils , mz,
442442 lPencils, mz };
443443
444- float f [mx*my*mz];
445- float df [mx*my*mz];
446- float sol[mx*my*mz];
447-
444+ float *f = new float [mx*my*mz];
445+ float *df = new float [mx*my*mz];
446+ float * sol = new float [mx*my*mz];
447+
448448 initInput (f, dimension);
449449 initSol (sol, dimension);
450450
@@ -495,6 +495,10 @@ void runTest(int dimension)
495495
496496 checkCuda ( cudaFree (d_f) );
497497 checkCuda ( cudaFree (d_df) );
498+
499+ delete [] f;
500+ delete [] df;
501+ delete [] sol;
498502}
499503
500504
You can’t perform that action at this time.
0 commit comments