4
4
#:set RC_KINDS_TYPES = R_KINDS_TYPES + C_KINDS_TYPES
5
5
#:set RANKS = range(2, MAXRANK + 1)
6
6
7
- ! This module is based on https://github.com/jalvesz/fast_math
8
7
module stdlib_intrinsics
9
8
!!Replacement for certain Fortran intrinsic functions offering either faster and/or more accurate implementations.
10
9
!! ([Specification](../page/specs/stdlib_intrinsics.html))
11
10
use stdlib_kinds
12
11
implicit none
13
12
private
14
13
15
- interface stdlib_sum
14
+ interface stdlib_sum
15
+ !! version: experimental
16
+ !!
17
+ !!### Summary
18
+ !! Sum elements of rank N arrays.
19
+ !! ([Specification](../page/specs/stdlib_intrinsics.html#stdlib_sum))
20
+ !!
21
+ !!### Description
22
+ !!
23
+ !! This interface provides standard conforming call for sum of elements of any rank.
24
+ !! The 1-D base implementation follows a chunked approach for optimizing performance and increasing accuracy.
25
+ !! The `N-D` interfaces calls upon the `(N-1)-D` implementation.
26
+ !! Supported data types include `real` and `complex`.
27
+ !!
16
28
#:for rk, rt, rs in RC_KINDS_TYPES
17
29
pure module function stdlib_sum_1d_${rs}$(a) result(s)
18
30
${rt}$, intent(in) :: a(:)
@@ -41,6 +53,18 @@ module stdlib_intrinsics
41
53
public :: stdlib_sum
42
54
43
55
interface stdlib_sum_kahan
56
+ !! version: experimental
57
+ !!
58
+ !!### Summary
59
+ !! Sum elements of rank 1 arrays.
60
+ !! ([Specification](../page/specs/stdlib_intrinsics.html#stdlib_sum_kahan))
61
+ !!
62
+ !!### Description
63
+ !!
64
+ !! This interface provides standard conforming call for sum of elements of rank 1.
65
+ !! The 1-D base implementation follows a chunked approach combined with a kahan kernel for optimizing performance and increasing accuracy.
66
+ !! Supported data types include `real` and `complex`.
67
+ !!
44
68
#:for rk, rt, rs in RC_KINDS_TYPES
45
69
pure module function stdlib_sum_kahan_1d_${rs}$(a) result(s)
46
70
${rt}$, intent(in) :: a(:)
@@ -56,6 +80,18 @@ module stdlib_intrinsics
56
80
public :: stdlib_sum_kahan
57
81
58
82
interface stdlib_dot_product
83
+ !! version: experimental
84
+ !!
85
+ !!### Summary
86
+ !! dot_product of rank 1 arrays.
87
+ !! ([Specification](../page/specs/stdlib_intrinsics.html#stdlib_dot_product))
88
+ !!
89
+ !!### Description
90
+ !!
91
+ !! compute the dot_product of rank 1 arrays.
92
+ !! The 1-D base implementation follows a chunked approach for optimizing performance and increasing accuracy.
93
+ !! Supported data types include `real` and `complex`.
94
+ !!
59
95
#:for rk, rt, rs in RC_KINDS_TYPES
60
96
pure module function stdlib_dot_product_${rs}$(a,b) result(p)
61
97
${rt}$, intent(in) :: a(:)
@@ -67,6 +103,18 @@ module stdlib_intrinsics
67
103
public :: stdlib_dot_product
68
104
69
105
interface stdlib_dot_product_kahan
106
+ !! version: experimental
107
+ !!
108
+ !!### Summary
109
+ !! dot_product of rank 1 arrays.
110
+ !! ([Specification](../page/specs/stdlib_intrinsics.html#stdlib_dot_product_kahan))
111
+ !!
112
+ !!### Description
113
+ !!
114
+ !! compute the dot_product of rank 1 arrays.
115
+ !! The implementation follows a chunked approach combined with a kahan kernel for optimizing performance and increasing accuracy.
116
+ !! Supported data types include `real` and `complex`.
117
+ !!
70
118
#:for rk, rt, rs in RC_KINDS_TYPES
71
119
pure module function stdlib_dot_product_kahan_${rs}$(a,b) result(p)
72
120
${rt}$, intent(in) :: a(:)
0 commit comments