kennen:lib:inclusive_scan
no way to compare when less than two revisions
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
— | kennen:lib:inclusive_scan [2021-07-31 11:52] (aktuell) – angelegt - Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== inclusive_scan() ====== | ||
+ | ''# | ||
+ | |||
+ | <code cpp> | ||
+ | T inclusive_scan (In first, In last, Out result) | ||
+ | T inclusive_scan (In first, In last, Out result, Binary op) | ||
+ | T inclusive_scan (In first, In last, Out result, Binary op, T startwert) | ||
+ | |||
+ | T inclusive_scan (Exec pol, In first, In last, Out result) | ||
+ | T inclusive_scan (Exec pol, In first, In last, Out result, Binary op) | ||
+ | T inclusive_scan (Exec pol, In first, In last, Out result, Binary op, T startwert) | ||
+ | </ | ||
+ | | ||
+ | | ||
+ | Die Reihenfolge der " | ||
+ | |||
+ | Die Verarbeitung der Werte erfolgt nach dem Rechenschema | ||
+ | <code cpp> | ||
+ | | ||
+ | | ||
+ | | ||
+ | startwert -> + | ||
+ | | ||
+ | v / v / v / v / v | ||
+ | | ||
+ | </ | ||
+ | ==== Parameter ==== | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | ==== Ergebnis ==== | ||
+ | Rückgabewert: | ||
+ | |||
+ | ==== Siehe auch ==== | ||
+ | [[exclusive_scan]], | ||
+ | [[partial_sum]], | ||
+ | [[transform_inclusive_scan]], | ||
+ | [[..: | ||
+ | |||
+ | ==== Beispiel ==== | ||
+ | <code cpp inclusive_scan.cpp> | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | int main() | ||
+ | { | ||
+ | double arr[] = { 1, 2, 3, 4, 5 }; | ||
+ | double sum[5]; | ||
+ | |||
+ | std:: | ||
+ | |||
+ | for (double d : sum) | ||
+ | { | ||
+ | std::cout << d << ' '; | ||
+ | } | ||
+ | std::cout << ' | ||
+ | } | ||
+ | </ | ||
kennen/lib/inclusive_scan.txt · Zuletzt geändert: 2021-07-31 11:52 von 127.0.0.1