aboutsummaryrefslogtreecommitdiff
path: root/src/main.F90
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-04-25 14:27:07 +0200
committerWojtek Kosior <kwojtus@protonmail.com>2019-04-25 14:27:07 +0200
commit3145eb5b2ed843cdd0c707486346bcf9fe8c4007 (patch)
tree0960428287c8679d2bdcba236b8a53a25cee3318 /src/main.F90
parent5b4f6ba34919f74e0793b1e0e2f611844b52df57 (diff)
downloadfortran-assignment1-3145eb5b2ed843cdd0c707486346bcf9fe8c4007.tar.gz
fortran-assignment1-3145eb5b2ed843cdd0c707486346bcf9fe8c4007.zip
add additional improved implementation
Diffstat (limited to 'src/main.F90')
-rw-r--r--src/main.F9015
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main.F90 b/src/main.F90
index 8b9823c..f28bbb8 100644
--- a/src/main.F90
+++ b/src/main.F90
@@ -2,6 +2,7 @@ PROGRAM mul
USE naivmat
USE bettmat
USE dotmat
+ USE bettmat2
USE iso_fortran_env, only: error_unit
IMPLICIT none
@@ -35,6 +36,8 @@ PROGRAM mul
multype = 3
ELSE IF (trim(impl_arg) .eq. "mat") THEN
multype = 4
+ ELSE IF (trim(impl_arg) .eq. "bett2") THEN
+ multype = 5
ELSE
write (error_unit, '(A)') "Unrecognized implementation argument"
call print_usage()
@@ -108,8 +111,10 @@ CONTAINS
res = bettmull(mat1, mat2)
CASE (3)
res = dotmull(mat1, mat2)
- CASE default
+ CASE (4)
res = matmul(mat1, mat2)
+ CASE default
+ res = bett2mull(mat1, mat2)
END SELECT
@@ -143,8 +148,10 @@ CONTAINS
res = bettmull(mat1, mat2)
CASE (3)
res = dotmull(mat1, mat2)
- CASE default
+ CASE (4)
res = matmul(mat1, mat2)
+ CASE default
+ res = bett2mull(mat1, mat2)
END SELECT
@@ -178,8 +185,10 @@ CONTAINS
res = bettmull(mat1, mat2)
CASE (3)
res = dotmull(mat1, mat2)
- CASE default
+ CASE (4)
res = matmul(mat1, mat2)
+ CASE default
+ res = bett2mull(mat1, mat2)
END SELECT