GpuIntegralImage_kernel.hGo to the documentation of this file.00001 /* 00002 Copyright (c) 2010, Paul Furgale and Chi Hay Tong 00003 All rights reserved. 00004 00005 Redistribution and use in source and binary forms, with or without 00006 modification, are permitted provided that the following conditions are 00007 met: 00008 00009 * Redistributions of source code must retain the above copyright notice, 00010 this list of conditions and the following disclaimer. 00011 * Redistributions in binary form must reproduce the above copyright 00012 notice, this list of conditions and the following disclaimer in the 00013 documentation and/or other materials provided with the distribution. 00014 * The names of its contributors may not be used to endorse or promote 00015 products derived from this software without specific prior written 00016 permission. 00017 00018 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00019 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 00020 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 00021 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 00022 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00023 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00024 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00026 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00027 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00028 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00029 */ 00030 00031 #ifndef ASRL_GPU_INTEGRAL_IMAGE_KERNEL 00032 #define ASRL_GPU_INTEGRAL_IMAGE_KERNEL 00033 00034 #include <cuda_runtime_api.h> 00035 #include <cudpp.h> 00036 00037 // Matrix transpose block dimension 00038 #define ASRL_TRANSPOSE_BLOCK_DIM 16 00039 00040 namespace asrl { 00041 00058 void call_integral_kernel(size_t width, size_t height, 00059 unsigned char * char_data, 00060 float *norm_data, 00061 float *trans_data, 00062 cudaArray *output_int_img, 00063 size_t norm_pitch, 00064 size_t trans_pitch, 00065 size_t char_pitch, 00066 CUDPPHandle & rowPlan, 00067 CUDPPHandle & colPlan, 00068 cudaStream_t stream); 00069 00082 void run_transpose_kernel_uchar(dim3 grid, dim3 block, float *odata, size_t o_pitch, unsigned char *idata, size_t i_pitch, size_t width, size_t height); 00083 00096 void run_transpose_kernel_float(dim3 grid, dim3 block, float *odata, size_t o_pitch, float *idata, size_t i_pitch, size_t width, size_t height); 00097 00098 } // namespace asrl 00099 00100 #endif // ASRL_GPU_INTEGRAL_IMAGE_KERNEL Generated on Fri Apr 30 20:06:19 2010 for gpusurf by 1.6.2 |