Skip to content

Commit 19f84ce

Browse files
authored
Update linalg.md and example_blas_gemv.f90 (#797)
2 parents c26253a + 54eaecf commit 19f84ce

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

doc/specs/stdlib_linalg.md

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ These can be enabled during the build process. For example, with CMake, one can
4141
The same is possible from the `fpm` branch, where the `cpp` preprocessor is enabled by default. For example, the macros can be added to the project's manifest:
4242

4343
```toml
44+
# Link against appropriate external BLAS and LAPACK libraries, if necessary
45+
[build]
46+
link = ["blas", "lapack"]
47+
4448
[dependencies]
4549
stdlib="*"
4650

example/linalg/example_blas_gemv.f90

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ program example_gemv
22
use stdlib_linalg, only: eye
33
use stdlib_linalg_blas, only: sp,gemv
44
implicit none(type,external)
5-
real(sp) :: A(2, 2), B(2)
5+
real(sp) :: A(2, 2), B(2), C(2)
66
B = [1.0,2.0]
77
A = eye(2)
88

99
! Use legacy BLAS interface
10-
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)
10+
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=C,incy=1)
1111

12-
print *, B ! returns 1.0 2.0
12+
print *, C ! returns 1.0 2.0
1313

1414
end program example_gemv

0 commit comments

Comments
 (0)