3dpcp/.svn/pristine/2c/2c83bd6539eb0cbc18ce20b76e7508fe75c3e7e4.svn-base
2012-11-13 09:12:22 +01:00

46 lines
976 B
Text

/**
* @file
* @brief Representation of the parameter of a k-d tree
* @author Andreas Nuechter. Institute of Computer Science, University of Osnabrueck, Germany.
*/
#ifndef __KDPARAMS_H__
#define __KDPARAMS_H__
/**
* @brief Contains the intermediate (static) values of a k-d tree or a cached k-d tree
*
* A parameter class for the latter k-d tree.
* Includes the padding for parallelizetion
* to avoid cache conflicts.
**/
class KDParams
{
public:
/**
* pointer to the closest point. size = 4 bytes of 32 bit machines
*/
double *closest;
/**
* distance to the closest point. size = 8 bytes
*/
double closest_d2;
/**
* pointer to the point, size = 4 bytes of 32 bit machines
*/
double *p;
/**
* pointer to direction vector, if we're using FindClosestAlongDir
*/
double *dir;
/**
* expand to 128 bytes to avoid false-sharing, 16 bytes from above + 28*4 bytes = 128 bytes
*/
int padding[28];
};
#endif