You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/functions-reference/higher-order_functions.Rmd
+9-11Lines changed: 9 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -410,12 +410,12 @@ exactly. This implies that the order of summation determines the exact
410
410
numerical result. For this reason, the higher-order reduce function is
411
411
available in two variants:
412
412
413
-
*`reduce_sum`: Compute partial sums automatically. This usually
414
-
results in good performance without further tuning.
415
-
*`reduce_sum_static`: For the same input, always create the same call
416
-
graph. This results in stable numerical evaluation. This version
417
-
requires setting a tuning parameter which controls the maximal size of
418
-
partial sums formed.
413
+
*`reduce_sum`: Automatically choose partial sums partitioning based on a dynamic
414
+
scheduling algorithm.
415
+
*`reduce_sum_static`: Compute the same sum as `reduce_sum`, but partition
416
+
the input in the same way for given data set (in `reduce_sum` this partitioning
417
+
might change depending on computer load). This should result in stable
418
+
numerical evaluations.
419
419
420
420
### Specifying the Reduce-sum Function
421
421
@@ -437,16 +437,14 @@ partial sums. `s1, s2, ...` are shared between all terms in the sum.
437
437
**`f`*: function literal referring to a function specifying the
438
438
partial sum operation. Refer to the [partial sum function](#functions-partial-sum).
439
439
**`x`*: array of `T`, one for each term of the reduction, `T` can be any type,
440
-
**`grainsize`*: recommended number of terms in each reduce call, set
441
-
to 1 to estimate automatically for `reduce_sum` while for
442
-
`reduce_sum_static` this determines the maximal size of the partial sums, type `int`,
440
+
**`grainsize`*: For `reduce_sum`, `grainsize` is the recommended size of the partial sum. For `reduce_sum_static`, `grainsize` determinse the maximum size of the partial sums, type `int`,
443
441
**`s1`*: first (optional) shared argument, type `T1`, where `T1` can be any type
444
442
**`s2`*: second (optional) shared argument, type `T2`, where `T2` can be any type,
445
443
**`...`*: remainder of shared arguments, each of which can be any type.
446
444
447
-
### The Partial-sum Function {#functions-partial-sum}
445
+
### The Partialsum Function {#functions-partial-sum}
448
446
449
-
The partial sum function must have the following signature where the types`T`, and the
447
+
The partial sum function must have the following signature where the type`T`, and the
450
448
types of all the shared arguments (`T1`, `T2`, ...) match those of the original
0 commit comments