Public Member Functions | Private Member Functions | Private Attributes | List of all members
lvr2::CudaSurface Class Reference

#include <CudaSurface.hpp>

Public Member Functions

void calculateNormals ()
 Starts calculation the normals on GPU. More...
 
 CudaSurface (floatArr &points, size_t num_points, int device=0)
 
 CudaSurface (LBPointArray< float > &points, int device=0)
 Constructor. More...
 
void distances (std::vector< QueryPoint< Vec > > &query_points, float voxel_size)
 
void freeGPU ()
 
void getNormals (floatArr output_normals)
 
void getNormals (LBPointArray< float > &output_normals)
 Get the resulting normals of the normal calculation. After calling "start". More...
 
void interpolateNormals ()
 
void setFlippoint (float v_x, float v_y, float v_z)
 Set the viewpoint to orientate the normals. More...
 
void setKd (int kd)
 Set the number of k nearest neighbors k-neighborhood for distance. More...
 
void setKi (int ki)
 Set the number of k nearest neighbors k-neighborhood for interpolation. More...
 
void setKn (int kn)
 Set the number of k nearest neighbors k-neighborhood. More...
 
void setMethod (std::string &method)
 Set Method for normal calculation. More...
 
void setReconstructionMode (bool mode=true)
 
 ~CudaSurface ()
 

Private Member Functions

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)
 
template<typename T >
void copyToDevicePointArray (LBPointArray< T > &m, LBPointArray< T > &D_m)
 
template<typename T >
void copyToDevicePointArray (LBPointArray< T > *m, LBPointArray< T > &D_m)
 
void copyToHostPointArray (LBPointArray< float > &D_m, LBPointArray< float > *m)
 
template<typename T >
void generateDevicePointArray (LBPointArray< T > &D_m, int width, int dim)
 
void getCudaInformation (int device)
 
void GPU_NN ()
 
void init ()
 
void initKdTree ()
 
void printSettings ()
 

Private Attributes

LBPointArray< unsigned char > D_kd_tree_splits
 
LBPointArray< float > D_kd_tree_values
 
LBPointArray< float > D_Normals
 
LBPointArray< float > D_V
 
boost::shared_ptr< LBKdTreekd_tree_gen
 
LBPointArray< unsigned char > * kd_tree_splits
 
LBPointArray< float > * kd_tree_values
 
int m_calc_method
 
int m_device
 
unsigned long long m_device_global_memory
 
int m_k
 
int m_kd
 
int m_ki
 
int m_mps
 
bool m_reconstruction_mode
 
int * m_size_grid
 
int * m_size_thread_block
 
int m_threads_per_block
 
int m_threads_per_mp
 
float m_vx
 
float m_vy
 
float m_vz
 
LBPointArray< float > Result_Normals
 
LBPointArray< float > V
 

Detailed Description

Definition at line 78 of file CudaSurface.hpp.

Constructor & Destructor Documentation

◆ CudaSurface() [1/2]

lvr2::CudaSurface::CudaSurface ( LBPointArray< float > &  points,
int  device = 0 
)

Constructor.

Parameters
pointsInput Pointcloud for kd-tree construction

◆ CudaSurface() [2/2]

lvr2::CudaSurface::CudaSurface ( floatArr points,
size_t  num_points,
int  device = 0 
)

◆ ~CudaSurface()

lvr2::CudaSurface::~CudaSurface ( )

Member Function Documentation

◆ calculateBlocksThreads()

void lvr2::CudaSurface::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 
)
private

◆ calculateNormals()

void lvr2::CudaSurface::calculateNormals ( )

Starts calculation the normals on GPU.

◆ copyToDevicePointArray() [1/2]

template<typename T >
void lvr2::CudaSurface::copyToDevicePointArray ( LBPointArray< T > &  m,
LBPointArray< T > &  D_m 
)
private

◆ copyToDevicePointArray() [2/2]

template<typename T >
void lvr2::CudaSurface::copyToDevicePointArray ( LBPointArray< T > *  m,
LBPointArray< T > &  D_m 
)
private

◆ copyToHostPointArray()

void lvr2::CudaSurface::copyToHostPointArray ( LBPointArray< float > &  D_m,
LBPointArray< float > *  m 
)
private

◆ distances()

void lvr2::CudaSurface::distances ( std::vector< QueryPoint< Vec > > &  query_points,
float  voxel_size 
)

TODO: Implement

◆ freeGPU()

void lvr2::CudaSurface::freeGPU ( )

◆ generateDevicePointArray()

template<typename T >
void lvr2::CudaSurface::generateDevicePointArray ( LBPointArray< T > &  D_m,
int  width,
int  dim 
)
private

◆ getCudaInformation()

void lvr2::CudaSurface::getCudaInformation ( int  device)
private

◆ getNormals() [1/2]

void lvr2::CudaSurface::getNormals ( floatArr  output_normals)

◆ getNormals() [2/2]

void lvr2::CudaSurface::getNormals ( LBPointArray< float > &  output_normals)

Get the resulting normals of the normal calculation. After calling "start".

Parameters
output_normalsPointArray as return value

◆ GPU_NN()

void lvr2::CudaSurface::GPU_NN ( )
private

◆ init()

void lvr2::CudaSurface::init ( )
private

◆ initKdTree()

void lvr2::CudaSurface::initKdTree ( )
private

◆ interpolateNormals()

void lvr2::CudaSurface::interpolateNormals ( )

◆ printSettings()

void lvr2::CudaSurface::printSettings ( )
private

◆ setFlippoint()

void lvr2::CudaSurface::setFlippoint ( float  v_x,
float  v_y,
float  v_z 
)

Set the viewpoint to orientate the normals.

Parameters
v_xCoordinate X axis
v_yCoordinate Y axis
v_zCoordinate Z axis

◆ setKd()

void lvr2::CudaSurface::setKd ( int  kd)

Set the number of k nearest neighbors k-neighborhood for distance.

Parameters
kThe size of the used k-neighborhood

◆ setKi()

void lvr2::CudaSurface::setKi ( int  ki)

Set the number of k nearest neighbors k-neighborhood for interpolation.

Parameters
kThe size of the used k-neighborhood

◆ setKn()

void lvr2::CudaSurface::setKn ( int  kn)

Set the number of k nearest neighbors k-neighborhood.

Parameters
kThe size of the used k-neighborhood

◆ setMethod()

void lvr2::CudaSurface::setMethod ( std::string &  method)

Set Method for normal calculation.

Parameters
method"PCA","RANSAC"

◆ setReconstructionMode()

void lvr2::CudaSurface::setReconstructionMode ( bool  mode = true)

Reconstuction Mode: Points stay in gpu until reconstruction is finished

Member Data Documentation

◆ D_kd_tree_splits

LBPointArray<unsigned char> lvr2::CudaSurface::D_kd_tree_splits
private

Definition at line 223 of file CudaSurface.hpp.

◆ D_kd_tree_values

LBPointArray<float> lvr2::CudaSurface::D_kd_tree_values
private

Definition at line 222 of file CudaSurface.hpp.

◆ D_Normals

LBPointArray<float> lvr2::CudaSurface::D_Normals
private

Definition at line 224 of file CudaSurface.hpp.

◆ D_V

LBPointArray<float> lvr2::CudaSurface::D_V
private

Definition at line 221 of file CudaSurface.hpp.

◆ kd_tree_gen

boost::shared_ptr<LBKdTree> lvr2::CudaSurface::kd_tree_gen
private

Definition at line 203 of file CudaSurface.hpp.

◆ kd_tree_splits

LBPointArray<unsigned char>* lvr2::CudaSurface::kd_tree_splits
private

Definition at line 200 of file CudaSurface.hpp.

◆ kd_tree_values

LBPointArray<float>* lvr2::CudaSurface::kd_tree_values
private

Definition at line 199 of file CudaSurface.hpp.

◆ m_calc_method

int lvr2::CudaSurface::m_calc_method
private

Definition at line 209 of file CudaSurface.hpp.

◆ m_device

int lvr2::CudaSurface::m_device
private

Definition at line 213 of file CudaSurface.hpp.

◆ m_device_global_memory

unsigned long long lvr2::CudaSurface::m_device_global_memory
private

Definition at line 219 of file CudaSurface.hpp.

◆ m_k

int lvr2::CudaSurface::m_k
private

Definition at line 206 of file CudaSurface.hpp.

◆ m_kd

int lvr2::CudaSurface::m_kd
private

Definition at line 206 of file CudaSurface.hpp.

◆ m_ki

int lvr2::CudaSurface::m_ki
private

Definition at line 206 of file CudaSurface.hpp.

◆ m_mps

int lvr2::CudaSurface::m_mps
private

Definition at line 214 of file CudaSurface.hpp.

◆ m_reconstruction_mode

bool lvr2::CudaSurface::m_reconstruction_mode
private

Definition at line 210 of file CudaSurface.hpp.

◆ m_size_grid

int* lvr2::CudaSurface::m_size_grid
private

Definition at line 218 of file CudaSurface.hpp.

◆ m_size_thread_block

int* lvr2::CudaSurface::m_size_thread_block
private

Definition at line 217 of file CudaSurface.hpp.

◆ m_threads_per_block

int lvr2::CudaSurface::m_threads_per_block
private

Definition at line 216 of file CudaSurface.hpp.

◆ m_threads_per_mp

int lvr2::CudaSurface::m_threads_per_mp
private

Definition at line 215 of file CudaSurface.hpp.

◆ m_vx

float lvr2::CudaSurface::m_vx
private

Definition at line 205 of file CudaSurface.hpp.

◆ m_vy

float lvr2::CudaSurface::m_vy
private

Definition at line 205 of file CudaSurface.hpp.

◆ m_vz

float lvr2::CudaSurface::m_vz
private

Definition at line 205 of file CudaSurface.hpp.

◆ Result_Normals

LBPointArray<float> lvr2::CudaSurface::Result_Normals
private

Definition at line 202 of file CudaSurface.hpp.

◆ V

LBPointArray<float> lvr2::CudaSurface::V
private

Definition at line 198 of file CudaSurface.hpp.


The documentation for this class was generated from the following file:


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:27