34 #ifndef __CudaSurface_H 35 #define __CudaSurface_H 53 #include <cuda_runtime.h> 54 #include <driver_types.h> 56 #include <boost/shared_array.hpp> 64 if (err != cudaSuccess) {
65 printf(
"%s in %s at line %d\n", cudaGetErrorString( err ),
70 #define HANDLE_ERROR( err ) (HandleError( err, __FILE__, __LINE__ )) 72 using Vec = BaseVector<float>;
73 typedef boost::shared_array<float>
floatArr;
88 CudaSurface(floatArr& points,
size_t num_points,
int device=0 );
177 int max_mem_shared,
int max_threads_per_block,
178 int& out_blocks_per_grid,
int& out_threads_per_block,
int& needed_shared_memory);
180 template <
typename T>
183 template <
typename T>
186 template <
typename T>
230 #endif // !__CudaSurface_H
void calculateBlocksThreads(int n, int elements, int element_size, int max_mem_shared, int max_threads_per_block, int &out_blocks_per_grid, int &out_threads_per_block, int &needed_shared_memory)
void calculateNormals()
Starts calculation the normals on GPU.
void setFlippoint(float v_x, float v_y, float v_z)
Set the viewpoint to orientate the normals.
LBPointArray< float > D_Normals
CudaSurface(LBPointArray< float > &points, int device=0)
Constructor.
LBPointArray< float > D_kd_tree_values
unsigned long long m_device_global_memory
QueryPoint< Vec > QueryPointC
void setKd(int kd)
Set the number of k nearest neighbors k-neighborhood for distance.
void getCudaInformation(int device)
static void HandleError(cudaError_t err, const char *file, int line)
void interpolateNormals()
LBPointArray< float > * kd_tree_values
ColorVertex< float, unsigned char > cVertex
LBPointArray< unsigned char > * kd_tree_splits
bool m_reconstruction_mode
LBPointArray< unsigned char > D_kd_tree_splits
void setReconstructionMode(bool mode=true)
A query Vector for marching cubes reconstructions. It represents a Vector in space together with a 'd...
void setKn(int kn)
Set the number of k nearest neighbors k-neighborhood.
void getNormals(LBPointArray< float > &output_normals)
Get the resulting normals of the normal calculation. After calling "start".
void setKi(int ki)
Set the number of k nearest neighbors k-neighborhood for interpolation.
boost::shared_array< float > floatArr
void distances(std::vector< QueryPoint< Vec > > &query_points, float voxel_size)
LBPointArray< float > D_V
LBPointArray< float > Result_Normals
void copyToDevicePointArray(LBPointArray< T > *m, LBPointArray< T > &D_m)
void setMethod(std::string &method)
Set Method for normal calculation.
boost::shared_ptr< LBKdTree > kd_tree_gen
void generateDevicePointArray(LBPointArray< T > &D_m, int width, int dim)
int * m_size_thread_block
void copyToHostPointArray(LBPointArray< float > &D_m, LBPointArray< float > *m)