Template Struct t8_search_with_batched_queries
Defined in File t8_forest_search.hxx
Inheritance Relationships
Base Type
public t8_search< void >(Template Struct t8_search)
Struct Documentation
-
template<typename Query_T, typename Udata = void>
struct t8_search_with_batched_queries : public t8_search<void> A class that performs a search in a forest with batched queries.
All active queries are passed to the callback function, which processes them in a batch. It is recommended to use this version of the searcch if further computations have to be done to evaluate the queries. That way these precomputations are not done for every call to the callback again and only have to be evaluated once per call.
- Template Parameters:
Query_T – The type of queries
Udata – The type of the user data, defaults to void.
Public Functions
-
inline t8_search_with_batched_queries(t8_search_element_callback<Udata> element_callback, t8_search_batched_queries_callback<Query_T, Udata> queries_callback, std::vector<Query_T> &queries, const t8_forest_t forest = nullptr, Udata *user_data = nullptr)
Constructor for the t8_search_with_batched_queries class.
- Parameters:
element_callback – [in] A callback function to be called for each element during the search.
queries_callback – [in] A callback function to be called for processing batched queries.
queries – [in] A reference to a vector of queries to be processed.
forest – [in] A pointer to the forest to be searched. Defaults to nullptr
user_data – [in] A pointer to user-defined data to be passed to the callback function. Defaults to nullptr.
-
inline void update_queries(std::vector<Query_T> &queries)
Update the queries for the search.
- Parameters:
queries – [in] A reference to a vector of queries to be processed.
-
virtual ~t8_search_with_batched_queries() = default
Destructor for the t8_search_with_batched_queries class.