AndroMeta  2.0.0
Public Member Functions
Meta::MPLLocality Class Reference

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>

List of all members.

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)

Detailed Description

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.


Constructor & Destructor Documentation

Meta::MPLLocality::MPLLocality ( size_t  threads = 0)

Constructor.

Parameters:
threadsThe 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.


Member Function Documentation

template<typename T >
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.

Parameters:
maxPerObjectThe 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.
locationThe name of the location attribute on objects in ov.
radiusThe name of the radius attribute on objects in ov.
template<typename T >
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.


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