Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

cuda_util.h

Go to the documentation of this file.
00001 
00002 #ifndef eman__cuda_util_h__
00003 #define eman__cuda_util_h__ 1
00004 
00005 // Various utility functions
00009 bool device_init();
00010 
00013 struct EMDataForCuda {
00014         float * data; // Cuda device pointer
00015         int nx; // Number of pixels in the x dimension
00016         int ny; // Number of pixels in the y dimension
00017         int nz; // Number of pixels in the z dimension
00018 };
00019 
00020 struct CudaPeakInfo {
00021         int px;
00022         int py;
00023         int pz;
00024         float peak;
00025 };
00026 
00027 struct CudaPeakInfoFloat {
00028         float xintp;
00029         float yintp;
00030         float zintp;
00031         float peak;
00032 };
00033 
00034 bool copy_to_array(const float * data, cudaArray * array, const int nx, const int ny, const int n, const cudaMemcpyKind memkindz);
00035 
00036 //int* calc_max_location_wrap_cuda(const EMDataForCuda* data, const int maxdx, const int maxdy, const int maxdz);
00037 
00038 //void cut_slice_cuda_(const EMDataForCuda* data,const float* const);
00039 
00040 cudaArray* get_cuda_array(const int nx, const int ny, const int nz);
00041 
00042 void bind_cuda_array_to_textureA( const cudaArray* const array, const int ndims, const bool interp_mode);
00043 
00044 void unbind_cuda_textureA(const int ndims);
00045 
00046 void bind_cuda_array_to_textureB( const cudaArray* const array, const int ndims, const bool interp_mode);
00047 
00048 void unbind_cuda_textureB(const int ndims);
00049 
00050 float get_edgemean_cuda(const float* data, const int nx, const int ny, const int nz);
00051 
00052 void to_value_cuda(float* data, const float value, const int nx, const int ny, const int nz);
00053 
00054 void to_zero_cuda(float* data, const int nx, const int ny, const int nz);
00055 
00056 #endif // eman__cuda_util_h__
00057 
00058 
00059 
00060 

Generated on Tue Jul 12 13:48:57 2011 for EMAN2 by  doxygen 1.3.9.1