hpx::execution::experimental::guided_chunk_size#

Defined in header hpx/execution.hpp.

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx
namespace execution
namespace experimental
struct guided_chunk_size#
#include <guided_chunk_size.hpp>

Iterations are dynamically assigned to threads in blocks as threads request those until no blocks remain to be assigned. Similar to dynamic_chunk_size except that the block size decreases each time a number of loop iterations is given to a thread. The size of the initial block is proportional to number_of_iterations / number_of_cores. Subsequent blocks are proportional to number_of_iterations_remaining / number_of_cores. The optional chunk size parameter defines the minimum block size. The default chunk size is 1.

Note

This executor parameters type is equivalent to OpenMP’s GUIDED scheduling directive.

Public Functions

guided_chunk_size() = default#

Construct an dynamic_chunk_size executor parameters object

Note

Default constructed dynamic_chunk_size executor parameter types will use a chunk size of ‘1’.

inline explicit constexpr guided_chunk_size(std::size_t min_chunk_size) noexcept#

Construct a guided_chunk_size executor parameters object

Parameters

min_chunk_size – [in] The optional minimal chunk size to use as the minimal number of loop iterations to schedule together. The default minimal chunk size is 1.