File tree 1 file changed +9
-5
lines changed
series/cuda-cpp/finite-difference
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)
43
43
}
44
44
45
45
float 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 ;
47
47
48
48
// shared memory tiles will be m*-by-*Pencils
49
49
// sPencils is used when each thread calculates the derivative at one point
@@ -441,10 +441,10 @@ void runTest(int dimension)
441
441
sPencils , mz,
442
442
lPencils, mz };
443
443
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
+
448
448
initInput (f, dimension);
449
449
initSol (sol, dimension);
450
450
@@ -495,6 +495,10 @@ void runTest(int dimension)
495
495
496
496
checkCuda ( cudaFree (d_f) );
497
497
checkCuda ( cudaFree (d_df) );
498
+
499
+ delete [] f;
500
+ delete [] df;
501
+ delete [] sol;
498
502
}
499
503
500
504
You can’t perform that action at this time.
0 commit comments