File: transformreduce.yo

package info (click to toggle)
c%2B%2B-annotations 13.02.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,576 kB
  • sloc: cpp: 25,297; makefile: 1,523; ansic: 165; sh: 126; perl: 90; fortran: 27
file content (49 lines) | stat: -rw-r--r-- 1,925 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
hi(transform)
    itemization(
        it() Header file: tt(<numeric>)
        it() Function prototypes:
        itemization(
            itt(Type transform_reduce([ExecPol,] 
                InputIterator first1, InputIterator last1, 
                InputIterator first2,
                Type value);)

            itt(Type transform_reduce([ExecPol,] 
                InputIterator first1, InputIterator last1, 
                InputIterator first2,
                Type value,
                BinaryOperation reduce,
                BinaryOperation transform);)

            itt(Type transform_reduce([ExecPol,] 
                InputIterator first1, InputIterator last1, 
                Type value,
                BinaryOperation reduce,
                UnaryOperation transform);)
        )
        it() Description:
        itemization(
            it() The first prototype: equals the second prototype using
tt(std::plus<>) for the tt(reduce) binary operator and tt(std::mutiplies<>)
for the tt(transform) binary operator. It's also equivalent to a parallelized
version of tt(inner_product) (cf. section ref(INNERPROD)).
            it() The second prototype: applies the tt(transform) binary
operation to, as left-hand side operand, each element in the rangett(first1,
end1) range and as right-hand side operand the corresponding element of the
range starting at tt(first2). Each thus computed value is passed as right-hand
side operand, using tt(value) as left-hand side operand to the tt(reduce)
binary operation, returning the final value returned by tt(reduce).
            it() The third prototype: applies tt(transform) to each element of
the range rangett(first1, end1), and then passes tt(value) and each of the
values returned by tt(transform) to tt(reduce), returning the final value
returned by tt(reduce).

        )
        it() Example:
        verbinclude(-a examples/transformreduce.cc)
    )