00001 /*************************************************************************** 00002 *cr 00003 *cr (C) Copyright 1995-2019 The Board of Trustees of the 00004 *cr University of Illinois 00005 *cr All Rights Reserved 00006 *cr 00007 ***************************************************************************/ 00008 /*************************************************************************** 00009 * RCS INFORMATION: 00010 * 00011 * $RCSfile: CUDAGaussianBlur.h,v $ 00012 * $Author: johns $ $Locker: $ $State: Exp $ 00013 * $Revision: 1.7 $ $Date: 2020年02月26日 20:31:15 $ 00014 * 00015 ***************************************************************************/ 00024 #ifndef CUDA_GAUSSIAN_BLUR 00025 #define CUDA_GAUSSIAN_BLUR 00026 00027 void gaussian3D_cuda(float* kernel, int kernel_size); 00028 00029 template <typename IMAGE_T> 00030 bool setup_cuda_filter(IMAGE_T* image, int w, int h, int d); 00031 00032 void copy_array_from_gpu(void* arr, void* arr_d, int bytes); 00033 00034 void copy_array_to_gpu(void* arr_d, void* arr, int bytes); 00035 00036 template <typename IMAGE_T> 00037 void gaussian1D_x_cuda(IMAGE_T* src_d, IMAGE_T* dst_d, int kernel_size, 00038 int width, int height, int depth); 00039 00040 template <typename IMAGE_T> 00041 void gaussian1D_y_cuda(IMAGE_T* src_d, IMAGE_T* dst_d, int kernel_size, 00042 int width, int height, int depth); 00043 00044 template <typename IMAGE_T> 00045 void gaussian1D_z_cuda(IMAGE_T* src_d, IMAGE_T* dst_d, int kernel_size, 00046 int width, int height, int depth); 00047 00048 void set_gaussian_1D_kernel_cuda(float* kernel, int kernel_size); 00049 00050 void* alloc_cuda_array(int bytes); 00051 00052 void free_cuda_array(void* arr); 00053 00054 #endif