HPX - High Performance ParalleX

PrevUpHomeNext

Function template fill

hpx::parallel::v1::fill

Synopsis

// In header: <hpx/parallel/detail/fill.hpp>


template<typename ExPolicy, typename InIter, typename T> 
  unspecified fill(ExPolicy && policy, InIter first, InIter last, T value);

Description

Assigns the given value to the elements in the range [first, last).

[Note] Note

Complexity: Performs exactly last - first assignments.

The comparisons in the parallel fill algorithm invoked with an execution policy object of type sequential_execution_policy execute in sequential order in the calling thread.

The comparisons in the parallel fill algorithm invoked with an execution policy object of type parallel_execution_policy or task_execution_policy are permitted to execute in an unordered fashion in unspecified threads, and indeterminately sequenced within each thread.

Parameters:

first

Refers to the beginning of the sequence of elements the algorithm will be applied to.

last

Refers to the end of the sequence of elements the algorithm will be applied to.

policy

The execution policy to use for the scheduling of the iterations.

value

The value to be assigned.

Template Parameters:

ExPolicy

The type of the execution policy to use (deduced). It describes the manner in which the execution of the algorithm may be parallelized and the manner in which it executes the assignments.

InIter

The type of the source iterators used (deduced). This iterator type must meet the requirements of an input iterator.

T

The type of the value to be assigned (deduced).

Returns:

The fill algorithm returns a hpx::future<void> if the execution policy is of type task_execution_policy and returns difference_type otherwise (where difference_type is defined by void.


PrevUpHomeNext