vendored-meson/meson/test cases/frameworks/38 blas-lapack/main.f90
raw| 1 | ! minimal BLAS test |
| 2 | program AHH |
| 3 | |
| 4 | implicit none |
| 5 | integer :: n, incx, xs |
| 6 | real :: multval |
| 7 | integer :: x(4) |
| 8 | external sccal |
| 9 | |
| 10 | ! A very simple test case, scalar x vector |
| 11 | n = 4 |
| 12 | multval = 3.0 |
| 13 | incx = 1 |
| 14 | x = [1, 2, 3, 4] |
| 15 | |
| 16 | call sscal(n, multval, x, incx) |
| 17 | |
| 18 | xs = int(sum(x)) |
| 19 | |
| 20 | if (xs == 30) then |
| 21 | print '("OK: BLAS sum of scaled 1-D array = ",i2)', xs |
| 22 | else |
| 23 | print '("NOK: BLAS sum of scaled 1-D array = ",i2)', xs |
| 24 | end if |
| 25 | end |