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: doc/specs/stdlib_intrinsics.md
+115-2Lines changed: 115 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The `stdlib_intrinsics` module provides replacements for some of the well known
15
15
16
16
#### Description
17
17
18
-
The `fsum` function can replace the intrinsic `sum` for 1D `real` or `complex` arrays. It follows a chunked implementation which maximaxes vectorization potential as well as reducing the round-off error.
18
+
The `fsum` function can replace the intrinsic `sum` for 1D `real` or `complex` arrays. It follows a chunked implementation which maximizes vectorization potential as well as reducing the round-off error. This procedure is recommended when summing large arrays, for repetitive summation of smaller arrays consider the classical `sum`.
19
19
20
20
#### Syntax
21
21
@@ -32,7 +32,7 @@ Pure function.
32
32
#### Argument(s)
33
33
34
34
`x`: 1D array of either `real` or `complex` type. This argument is `intent(in)`.
35
-
`mask`: 1D array of `logical` values. This argument is `intent(in)`.
35
+
`mask` (optional): 1D array of `logical` values. This argument is `intent(in)`.
36
36
37
37
#### Output value or Result value
38
38
@@ -43,3 +43,116 @@ The output is a scalar of `type` and `kind` same as to that of `x`.
The `fsum_kahan` function can replace the intrinsic `sum` for 1D `real` or `complex` arrays. It follows a chunked implementation which maximizes vectorization potential, complemented by an `elemental` kernel based on the [kahan summation](https://en.wikipedia.org/wiki/Kahan_summation_algorithm) strategy to reduce the round-off error:
The `fprod` function can replace the intrinsic `dot_product` for 1D `real` or `complex` arrays. It follows a chunked implementation which maximizes vectorization potential as well as reducing the round-off error. This procedure is recommended when crunching large arrays, for repetitive products of smaller arrays consider the classical `dot_product`.
The `fprod_kahan` function can replace the intrinsic `dot_product` for 1D `real` or `complex` arrays. It follows a chunked implementation which maximizes vectorization potential , complemented by the same `elemental` kernel based on the [kahan summation](https://en.wikipedia.org/wiki/Kahan_summation_algorithm) used for `fsum` to reduce the round-off error.
0 commit comments