Classes | |
struct | cudaHistOptions |
The structure defines execution options and is used by histogram functions. More... | |
Functions | |
double | cudaHista (float *src, float *hist, int length, int bins, cudaHistOptions *p_options=NULL, bool device=false) |
Calculates a 1D histogram based on the first method described in: R. Shams and R. A. Kennedy, "Efficient histogram algorithms for NVIDIA CUDA compatible devices," Proc. Int. Conf. on Signal Processing and Communications Systems (ICSPCS), Gold Coast, Australia, Dec. 2007, pp. 418-422. | |
double | cudaHistb (float *src, float *hist, int length, int bins, cudaHistOptions *p_options=NULL, bool device=false) |
Calculates a 1D histogram based on the second method described in: R. Shams and R. A. Kennedy, "Efficient histogram algorithms for NVIDIA CUDA compatible devices," Proc. Int. Conf. on Signal Processing and Communications Systems (ICSPCS), Gold Coast, Australia, Dec. 2007, pp. 418-422. | |
double | cudaHist_Approx (float *src, float *hist, int length, int bins, cudaHistOptions *p_options=NULL, bool device=false) |
Calculates a 1D histogram based on method described in: R. Shams and N. Barnes, "Speeding up mutual information computation using NVIDIA CUDA hardware," Proc. Digital Image Computing: Techniques and Applications (DICTA), Adelaide, Australia, Dec. 2007, pp. 555-560. | |
void | cudaHist2Da (float *src1, float *src2, float *hist, int length, int xbins, int ybins, cudaHistOptions *p_options=NULL, bool device=false) |
Calculates a 2D (joint) histogram based on the first method described in: R. Shams and R. A. Kennedy, "Efficient histogram algorithms for NVIDIA CUDA compatible devices," Proc. Int. Conf. on Signal Processing and Communications Systems (ICSPCS), Gold Coast, Australia, Dec. 2007, pp. 418-422. | |
void | cudaHist2Db (float *src1, float *src2, float *hist, int length, int xbins, int ybins, cudaHistOptions *p_options=NULL, bool device=false) |
Calculates a 2D (joint) histogram based on the second method described in: R. Shams and R. A. Kennedy, "Efficient histogram algorithms for NVIDIA CUDA compatible devices," Proc. Int. Conf. on Signal Processing and Communications Systems (ICSPCS), Gold Coast, Australia, Dec. 2007, pp. 418-422. | |
void | cudaHist2D_Approx (float *src1, float *src2, float *hist, int length, int xbins, int ybins, cudaHistOptions *p_options=NULL, bool device=false) |
Calculates a 2D (joint) histogram based on the second method described in: R. Shams and N. Barnes, "Speeding up mutual information computation using NVIDIA CUDA hardware," Proc. Digital Image Computing: Techniques and Applications (DICTA), Adelaide, Australia, Dec. 2007, pp. 555-560. |
Contains definition of C functions for 1D and 2D histogram calculation implemented on the GPU. The methods are based on the following two publications:
R. Shams and R. A. Kennedy, "Efficient histogram algorithms for NVIDIA CUDA compatible devices," Proc. Int. Conf. on Signal Processing and Communications Systems (ICSPCS), Gold Coast, Australia, Dec. 2007, pp. 418-422.
R. Shams and N. Barnes, "Speeding up mutual information computation using NVIDIA CUDA hardware," Proc. Digital Image Computing: Techniques and Applications (DICTA), Adelaide, Australia, Dec. 2007, pp. 555-560.
void cudaHist2D_Approx | ( | float * | src1, | |
float * | src2, | |||
float * | hist, | |||
int | length, | |||
int | xbins, | |||
int | ybins, | |||
cudaHistOptions * | p_options = NULL , |
|||
bool | device = false | |||
) |
Calculates a 2D (joint) histogram based on the second method described in:
R. Shams and N. Barnes, "Speeding up mutual information computation using NVIDIA CUDA hardware," Proc. Digital Image Computing: Techniques and Applications (DICTA), Adelaide, Australia, Dec. 2007, pp. 555-560.
src1 | Pointer to the input array where the data is stored. | |
src2 | Pointer to the input array where the data is stored. | |
hist | Pointer to the output array where the computed histogram is to be stored. Output array must be allocated and freed by the caller. | |
length | Number of the input array's elements. | |
bins | Number of the histogram bins or output array's elements. | |
p_options | A structure which defines the execution configuration. | |
device | A flag which indicates whether input/output arrays are allocated on the host (CPU) memory or the device (GPU) memory. |
When the function is being called inside a loop or multiple times, for best performance allocate the input and output arrays on device memory to avoid unnecessary allocation, memory transfers and deallocation by the function.
When device flag is set, the caller needs to allocate memory for hist but does not need to initialize the array. The initialization will be done by the function itself.
Input data must be normalized between 0 and 1. The behavior of the function for values outside this range is undefined and is most likely to cause memory corruption.
void cudaHist2Da | ( | float * | src1, | |
float * | src2, | |||
float * | hist, | |||
int | length, | |||
int | xbins, | |||
int | ybins, | |||
cudaHistOptions * | p_options = NULL , |
|||
bool | device = false | |||
) |
Calculates a 2D (joint) histogram based on the first method described in:
R. Shams and R. A. Kennedy, "Efficient histogram algorithms for NVIDIA CUDA compatible devices," Proc. Int. Conf. on Signal Processing and Communications Systems (ICSPCS), Gold Coast, Australia, Dec. 2007, pp. 418-422.
src1 | Pointer to the input array where the data is stored. | |
src2 | Pointer to the input array where the data is stored. | |
hist | Pointer to the output array where the computed histogram is to be stored. Output array must be allocated and freed by the caller. | |
length | Number of the input array's elements. Both input arrays must have the same length. | |
xbins | Number of the histogram bins along the x-axis of the 2D histogram. | |
ybins | Number of the histogram bins along the y-axis of the 2D histogram. | |
p_options | A structure which defines the execution configuration. | |
device | A flag which indicates whether input/output arrays are allocated on the host (CPU) memory or the device (GPU) memory. |
Size of hist, allocated by the caller, must be sizeof(float)*xbins*ybins.
When the function is being called inside a loop or multiple times, for best performance allocate the input and output arrays on device memory to avoid unnecessary allocation, memory transfers and deallocation by the function.
When device flag is set, the caller needs to allocate memory for hist but does not need to initialize the array. The initialization will be done by the function itself.
void cudaHist2Db | ( | float * | src1, | |
float * | src2, | |||
float * | hist, | |||
int | length, | |||
int | xbins, | |||
int | ybins, | |||
cudaHistOptions * | p_options = NULL , |
|||
bool | device = false | |||
) |
Calculates a 2D (joint) histogram based on the second method described in:
R. Shams and R. A. Kennedy, "Efficient histogram algorithms for NVIDIA CUDA compatible devices," Proc. Int. Conf. on Signal Processing and Communications Systems (ICSPCS), Gold Coast, Australia, Dec. 2007, pp. 418-422.
src1 | Pointer to the input array where the data is stored. | |
src2 | Pointer to the input array where the data is stored. | |
hist | Pointer to the output array where the computed histogram is to be stored. Output array must be allocated and freed by the caller. | |
length | Number of the input array's elements. Both input arrays must have the same length. | |
xbins | Number of the histogram bins along the x-axis of the 2D histogram. | |
ybins | Number of the histogram bins along the y-axis of the 2D histogram. | |
p_options | A structure which defines the execution configuration. | |
device | A flag which indicates whether input/output arrays are allocated on the host (CPU) memory or the device (GPU) memory. |
Size of hist, allocated by the caller, must be sizeof(float)*xbins*ybins.
When the function is being called inside a loop or multiple times, for best performance allocate the input and output arrays on device memory to avoid unnecessary allocation, memory transfers and deallocation by the function.
When device flag is set, the caller needs to allocate memory for hist but does not need to initialize the array. The initialization will be done by the function itself.
Input data must be normalized between 0 and 1. The behavior of the function for values outside this range is undefined and is most likely to cause memory corruption.
double cudaHist_Approx | ( | float * | src, | |
float * | hist, | |||
int | length, | |||
int | bins, | |||
cudaHistOptions * | p_options = NULL , |
|||
bool | device = false | |||
) |
Calculates a 1D histogram based on method described in:
R. Shams and N. Barnes, "Speeding up mutual information computation using NVIDIA CUDA hardware," Proc. Digital Image Computing: Techniques and Applications (DICTA), Adelaide, Australia, Dec. 2007, pp. 555-560.
src | Pointer to the input array where the data is stored. The input values must be between 0 and 1. | |
hist | Pointer to the output array where the computed histogram is to be stored. Output array must be allocated and freed by the caller. | |
length | Number of the input array's elements. | |
bins | Number of the histogram bins or output array's elements. | |
p_options | A structure which defines the execution configuration. | |
device | A flag which indicates whether input/output arrays are allocated on the host (CPU) memory or the device (GPU) memory. |
When device flag is set, the caller needs to allocate memory for hist but does not need to initialize the array. The initialization will be done by the function itself.
Input data must be normalized between 0 and 1. The behavior of the function for values outside this range is undefined and is most likely to cause memory corruption.
double cudaHista | ( | float * | src, | |
float * | hist, | |||
int | length, | |||
int | bins, | |||
cudaHistOptions * | p_options = NULL , |
|||
bool | device = false | |||
) |
Calculates a 1D histogram based on the first method described in:
R. Shams and R. A. Kennedy, "Efficient histogram algorithms for NVIDIA CUDA compatible devices," Proc. Int. Conf. on Signal Processing and Communications Systems (ICSPCS), Gold Coast, Australia, Dec. 2007, pp. 418-422.
src | Pointer to the input array where the data is stored. The input values must be between 0 and 1. | |
hist | Pointer to the output array where the computed histogram is to be stored. Output array must be allocated and freed by the caller. | |
length | Number of the input array's elements. | |
bins | Number of the histogram bins or output array's elements. | |
p_options | A structure which defines the execution configuration. | |
device | A flag which indicates whether input/output arrays are allocated on the host (CPU) memory or the device (GPU) memory. |
When device flag is set, the caller needs to allocate memory for hist but does not need to initialize the array. The initialization will be done by the function itself.
Input data must be normalized between 0 and 1. The behavior of the function for values outside this range is undefined and is most likely to cause memory corruption.
double cudaHistb | ( | float * | src, | |
float * | hist, | |||
int | length, | |||
int | bins, | |||
cudaHistOptions * | p_options = NULL , |
|||
bool | device = false | |||
) |
Calculates a 1D histogram based on the second method described in:
R. Shams and R. A. Kennedy, "Efficient histogram algorithms for NVIDIA CUDA compatible devices," Proc. Int. Conf. on Signal Processing and Communications Systems (ICSPCS), Gold Coast, Australia, Dec. 2007, pp. 418-422.
src | Pointer to the input array where the data is stored. The input values must be between 0 and 1. | |
hist | Pointer to the output array where the computed histogram is to be stored. Output array must be allocated and freed by the caller. | |
length | Number of the input array's elements. | |
bins | Number of the histogram bins or output array's elements. | |
p_options | A structure which defines the execution configuration. | |
device | A flag which indicates whether input/output arrays are allocated on the host (CPU) memory or the device (GPU) memory. |
When device flag is set, the caller needs to allocate memory for hist but does not need to initialize the array. The initialization will be done by the function itself.
Input data must be normalized between 0 and 1. The behavior of the function for values outside this range is undefined and is most likely to cause memory corruption.