RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
RAJA::WorkPool< WORKGROUP_POLICY_T, INDEX_T, EXTRA_ARGS_T, ALLOCATOR_T > Struct Template Reference

WorkPool class template. More...

#include <WorkGroup.hpp>

Detailed Description

template<typename WORKGROUP_POLICY_T, typename INDEX_T, typename EXTRA_ARGS_T, typename ALLOCATOR_T>
struct RAJA::WorkPool< WORKGROUP_POLICY_T, INDEX_T, EXTRA_ARGS_T, ALLOCATOR_T >

WorkPool class template.

The WorkPool object is the first member of the workgroup constructs. It takes loops via enqueue and stores the loops so the loops can be run later. The WorkPool creates a WorkGroup object with the enqueued collection of loops via instantiate. The WorkPool can then be reused to enqueue more loops. The WorkPool attempts to optimize storage usage by remembering the max number of loops and the max storage size previously used and automatically reserving that amount when it is reused.

Usage example:

  WorkPool<WorkGroup_policy, Index_type, xargs<>, Allocator> pool(allocator);

  Real_ptr data = ...;

  pool.enqueue( ..., [=] (Index_type i) {
     data[i] = 1;
  });

  WorkGroup<WorkGroup_policy, Index_type, xargs<>, Allocator> group =
pool.instantiate();

* 

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