-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide BLAS, LAPACK backends and interfaces #772
Merged
Merged
Changes from 27 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
f3ac970
Upload BLAS/LAPACK, create preprocessor directives
perazz 5882ad6
enable fpm deployment
perazz ac65112
update `fpm` version in CI
perazz c25e3ff
add tests
perazz ce52faf
typo: `getri`
perazz 3e8c5b6
safeguards for qp procedure templates
perazz 29eeec2
public qp interfaces
perazz 8be6484
more `WITH_QP` guards
perazz a937382
skip unsupported `xdp` precision
perazz a356f14
Delete .test_trapz.fypp.swp
perazz 2ae057f
unify pre-processing of blas/lapack sources
perazz edfeb59
OpenMP: replace `cpp` macros with `!$` conditional compilation
perazz da5d90c
force `example.dat` back into repo
perazz d379e9c
free-form `!$omp` continuation style
perazz 2be3340
indent OpenMP sentinels
perazz 592e085
remove `FPM_DEPLOYMENT`
perazz 5785f6c
Update src/stdlib_linalg_constants.fypp
perazz fa3f147
Merge branch 'blas_lapack_backend' of github.com:perazz/stdlib into b…
perazz 281b068
Document BLAS/LAPACK backends
perazz 4586f32
typo
perazz 3c2349f
Update doc/specs/stdlib_linalg.md
perazz 464aba4
Update doc/specs/stdlib_linalg.md
perazz a56d685
Update doc/specs/stdlib_linalg.md
perazz 819f2b2
add Licensing information
perazz a46b86f
add `Syntax` section
perazz ae6c009
clarify fpm macros
perazz 545b4c3
link to the conversion script
perazz e30b2ec
dnrm2/snrm2: fix missing interface type
perazz 745bcf8
shorten doc comment
perazz c12b3c3
lapack interface: import procedure interfaces
perazz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
program example_gemv | ||
use stdlib_linalg, only: eye | ||
use stdlib_linalg_blas, only: sp,gemv | ||
implicit none(type,external) | ||
real(sp) :: A(2, 2), B(2) | ||
B = [1.0,2.0] | ||
A = eye(2) | ||
|
||
! Use legacy BLAS interface | ||
call gemv('No transpose',m=size(A,1),n=size(A,2),alpha=1.0,a=A,lda=size(A,1),x=B,incx=1,beta=0.0,y=B,incy=1) | ||
|
||
print *, B ! returns 1.0 2.0 | ||
|
||
end program example_gemv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
program example_getrf | ||
use stdlib_linalg, only: eye | ||
use stdlib_linalg_lapack, only: dp,ilp,getrf | ||
implicit none(type,external) | ||
real(dp) :: A(3, 3) | ||
integer(ilp) :: ipiv(3),info | ||
|
||
A = eye(3) | ||
|
||
! LAPACK matrix factorization interface (overwrite result) | ||
call getrf(size(A,1),size(A,2),A,size(A,1),ipiv,info) | ||
print *, info ! info==0: Success! | ||
|
||
end program example_getrf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for my information (not a criticism): why did you use 3.10.1, instead of the version 3.12.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed that other libraries use older versions, so I wanted to stay on the safe side to avoid potential issues from the newest changes.
For example, NumPy uses 3.2: https://github.com/numpy/numpy/blob/c3694335faffe35e3d961feffefdc0a4b9a665da/numpy/linalg/lapack_lite/f2c_c_lapack.c#L76-L79
Apple uses
3.9.1
: https://developer.apple.com/documentation/accelerate/blas/I agree it would be nice to gradually move towards the newer versions and hopefully it shouldn't be a big deal, since most of the process is automated