aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bettermath.F909
-rw-r--r--src/dotmath.F9012
-rw-r--r--src/naivemath.F909
3 files changed, 9 insertions, 21 deletions
diff --git a/src/bettermath.F90 b/src/bettermath.F90
index c77bedf..091eb9c 100644
--- a/src/bettermath.F90
+++ b/src/bettermath.F90
@@ -41,10 +41,9 @@ CONTAINS
FUNCTION bettmull_4(A, B) result(C)
IMPLICIT none
real(kind=4), intent(in), dimension(1:,1:) :: A, B
- real(kind=4), dimension(:,:), allocatable :: C
+ real(kind=4), dimension(size(A, 1), size(B, 2)) :: C
integer :: i, j, k
- allocate(C(size(A, 1), size(B, 2)))
C = 0
DO j = 1, size(B, 2)
@@ -61,10 +60,9 @@ CONTAINS
FUNCTION bettmull_8(A, B) result(C)
IMPLICIT none
real(kind=8), intent(in), dimension(1:,1:) :: A, B
- real(kind=8), dimension(:,:), allocatable :: C
+ real(kind=8), dimension(size(A, 1), size(B, 2)) :: C
integer :: i, j, k
- allocate(C(size(A, 1), size(B, 2)))
C = 0
DO j = 1, size(B, 2)
@@ -81,10 +79,9 @@ CONTAINS
FUNCTION bettmull_16(A, B) result(C)
IMPLICIT none
real(kind=16), intent(in), dimension(1:,1:) :: A, B
- real(kind=16), dimension(:,:), allocatable :: C
+ real(kind=16), dimension(size(A, 1), size(B, 2)) :: C
integer :: i, j, k
- allocate(C(size(A, 1), size(B, 2)))
C = 0
DO j = 1, size(B, 2)
diff --git a/src/dotmath.F90 b/src/dotmath.F90
index 81f1f13..eeeee45 100644
--- a/src/dotmath.F90
+++ b/src/dotmath.F90
@@ -41,11 +41,9 @@ CONTAINS
FUNCTION dotmull_4(A, B) result(C)
IMPLICIT none
real(kind=4), intent(in), dimension(1:,1:) :: A, B
- real(kind=4), dimension(:,:), allocatable :: C
+ real(kind=4), dimension(size(A, 1), size(B, 2)) :: C
integer :: i, j
- allocate(C(size(A, 1), size(B, 2)))
-
DO j = 1, size(B, 2)
DO i = 1, size(A, 1)
@@ -58,11 +56,9 @@ CONTAINS
FUNCTION dotmull_8(A, B) result(C)
IMPLICIT none
real(kind=8), intent(in), dimension(1:,1:) :: A, B
- real(kind=8), dimension(:,:), allocatable :: C
+ real(kind=8), dimension(size(A, 1), size(B, 2)) :: C
integer :: i, j
- allocate(C(size(A, 1), size(B, 2)))
-
DO j = 1, size(B, 2)
DO i = 1, size(A, 1)
@@ -75,11 +71,9 @@ CONTAINS
FUNCTION dotmull_16(A, B) result(C)
IMPLICIT none
real(kind=16), intent(in), dimension(1:,1:) :: A, B
- real(kind=16), dimension(:,:), allocatable :: C
+ real(kind=16), dimension(size(A, 1), size(B, 2)) :: C
integer :: i, j
- allocate(C(size(A, 1), size(B, 2)))
-
DO j = 1, size(B, 2)
DO i = 1, size(A, 1)
diff --git a/src/naivemath.F90 b/src/naivemath.F90
index 47acaad..c0382f3 100644
--- a/src/naivemath.F90
+++ b/src/naivemath.F90
@@ -41,10 +41,9 @@ CONTAINS
FUNCTION naivmull_4(A, B) result(C)
IMPLICIT none
real(kind=4), intent(in), dimension(1:,1:) :: A, B
- real(kind=4), dimension(:,:), allocatable :: C
+ real(kind=4), dimension(size(A, 1), size(B, 2)) :: C
integer :: i, j, k
- allocate(C(size(A, 1), size(B, 2)))
C = 0
DO i = 1, size(A, 1)
@@ -61,10 +60,9 @@ CONTAINS
FUNCTION naivmull_8(A, B) result(C)
IMPLICIT none
real(kind=8), intent(in), dimension(1:,1:) :: A, B
- real(kind=8), dimension(:,:), allocatable :: C
+ real(kind=8), dimension(size(A, 1), size(B, 2)) :: C
integer :: i, j, k
- allocate(C(size(A, 1), size(B, 2)))
C = 0
DO i = 1, size(A, 1)
@@ -81,10 +79,9 @@ CONTAINS
FUNCTION naivmull_16(A, B) result(C)
IMPLICIT none
real(kind=16), intent(in), dimension(1:,1:) :: A, B
- real(kind=16), dimension(:,:), allocatable :: C
+ real(kind=16), dimension(size(A, 1), size(B, 2)) :: C
integer :: i, j, k
- allocate(C(size(A, 1), size(B, 2)))
C = 0
DO i = 1, size(A, 1)