|
AndroMeta
2.0.0
|
MPLLocality is highly optimized for finding pairs of objects which are "positioned" within some "distance" d relative to an arbitrary attribute field of MPLObject's. More...
#include <MPLLocality.h>
Public Member Functions | |
| MPLLocality (size_t threads=0) | |
| ~MPLLocality () | |
| template<typename T > | |
| void | compile (MVector< T > &ov, size_t maxPerObject, const mstr &location, const mstr &radius) |
| template<typename T > | |
| void | compile (std::vector< T > &ov, size_t maxPerObject, const mstr &location, const mstr &radius) |
| void | compile (MPLObject **ov, size_t count, size_t maxPerObject, const mstr &location, const mstr &radius) |
| void | run (MPLPairVec &v, float distance) |
| void | run (mnode &n, float distance) |
MPLLocality is highly optimized for finding pairs of objects which are "positioned" within some "distance" d relative to an arbitrary attribute field of MPLObject's.
| Meta::MPLLocality::MPLLocality | ( | size_t | threads = 0 | ) |
Constructor.
| threads | The number of threads in which to process pairs with. If you intend to collect pairs in a pair vector, then this should be set to 0, else code is executed for each pair that is found. |
Destructor.
| void Meta::MPLLocality::compile | ( | MVector< T > & | ov, |
| size_t | maxPerObject, | ||
| const mstr & | location, | ||
| const mstr & | radius | ||
| ) | [inline] |
Compile locality detection code for objects in ov.
| maxPerObject | The maximum number of pairs that will be collected per each object in ov. This should be set to a value as high as memory on the GPU permits. |
| location | The name of the location attribute on objects in ov. |
| radius | The name of the radius attribute on objects in ov. |
| void Meta::MPLLocality::compile | ( | std::vector< T > & | ov, |
| size_t | maxPerObject, | ||
| const mstr & | location, | ||
| const mstr & | radius | ||
| ) | [inline] |
See the previous definition for compile().
| void Meta::MPLLocality::compile | ( | MPLObject ** | ov, |
| size_t | count, | ||
| size_t | maxPerObject, | ||
| const mstr & | location, | ||
| const mstr & | radius | ||
| ) |
See the previous definition for compile().
| void Meta::MPLLocality::run | ( | MPLPairVec & | v, |
| float | distance | ||
| ) |
Run the locality kernel, collecting pairs of objects found such that they are within the specified distance of eachother.
| void Meta::MPLLocality::run | ( | mnode & | n, |
| float | distance | ||
| ) |
Run the locality kernel, executing the code in n on each pair of objects found such that they are within the specified distance of eachother.
1.7.6.1