Skip to content

Commit

Permalink
(update) Added ?LAMCH
Browse files Browse the repository at this point in the history
  • Loading branch information
14NGiestas committed Nov 26, 2024
1 parent 40a78a2 commit d16c1cc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ Again, BLAS level 1 routines can be replaced by intrinsincs and other features i
| ----- | ----- | -------------------------------------------------------- | ------------------- |
| :+1: | iamax | Index of the maximum absolute value element of a vector | [maxval](https://gcc.gnu.org/onlinedocs/gfortran/MAXVAL.html), [maxloc](https://gcc.gnu.org/onlinedocs/gfortran/MAXLOC.html) |
| :+1: | iamin | Index of the minimum absolute value element of a vector | [minval](https://gcc.gnu.org/onlinedocs/gfortran/MINVAL.html), [minloc](https://gcc.gnu.org/onlinedocs/gfortran/MINLOC.html) |
| :+1: | lamch | Determines single precision machine parameters. | [huge](https://gcc.gnu.org/onlinedocs/gfortran/intrinsic-procedures/huge.html), [tiny](https://gcc.gnu.org/onlinedocs/gfortran/intrinsic-procedures/tiny.html), [epsilon](https://gcc.gnu.org/onlinedocs/gfortran/intrinsic-procedures/epsilon.html) |

### LAPACK
#### Linear Equation Routines
Expand Down
10 changes: 10 additions & 0 deletions src/f77/blas.fpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#:mute
#:include "common.fpp"

#:def lamch(NAME,TYPE,KIND)
pure function ${NAME}$(cmach)
import :: ${KIND}$
@:parameter(integer, wp=${KIND}$)
${TYPE}$ :: ${NAME}$
@:args(character, in, cmach)
end function
#:enddef

#:def asum(NAME,TYPE,KIND)
pure function ${NAME}$(n, x, incx)
import :: ${KIND}$
Expand Down Expand Up @@ -421,6 +430,7 @@ $:f77_interface('?trsm', DEFAULT_TYPES, trmm_trsm)

! Extensions
! BLAS Level 1 - Utils / Extensions
$:f77_interface('?lamch', REAL_TYPES, lamch)
$:f77_interface('i?amax', DEFAULT_TYPES, iamax_iamin)
#:if defined('MFI_EXTENSIONS')
#:if defined('MFI_LINK_EXTERNAL')
Expand Down
1 change: 1 addition & 0 deletions src/mfi/blas.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ module mfi_blas
use iso_fortran_env
use f77_blas
use f77_blas, only: mfi_rotmg => f77_rotmg
use f77_blas, only: mfi_lamch => f77_lamch
implicit none

! BLAS level 1
Expand Down

0 comments on commit d16c1cc

Please sign in to comment.