Intel® C++ Compiler XE 13.1 User and Reference Guides

Reducer Library

The provided reducer library contains the reducers shown in the following table.

A description of each reducer is described in the comments that appear in the corresponding header file.

In the following table, the second column shows each reducer's identity element and the third column shows the Update operation (there may be several).

Reducer/Header File

Identity element

Update operation

Description

reducer_list_append

<cilk/reducer_list.h>

empty list

push_back()

Creates a list by appending elements at the back.

reducer_list_prepend

<cilk/reducer_list.h>

empty list

push_front()

Creates a list by adding elements at the front.

reducer_max

<cilk/reducer_max.h>

(implicit)

calc_max

cilk::max_of

Finds the maximum value over a set of values.

reducer_max_index

<cilk/reducer_max.h>

(implicit)

calc_max

cilk::max_of

Finds the maximum value and the index of the element containing the maximum value over a set of values.

reducer_min

<cilk/reducer_min.h>

(implicit)

calc_min

cilk::min_of

Finds the minimum value over a set of values.

reducer_min_index

<cilk/reducer_min.h>

(implicit)

calc_min

cilk::min_of

Finds the minimum value and the index of the element containing the minimum value over a set of values.

reducer_opadd

<cilk/reducer_opadd.h>

0

+, +=, ++, -, -=, --

Performs a sum.

reducer_opand

<cilk/reducer_opand.h>

~0

&, &=

Perform bitwise AND.

reducer_opor

<cilk/reducer_opor.h>

0

|, |=

Perform bitwise OR.

reducer_opxor

<cilk/reducer_opxor.h>

0

^, ^=

Perform bitwise XOR.

reducer_ostream

<cilk/reducer_ostream.h>

empty string

<<

Provides an output stream that can be written in parallel. In order to preserve a consistent order in the output stream, output is buffered by the reducer class until there is no more pending output to the left of the current position. This ensures that the output always appears in the same order as the output generated by the equivalent serial program.

reducer_basic_string

<cilk/reducer_string.h>

empty string

+=, append

Creates a string using append or += operations. Internally, the string is maintained as a list of substrings in order to minimize copying and memory fragmentation. The substrings are assembled into a single output string when get_value() is called.

reducer_string

<cilk/reducer_string.h>

empty string

+=, append

Provides a shorthand for a reducer_basic_string <char>.

reducer_wstring

<cilk/reducer_string.h>

empty string

+=, append

Provides a shorthand for a reducer_basic_string <wchar_t>.


Submit feedback on this help topic