fixing dumb mistake

This commit is contained in:
James E McClure 2018-02-21 17:12:27 -05:00
parent 6c99e99131
commit e6f366f9af

View File

@ -2481,9 +2481,10 @@ extern "C" double ScaLBL_D3Q19_AAeven_Flux_BC_z(int *list, double *dist, double
double *dvcsum; double *dvcsum;
cudaMalloc((void **)&dvcsum,sizeof(double)*count); cudaMalloc((void **)&dvcsum,sizeof(double)*count);
cudaMemset(dvcsum,0,sizeof(double)*count); cudaMemset(dvcsum,0,sizeof(double)*count);
int sharedBytes = 512*sizeof(double);
// compute the local flux and store the result // compute the local flux and store the result
dvc_ScaLBL_D3Q19_AAeven_Flux_BC_z<<<GRID,512>>>(list, dist, flux, area, dvcsum, count, N); dvc_ScaLBL_D3Q19_AAeven_Flux_BC_z<<<GRID,512,sharedBytes>>>(list, dist, flux, area, dvcsum, count, N);
// Now read the total flux // Now read the total flux
cudaMemcpy(&sum[0],dvcsum,sizeof(double),cudaMemcpyDeviceToHost); cudaMemcpy(&sum[0],dvcsum,sizeof(double),cudaMemcpyDeviceToHost);
@ -2511,9 +2512,10 @@ extern "C" double ScaLBL_D3Q19_AAodd_Flux_BC_z(int *neighborList, int *list, dou
double *dvcsum; double *dvcsum;
cudaMalloc((void **)&dvcsum,sizeof(double)*count); cudaMalloc((void **)&dvcsum,sizeof(double)*count);
cudaMemset(dvcsum,0,sizeof(double)*count); cudaMemset(dvcsum,0,sizeof(double)*count);
int sharedBytes = 512*sizeof(double);
// compute the local flux and store the result // compute the local flux and store the result
dvc_ScaLBL_D3Q19_AAodd_Flux_BC_z<<<GRID,512>>>(neighborList, list, dist, flux, area, dvcsum, count, N); dvc_ScaLBL_D3Q19_AAodd_Flux_BC_z<<<GRID,512,sharedBytes>>>(neighborList, list, dist, flux, area, dvcsum, count, N);
// Now read the total flux // Now read the total flux
cudaMemcpy(&sum[0],dvcsum,sizeof(double),cudaMemcpyDeviceToHost); cudaMemcpy(&sum[0],dvcsum,sizeof(double),cudaMemcpyDeviceToHost);