Optimized Belief Propagation (CPU and GPU)
SmoothImageCUDA.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2024 Scott Grauer-Gray
3 
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18 
28 #ifndef SMOOTHIMAGECUDA_H_
29 #define SMOOTHIMAGECUDA_H_
30 
31 #include <cuda_runtime.h>
36 
37 //include for the kernel functions to be run on the GPU
38 #include "KernelFilterHeader.cuh"
39 
44 class SmoothImageCUDA final : public SmoothImage {
45 public:
46  explicit SmoothImageCUDA(const ParallelParams& cuda_params) : SmoothImage(cuda_params) {}
47 
55  void operator()(const BpImage<unsigned int>& in_image, float sigma, float* smoothed_image) const override;
56 };
57 
58 #endif /* SMOOTHIMAGECUDA_H_ */
File with namespace for enums, constants, structures, and functions specific to belief propagation pr...
Define constraint for data type in belief propagation processing related to image processing.
Header for the kernel to apply a horizontal/vertical filter to image data.
Declares child class of ParallelParams to store and process parallelization parameters to use in each...
Declares class for smoothing the images before running BP.
Class to define images that are used in bp processing.
Definition: BpImage.h:56
Abstract class for holding and processing parallelization parameters. Child class(es) specific to im...
Child class of SmoothImage for smoothing images in the CUDA implementation.
SmoothImageCUDA(const ParallelParams &cuda_params)
void operator()(const BpImage< unsigned int > &in_image, float sigma, float *smoothed_image) const override
For the CUDA smoothing, the input image is on the host and the output image is on the device (GPU)
Class for smoothing the images before running BP. Smoothing image always uses float data type.
Definition: SmoothImage.h:50