Commit acbecfbb authored by Andreas Marek's avatar Andreas Marek

Cleanup of template include of reduce_add and transpose_vectors

parent 6f9e5d37
......@@ -155,87 +155,44 @@ module ELPA1_COMPUTE
! real double precision first
#define DOUBLE_PRECISION_REAL 1
#define DATATYPE REAL(kind=rk8)
#define BYTESIZE 8
#define REALCASE 1
#define DOUBLE_PRECISION 1
#include "precision_macros.h"
#undef PRECISION
#define PRECISION double
#undef PRECISION_SUFFIX
#define PRECISION_SUFFIX "_double"
#include "elpa_transpose_vectors.X90"
#include "elpa_reduce_add_vectors.X90"
#undef DOUBLE_PRECISION_REAL
#undef DATATYPE
#undef BYTESIZE
#undef REALCASE
#undef DOUBLE_PRECISION
#undef PRECISION
#undef PRECISION_SUFFIX
#undef REALCASE
! single precision
#ifdef WANT_SINGLE_PRECISION_REAL
#undef DOUBLE_PRECISION_REAL
#define DATATYPE REAL(kind=rk4)
#define BYTESIZE 4
#define REALCASE 1
#define SINGLE_PRECISION 1
#include "precision_macros.h"
#undef PRECISION
#define PRECISION single
#undef PRECISION_SUFFIX
#define PRECISION_SUFFIX "_single"
#include "elpa_transpose_vectors.X90"
#include "elpa_reduce_add_vectors.X90"
#undef DATATYPE
#undef BYTESIZE
#undef REALCASE
#undef SINGLE_PRECISION
#undef PRECISION
#undef PRECISION_SUFFIX
#undef REALCASE
#endif
! double precision
#define DOUBLE_PRECISION_COMPLEX 1
#define DATATYPE COMPLEX(kind=ck8)
#define BYTESIZE 16
#define COMPLEXCASE 1
#define DOUBLE_PRECISION 1
#include "precision_macros.h"
#undef PRECISION
#define PRECISION double
#undef PRECISION_SUFFIX
#define PRECISION_SUFFIX "_double"
#include "elpa_transpose_vectors.X90"
#include "elpa_reduce_add_vectors.X90"
#undef DATATYPE
#undef BYTESIZE
#undef COMPLEXCASE
#undef DOUBLE_PRECISION
#undef DOUBLE_PRECISION_COMPLEX
#undef PRECISION
#undef PRECISION_SUFFIX
#ifdef WANT_SINGLE_PRECISION_COMPLEX
#undef DOUBLE_PRECISION_COMPLEX
#undef DOUBLE_PRECISION_REAL
#define DATATYPE COMPLEX(kind=ck4)
#define COMPLEXCASE 1
#define SINGLE_PRECISION 1
#include "precision_macros.h"
#undef PRECISION
#define PRECISION single
#undef PRECISION_SUFFIX
#define PRECISION_SUFFIX "_single"
#include "elpa_transpose_vectors.X90"
#include "elpa_reduce_add_vectors.X90"
#undef DATATYPE
#undef BYTESIZE
#undef COMPLEXCASE
#undef SINGLE_PRECISION
......
......@@ -87,10 +87,10 @@ subroutine elpa_reduce_add_vectors_&
integer(kind=ik), intent(in) :: ld_s, comm_s, ld_t, comm_t, nvr, nvc, nblk
DATATYPE, intent(in) :: vmat_s(ld_s,nvc)
DATATYPE, intent(inout) :: vmat_t(ld_t,nvc)
MATH_DATATYPE(kind=C_DATATYPE_KIND), intent(in) :: vmat_s(ld_s,nvc)
MATH_DATATYPE(kind=C_DATATYPE_KIND), intent(inout) :: vmat_t(ld_t,nvc)
DATATYPE, allocatable :: aux1(:), aux2(:)
MATH_DATATYPE(kind=C_DATATYPE_KIND), allocatable :: aux1(:), aux2(:)
integer(kind=ik) :: myps, mypt, nps, npt
integer(kind=ik) :: n, lc, k, i, ips, ipt, ns, nl, mpierr
integer(kind=ik) :: lcm_s_t, nblks_tot
......
......@@ -90,10 +90,10 @@ subroutine elpa_transpose_vectors_&
implicit none
integer(kind=ik), intent(in) :: ld_s, comm_s, ld_t, comm_t, nvs, nvr, nvc, nblk
DATATYPE, intent(in) :: vmat_s(ld_s,nvc)
DATATYPE, intent(inout) :: vmat_t(ld_t,nvc)
MATH_DATATYPE(kind=C_DATATYPE_KIND), intent(in) :: vmat_s(ld_s,nvc)
MATH_DATATYPE(kind=C_DATATYPE_KIND), intent(inout) :: vmat_t(ld_t,nvc)
DATATYPE, allocatable :: aux(:)
MATH_DATATYPE(kind=C_DATATYPE_KIND), allocatable :: aux(:)
integer(kind=ik) :: myps, mypt, nps, npt
integer(kind=ik) :: n, lc, k, i, ips, ipt, ns, nl, mpierr
integer(kind=ik) :: lcm_s_t, nblks_tot, nblks_comm, nblks_skip
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment