cudaImage.h

00001 //********************************************************//
00002 // CUDA SIFT extractor by Marten Bjorkman aka Celebrandil //
00003 //********************************************************//
00004 
00005 #ifndef CUDAIMAGE_H
00006 #define CUDAIMAGE_H
00007 
00008 typedef struct {
00009   int width, height;
00010   int pitch;
00011   float *h_data;
00012   float *d_data;
00013   void *t_data; //cudaArray *t_data;
00014 } CudaImage;
00015 
00016 typedef CudaImage CudaArray;
00017 
00018 int iDivUp(int a, int b);
00019 int iDivDown(int a, int b);
00020 int iAlignUp(int a, int b);
00021 int iAlignDown(int a, int b);
00022 
00023 void StartTimer(unsigned int *hTimer);
00024 double StopTimer(unsigned int hTimer);
00025 double AllocCudaImage(CudaImage *img, int w, int h, int p,
00026                       bool host, bool dev);
00027 double FreeCudaImage(CudaImage *img);
00028 double Download(CudaImage *img);
00029 double Readback(CudaImage *img, int w = -1, int h = -1);
00030 double InitTexture(CudaImage *img);
00031 double CopyToTexture(CudaImage *src, CudaImage *dst, bool host);
00032 
00033 #endif // CUDAIMAGE_H
Generated on Sun May 8 08:40:37 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3