diff --git a/image_analysis/spot_finding/ImageAnalysisGPU.cu b/image_analysis/spot_finding/ImageAnalysisGPU.cu index 2aa6cbbb..f7171c2d 100644 --- a/image_analysis/spot_finding/ImageAnalysisGPU.cu +++ b/image_analysis/spot_finding/ImageAnalysisGPU.cu @@ -303,7 +303,7 @@ void GPUImageAnalysis::RunSpotFinder(const SpotFindingSettings &settings) { // data_in is CUDA registered memory // Run COLSPOT (GPU version) - spot_parameters spot_params; + spot_parameters spot_params{}; spot_params.strong_pixel_threshold2 = settings.signal_to_noise_threshold * settings.signal_to_noise_threshold; spot_params.nbx = NBX; spot_params.nby = NBX; @@ -375,7 +375,7 @@ void GPUImageAnalysis::GetSpotFinderResults(const DiffractionExperiment &experim } void GPUImageAnalysis::RegisterBuffer() { - cudaHostRegister(host_in, xpixels * ypixels * sizeof(uint16_t), cudaHostRegisterDefault); + cudaHostRegister(host_in, xpixels * ypixels * sizeof(int32_t), cudaHostRegisterDefault); } void GPUImageAnalysis::UnregisterBuffer() { @@ -386,5 +386,5 @@ void GPUImageAnalysis::LoadDataToGPU() { if (host_in == nullptr) throw JFJochException(JFJochExceptionCategory::SpotFinderError, "Host/GPU buffer not defined"); - cuda_err(cudaMemcpy(gpu_in, host_in, xpixels * ypixels * sizeof(int16_t), cudaMemcpyHostToDevice)); + cuda_err(cudaMemcpy(gpu_in, host_in, xpixels * ypixels * sizeof(int32_t), cudaMemcpyHostToDevice)); }