Skip to content

Commit 11fb555

Browse files
committed
Merge branch 'intrinsics' of https://github.com/jalvesz/stdlib into intrinsics
2 parents 9c5b2e0 + 6fd728d commit 11fb555

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

doc/specs/stdlib_intrinsics.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Pure function.
3333

3434
#### Argument(s)
3535

36-
`x`: N-D array of either `real` or `complex` type. This argument is `intent(in)`.
36+
`x`: N-D array of either `real`, `complex` or `integer` type. This argument is `intent(in)`.
3737

3838
`dim` (optional): scalar of type `integer` with a value in the range from 1 to n, where n equals the rank of `x`.
3939

@@ -48,7 +48,7 @@ If `dim` is absent, the output is a scalar of the same `type` and `kind` as to t
4848

4949
#### Description
5050

51-
The `stdlib_sum_kahan` function can replace the intrinsic `sum` for `real` or `complex` arrays. It follows a chunked implementation which maximizes vectorization potential complemented by an `elemental` kernel based on the [kahan summation](https://doi.org/10.1145%2F363707.363723) strategy to reduce the round-off error:
51+
The `stdlib_sum_kahan` function can replace the intrinsic `sum` for `real`, `complex` or `integer` arrays. It follows a chunked implementation which maximizes vectorization potential complemented by an `elemental` kernel based on the [kahan summation](https://doi.org/10.1145%2F363707.363723) strategy to reduce the round-off error:
5252

5353
```fortran
5454
elemental subroutine kahan_kernel_<kind>(a,s,c)
@@ -79,7 +79,7 @@ Pure function.
7979

8080
#### Argument(s)
8181

82-
`x`: 1D array of either `real` or `complex` type. This argument is `intent(in)`.
82+
`x`: 1D array of either `real`, `complex` or `integer` type. This argument is `intent(in)`.
8383

8484
`dim` (optional): scalar of type `integer` with a value in the range from 1 to n, where n equals the rank of `x`.
8585

@@ -116,7 +116,7 @@ Pure function.
116116

117117
#### Argument(s)
118118

119-
`x`: 1D array of either `real` or `complex` type. This argument is `intent(in)`.
119+
`x`: 1D array of either `real`, `complex` or `integer` type. This argument is `intent(in)`.
120120

121121
`y`: 1D array of the same type and kind as `x`. This argument is `intent(in)`.
122122

src/stdlib_intrinsics.fypp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#:set RANKS = range(2, MAXRANK + 1)
66

77
module stdlib_intrinsics
8-
!!Replacement of some Fortran intrinsic functions offering either faster and/or more accurate implementations.
8+
!!Alternative implementations of some Fortran intrinsic functions offering either faster and/or more accurate evaluation.
99
!! ([Specification](../page/specs/stdlib_intrinsics.html))
1010
use stdlib_kinds
1111
implicit none
@@ -23,7 +23,7 @@ module stdlib_intrinsics
2323
!! This interface provides standard conforming call for sum of elements of any rank.
2424
!! The 1-D base implementation follows a chunked approach for optimizing performance and increasing accuracy.
2525
!! The `N-D` interfaces calls upon the `(N-1)-D` implementation.
26-
!! Supported data types include `real` and `complex`.
26+
!! Supported data types include `real`, `complex` and `integer`.
2727
!!
2828
#:for k, t, s in I_KINDS_TYPES + R_KINDS_TYPES + C_KINDS_TYPES
2929
pure module function stdlib_sum_1d_${s}$(a) result(s)
@@ -64,7 +64,7 @@ module stdlib_intrinsics
6464
!! This interface provides standard conforming call for sum of elements of any rank.
6565
!! The 1-D base implementation follows a chunked approach combined with a kahan kernel for optimizing performance and increasing accuracy.
6666
!! The `N-D` interfaces calls upon the `(N-1)-D` implementation.
67-
!! Supported data types include `real` and `complex`.
67+
!! Supported data types include `real`, `complex` and `integer`.
6868
!!
6969
#:for k, t, s in R_KINDS_TYPES + C_KINDS_TYPES
7070
pure module function stdlib_sum_kahan_1d_${s}$(a) result(s)
@@ -104,7 +104,7 @@ module stdlib_intrinsics
104104
!!
105105
!! compute the dot_product of rank 1 arrays.
106106
!! The 1-D base implementation follows a chunked approach for optimizing performance and increasing accuracy.
107-
!! Supported data types include `real` and `complex`.
107+
!! Supported data types include `real`, `complex` and `integer`.
108108
!!
109109
#:for k, t, s in I_KINDS_TYPES + R_KINDS_TYPES + C_KINDS_TYPES
110110
pure module function stdlib_dot_product_${s}$(a,b) result(p)
@@ -127,7 +127,7 @@ module stdlib_intrinsics
127127
!!
128128
!! compute the dot_product of rank 1 arrays.
129129
!! The implementation follows a chunked approach combined with a kahan kernel for optimizing performance and increasing accuracy.
130-
!! Supported data types include `real` and `complex`.
130+
!! Supported data types include `real`, `complex` and `integer`.
131131
!!
132132
#:for k, t, s in R_KINDS_TYPES + C_KINDS_TYPES
133133
pure module function stdlib_dot_product_kahan_${s}$(a,b) result(p)

0 commit comments

Comments
 (0)