Intel® C++ Compiler 16.0 User and Reference Guide

Introduction to Reducers

Reducers address the problem of computing a value by incrementally updating a variable in parallel code without data races on that variable. Conceptually, a reducer is a variable that can be safely used by multiple strands running in parallel. The runtime ensures that each worker has access to a private copy of the variable, eliminating the possibility of races without requiring locks. When the strands synchronize, the variable instances are merged—or reduced—into a single variable.

Reducers have several attractive properties:

Reducers are defined by writing C++ templates that provide an interface to the runtime system.

At some point, you may want to write your own reducer. Advanced Topic: How to Write a New Reducer provides more information.