GpuIntegralImage.hppGo to the documentation of this file.00001 00013 /* 00014 Copyright (c) 2010, Paul Furgale and Chi Hay Tong 00015 All rights reserved. 00016 00017 Redistribution and use in source and binary forms, with or without 00018 modification, are permitted provided that the following conditions are 00019 met: 00020 00021 * Redistributions of source code must retain the above copyright notice, 00022 this list of conditions and the following disclaimer. 00023 * Redistributions in binary form must reproduce the above copyright 00024 notice, this list of conditions and the following disclaimer in the 00025 documentation and/or other materials provided with the distribution. 00026 * The names of its contributors may not be used to endorse or promote 00027 products derived from this software without specific prior written 00028 permission. 00029 00030 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00031 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 00032 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 00033 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 00034 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00035 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00036 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00037 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00038 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00039 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00040 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00041 */ 00042 00043 00044 #ifndef ASRL_GPU_INTEGRAL_IMAGE 00045 #define ASRL_GPU_INTEGRAL_IMAGE 00046 00047 #include <boost/shared_ptr.hpp> 00048 #include "CudaSynchronizedMemory.hpp" 00049 // Forward declarations. 00050 struct cudaArray; 00051 00052 namespace asrl { 00053 00064 class GpuIntegralImage { 00065 public: 00066 00073 GpuIntegralImage(int width, int height); 00074 00079 ~GpuIntegralImage(); 00080 00085 cudaArray * d_get(); 00086 00091 float * h_get(); 00092 00097 int width(); 00098 00103 int height(); 00104 private: 00106 int m_width; 00107 00109 int m_height; 00110 00112 boost::shared_ptr<cudaArray> m_cudaArray; 00113 00115 CudaSynchronizedMemory<float> m_buffer; 00116 }; 00117 00118 } // namespace asrl 00119 00120 #endif // ASRL_GPU_INTEGRAL_IMAGE Generated on Fri Apr 30 20:06:19 2010 for gpusurf by 1.6.2 |