aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-04-23 22:32:49 +0200
committerWojtek Kosior <kwojtus@protonmail.com>2019-04-23 22:32:49 +0200
commit67db729b18f38c51908569de269d45d00ea9bf32 (patch)
treefe1b44a809d3fcd4950b564aaf80045cd9dc1aab /src
parent6a8fac2b72bd8296f92f92461af328f60533a987 (diff)
downloadfortran-assignment1-67db729b18f38c51908569de269d45d00ea9bf32.tar.gz
fortran-assignment1-67db729b18f38c51908569de269d45d00ea9bf32.zip
use more readable size() notation in bettermath
Diffstat (limited to 'src')
-rw-r--r--src/bettermath.F9018
1 files changed, 9 insertions, 9 deletions
diff --git a/src/bettermath.F90 b/src/bettermath.F90
index e2c0773..c77bedf 100644
--- a/src/bettermath.F90
+++ b/src/bettermath.F90
@@ -47,9 +47,9 @@ CONTAINS
allocate(C(size(A, 1), size(B, 2)))
C = 0
- DO j = 1, size(B(1,:))
- DO k = 1, size(A(1,:))
- DO i = 1, size(A(:,1))
+ DO j = 1, size(B, 2)
+ DO k = 1, size(A, 2)
+ DO i = 1, size(A, 1)
C(i,j) = C(i,j) + A(i,k) * B(k,j)
END DO
@@ -67,9 +67,9 @@ CONTAINS
allocate(C(size(A, 1), size(B, 2)))
C = 0
- DO j = 1, size(B(1,:))
- DO k = 1, size(A(1,:))
- DO i = 1, size(A(:,1))
+ DO j = 1, size(B, 2)
+ DO k = 1, size(A, 2)
+ DO i = 1, size(A, 1)
C(i,j) = C(i,j) + A(i,k) * B(k,j)
END DO
@@ -87,9 +87,9 @@ CONTAINS
allocate(C(size(A, 1), size(B, 2)))
C = 0
- DO j = 1, size(B(1,:))
- DO k = 1, size(A(1,:))
- DO i = 1, size(A(:,1))
+ DO j = 1, size(B, 2)
+ DO k = 1, size(A, 2)
+ DO i = 1, size(A, 1)
C(i,j) = C(i,j) + A(i,k) * B(k,j)
END DO