aboutsummaryrefslogtreecommitdiff
path: root/example_packages/link_external/app/main.f90
diff options
context:
space:
mode:
authorSebastian Ehlert <28669218+awvwgk@users.noreply.github.com>2020-11-08 17:00:35 +0100
committerSebastian Ehlert <28669218+awvwgk@users.noreply.github.com>2020-11-13 09:34:56 +0100
commit681e4add145a71735da85193403d77abec8bb0ef (patch)
treef61d190babf2601e3235f627082406a927525f09 /example_packages/link_external/app/main.f90
parent1e4cf61d964de8322f266c87b9377780063a03a3 (diff)
downloadfpm-681e4add145a71735da85193403d77abec8bb0ef.tar.gz
fpm-681e4add145a71735da85193403d77abec8bb0ef.zip
Add package with external dependency
- BLAS is installed on the OSX and Linux image, but not on Windows
Diffstat (limited to 'example_packages/link_external/app/main.f90')
-rw-r--r--example_packages/link_external/app/main.f9021
1 files changed, 21 insertions, 0 deletions
diff --git a/example_packages/link_external/app/main.f90 b/example_packages/link_external/app/main.f90
new file mode 100644
index 0000000..8df408d
--- /dev/null
+++ b/example_packages/link_external/app/main.f90
@@ -0,0 +1,21 @@
+program test_blas
+ use wrapped_gemv, only : sp, gemv
+ implicit none
+
+ integer :: i, j
+ real(sp) :: mat(4, 4), vec(4), res(4)
+
+ do i = 1, size(vec)
+ vec(i) = sqrt(real(i, sp))
+ end do
+
+ do i = 1, size(mat, 2)
+ do j = 1, size(mat, 1)
+ mat(j, i) = sqrt(real(j * i, sp))
+ end do
+ end do
+
+ call gemv(mat, vec, res, alpha=-1.0_sp, trans='t')
+
+end program test_blas
+