Skip to content

Commit

Permalink
Merge pull request #124 from AstroAccelerateOrg/jn_123_MSDsegfault
Browse files Browse the repository at this point in the history
correction of passing the correct value to MSD_DIT_size
  • Loading branch information
ccarels authored Nov 1, 2018
2 parents 22c105f + 4186b0e commit cf2592e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/device_MSD_plane_profile.cu
Original file line number Diff line number Diff line change
Expand Up @@ -444,13 +444,13 @@ void MSD_Interpolate_values(float *d_MSD_interpolated, float *d_MSD_DIT, std::ve
// h_MSD_interpolated = new float[nWidths*MSD_INTER_SIZE];

// adding memory for the interpolate kernel
int MSD_DIT_size = h_boxcar_widths->size();
int MSD_DIT_size = h_MSD_DIT_widths->size();
int *d_MSD_DIT_widths;
int *d_boxcar;
checkCudaErrors(cudaMalloc((void **) &d_MSD_DIT_widths, sizeof(int)*MSD_DIT_size));
checkCudaErrors(cudaMemcpyAsync(d_MSD_DIT_widths, &h_MSD_DIT_widths->operator[](0), sizeof(int)*MSD_DIT_size,cudaMemcpyHostToDevice));
checkCudaErrors(cudaMemcpy(d_MSD_DIT_widths, &h_MSD_DIT_widths->operator[](0), sizeof(int)*MSD_DIT_size,cudaMemcpyHostToDevice));
cudaMalloc((void **) &d_boxcar, sizeof(int)*nWidths);
checkCudaErrors(cudaMemcpyAsync(d_boxcar, &h_boxcar_widths->operator[](0), sizeof(int)*nWidths,cudaMemcpyHostToDevice));
checkCudaErrors(cudaMemcpy(d_boxcar, &h_boxcar_widths->operator[](0), sizeof(int)*nWidths,cudaMemcpyHostToDevice));


// checkCudaErrors(cudaMemcpy(h_MSD_DIT, d_MSD_DIT, nMSDs*MSD_RESULTS_SIZE*sizeof(float), cudaMemcpyDeviceToHost));
Expand Down

0 comments on commit cf2592e

Please sign in to comment.