00001
00002 #ifndef eman__cuda_util_h__
00003 #define eman__cuda_util_h__ 1
00004
00005
00009 void device_init();
00010
00013 struct EMDataForCuda {
00014 float * data;
00015 int nx;
00016 int ny;
00017 int nz;
00018 };
00019
00020
00021 int* calc_max_location_wrap_cuda(const EMDataForCuda* data, const int maxdx, const int maxdy, const int maxdz);
00022
00023 void cut_slice_cuda_(const EMDataForCuda* data,const float* const);
00024
00025 cudaArray* get_cuda_array_host(const float * const data,const int nx, const int ny, const int nz);
00026
00027 cudaArray* get_cuda_array_device(const float * const data,const int nx, const int ny, const int nz);
00028
00029 void bind_cuda_array_to_texture( const cudaArray* const array, const int ndims, const bool interp_mode);
00030
00031 void unbind_cuda_texture(const int ndims);
00032
00033 void emdata_column_sum(const EMDataForCuda* sum_target,const int ny);
00034
00035 #endif // eman__cuda_util_h__
00036
00037
00038
00039