Skip to content

ArborX::BoundingVolumeHierarchy::query

Damien L-G edited this page May 10, 2020 · 9 revisions

ArborX / ArborX::BVH

ArborX::BVH<MemorySpace>::query()

template <typename ExecutionSpace, typename Predicates>
void query(ExecutionSpace const& space, Predicates const& predicates, ...) const;

Parameters

space : Execution space that specifies where to execute code.
predicates : Predicates to check against the primitives.

Type requirements

A specialization of ArborX::AccessTraits must match the Predicates as first template argument and PredicatesTag as second argument.
The static member function ArborX::AccessTraits<Predicates,PredicatesTag>::get() return type must decay to a valid ArborX predicate.
Such predicate may be generated by one of the functions listed below:

indices : position of the primitives that satisfy the predicates.
offsets : predicate offsets in indices.

indices stores the indices of the objects that satisfy the predicates. offset stores the locations in the indices view that start a predicate, that is, predicates(q) is satisfied by indices(o) for primitives(q) <= o < primitives(q+1). Following the usual convention, offset(n) = nnz, where n is the number of queries that were performed and nnz is the total number of collisions.

Return value

(none)

Complexity

$O(M log(N)$ where M = ArborX::AccessTraits<Predicates,PredicatesTag>::size(predicates) and N = this->size().

Exceptions

Memory allocation with Kokkos may throw.

Notes

Example

See also

Clone this wiki locally