// allocate a three dimensional array
temperature = new double**[blockDimX+2];
new_temperature = new double**[blockDimX+2];
for(int i=0; i<blockDimX+2; i++)
{
temperature[i] = new double*[blockDimY+2];
new_temperature[i] = new double*[blockDimY+2];
for(int j=0; j<blockDimY+2; j++)
{
temperature[i][j] = new double[blockDimZ+2];
new_temperature[i][j] = new double[blockDimZ+2];
}
}
This is exactly what we would tell people not to do if we saw it in application code that was getting poor performance. Why do we have examples which do exactly that?
Original issue: https://charm.cs.illinois.edu/redmine/issues/1315
This is exactly what we would tell people not to do if we saw it in application code that was getting poor performance. Why do we have examples which do exactly that?