tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction > Class Template Reference
Algorithms

Auxiliary class for parallel_reduce; for internal use only. More...

`#include <parallel_reduce.h>`

Collaboration diagram for tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >:

## Public Member Functions

| lambda_reduce_body (const Value &identity, const RealBody &body, const Reduction &reduction)
| lambda_reduce_body (const lambda_reduce_body &other)
| lambda_reduce_body (lambda_reduce_body &other, tbb::split)
void | operator() (Range &range)
void | join (lambda_reduce_body &rhs)
Value | result () const

## Private Member Functions

lambda_reduce_body & | operator= (const lambda_reduce_body &other)

## Private Attributes

const Value & | identity_element
const RealBody & | my_real_body
const Reduction & | my_reduction
Value | my_value

## Detailed Description

### template<typename Range, typename Value, typename RealBody, typename Reduction>
class tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >

Auxiliary class for parallel_reduce; for internal use only.

The adaptor class that implements parallel_reduce Body using given anonymous function objects.

Definition at line 295 of file parallel_reduce.h.

## Constructor & Destructor Documentation

## lambda_reduce_body() [1/3]

template<typename Range , typename Value , typename RealBody , typename Reduction >

tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::lambda_reduce_body | ( | const Value & | identity,
|  | const RealBody & | body,
|  | const Reduction & | reduction
| ) |  |

inline

Definition at line 306 of file parallel_reduce.h.

: identity_element(identity)
, my_real_body(body)
, my_reduction(reduction)
, my_value(identity)
{ }
tbb::internal::lambda_reduce_body::my_reduction
const Reduction & my_reduction
Definition: parallel_reduce.h:302
tbb::internal::lambda_reduce_body::my_real_body
const RealBody & my_real_body
Definition: parallel_reduce.h:301
tbb::internal::lambda_reduce_body::identity_element
const Value & identity_element
Definition: parallel_reduce.h:300
tbb::internal::lambda_reduce_body::my_value
Value my_value
Definition: parallel_reduce.h:303

## lambda_reduce_body() [2/3]

template<typename Range , typename Value , typename RealBody , typename Reduction >

tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::lambda_reduce_body | ( | const lambda_reduce_body< Range, Value, RealBody, Reduction > & | other | ) |

inline

Definition at line 312 of file parallel_reduce.h.

: identity_element(other.identity_element)
, my_real_body(other.my_real_body)
, my_reduction(other.my_reduction)
, my_value(other.my_value)
{ }

## lambda_reduce_body() [3/3]

template<typename Range , typename Value , typename RealBody , typename Reduction >

tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::lambda_reduce_body | ( | lambda_reduce_body< Range, Value, RealBody, Reduction > & | other,
|  | tbb::split |
| ) |  |

inline

Definition at line 318 of file parallel_reduce.h.

: identity_element(other.identity_element)
, my_real_body(other.my_real_body)
, my_reduction(other.my_reduction)
, my_value(other.identity_element)
{ }

## Member Function Documentation

## join()

template<typename Range , typename Value , typename RealBody , typename Reduction >

void tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::join | ( | lambda_reduce_body< Range, Value, RealBody, Reduction > & | rhs | ) |

inline

Definition at line 327 of file parallel_reduce.h.

{
my_value = my_reduction(const_cast<const Value&>(my_value), const_cast<const Value&>(rhs.my_value));
}

References tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::my_reduction, and tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::my_value.

## operator()()

template<typename Range , typename Value , typename RealBody , typename Reduction >

void tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::operator() | ( | Range & | range | ) |

inline

Definition at line 324 of file parallel_reduce.h.

{
my_value = my_real_body(range, const_cast<const Value&>(my_value));
}

References tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::my_real_body, and tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::my_value.

## operator=()

template<typename Range , typename Value , typename RealBody , typename Reduction >

lambda_reduce_body& tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::operator= | ( | const lambda_reduce_body< Range, Value, RealBody, Reduction > & | other | ) |

private

## result()

template<typename Range , typename Value , typename RealBody , typename Reduction >

Value tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::result | ( |  | ) | const

inline

Definition at line 330 of file parallel_reduce.h.

{
return my_value;
}

References tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::my_value.

Referenced by tbb::parallel_deterministic_reduce(), and tbb::parallel_reduce().

Here is the caller graph for this function:

## Member Data Documentation

## identity_element

template<typename Range , typename Value , typename RealBody , typename Reduction >

const Value& tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::identity_element

private

Definition at line 300 of file parallel_reduce.h.

## my_real_body

template<typename Range , typename Value , typename RealBody , typename Reduction >

const RealBody& tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::my_real_body

private

Definition at line 301 of file parallel_reduce.h.

Referenced by tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::operator()().

## my_reduction

template<typename Range , typename Value , typename RealBody , typename Reduction >

const Reduction& tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::my_reduction

private

Definition at line 302 of file parallel_reduce.h.

Referenced by tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::join().

## my_value

template<typename Range , typename Value , typename RealBody , typename Reduction >

Value tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::my_value

private

Definition at line 303 of file parallel_reduce.h.

Referenced by tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::join(), tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::operator()(), and tbb::internal::lambda_reduce_body< Range, Value, RealBody, Reduction >::result().

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

- parallel_reduce.h

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.