Commit 263b7c83 authored by Pavel Kus's avatar Pavel Kus
Browse files

real and complex macros generated into one file

parent 136081c1
...@@ -65,8 +65,7 @@ EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES = \ ...@@ -65,8 +65,7 @@ EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES = \
src/elpa2_kernels/elpa2_kernels_complex_template.X90 \ src/elpa2_kernels/elpa2_kernels_complex_template.X90 \
src/elpa2_kernels/elpa2_kernels_simple_template.X90 \ src/elpa2_kernels/elpa2_kernels_simple_template.X90 \
src/redist_band.X90 \ src/redist_band.X90 \
src/precision_macros.h \ src/precision_macros.h
src/precision_macros_complex.h
lib_LTLIBRARIES = libelpa@SUFFIX@.la lib_LTLIBRARIES = libelpa@SUFFIX@.la
libelpa@SUFFIX@_la_LINK = $(FCLINK) $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) libelpa@SUFFIX@_la_LINK = $(FCLINK) $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION)
...@@ -911,7 +910,6 @@ EXTRA_DIST = \ ...@@ -911,7 +910,6 @@ EXTRA_DIST = \
src/elpa2_tridiag_band_complex_template.X90 \ src/elpa2_tridiag_band_complex_template.X90 \
src/elpa2_tridiag_band_real_template.X90 \ src/elpa2_tridiag_band_real_template.X90 \
src/precision_macros.h \ src/precision_macros.h \
src/precision_macros_complex.h \
src/elpa2_kernels/elpa2_kernels_real_template.X90 \ src/elpa2_kernels/elpa2_kernels_real_template.X90 \
src/elpa2_kernels/elpa2_kernels_complex_template.X90 \ src/elpa2_kernels/elpa2_kernels_complex_template.X90 \
src/elpa2_kernels/elpa2_kernels_simple_template.X90 \ src/elpa2_kernels/elpa2_kernels_simple_template.X90 \
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import sys import sys
simple_tokens = [ simple_tokens = [
"PRECISION",
"elpa_transpose_vectors_NUMBER_PRECISION", "elpa_transpose_vectors_NUMBER_PRECISION",
"elpa_reduce_add_vectors_NUMBER_PRECISION", "elpa_reduce_add_vectors_NUMBER_PRECISION",
...@@ -133,21 +134,41 @@ def print_undefs(number, explicit): ...@@ -133,21 +134,41 @@ def print_undefs(number, explicit):
print "#undef ", token[0] print "#undef ", token[0]
if(sys.argv[1] == "complex"): print "#ifdef REALCASE"
print "#ifdef DOUBLE_PRECISION_COMPLEX" print "#undef MATH_DATATYPE"
print_undefs("complex", explicit_tokens_complex) print "#define MATH_DATATYPE real"
print_variant("complex", "double", explicit_tokens_complex) print_undefs("real", explicit_tokens_real)
print "#else" #print_undefs("complex", explicit_tokens_complex)
print_undefs("complex", explicit_tokens_complex) print "#ifdef DOUBLE_PRECISION"
print_variant("complex", "single", explicit_tokens_complex) print_variant("real", "double", explicit_tokens_real)
print "#endif" print "#endif"
elif(sys.argv[1] == "real"): print "#ifdef SINGLE_PRECISION"
print "#ifdef DOUBLE_PRECISION_REAL" print_variant("real", "single", explicit_tokens_real)
print_undefs("real", explicit_tokens_real) print "#endif"
print_variant("real", "double", explicit_tokens_real) print "#endif"
print "#else"
print_undefs("real", explicit_tokens_real) print "#ifdef COMPLEXCASE"
print_variant("real", "single", explicit_tokens_real) print "#undef MATH_DATATYPE"
print "#endif" print "#define MATH_DATATYPE complex"
else: #print_undefs("real", explicit_tokens_real)
assert(False) print_undefs("complex", explicit_tokens_complex)
\ No newline at end of file print "#ifdef DOUBLE_PRECISION"
print_variant("complex", "double", explicit_tokens_complex)
print "#endif"
print "#ifdef SINGLE_PRECISION"
print_variant("complex", "single", explicit_tokens_complex)
print "#endif"
print "#endif"
#print "#elif MACROS_TYPE == COMPLEX_DOUBLE"
#print "#undef NUMBER"
#print_undefs("complex", explicit_tokens_complex)
#print "#define NUMBER complex"
#print_variant("complex", "double", explicit_tokens_complex)
#print "#elif MACROS_TYPE == COMPLEX_SINGLE"
#print "#undef NUMBER"
#print_undefs("complex", explicit_tokens_complex)
#print "#define NUMBER complex"
#print_variant("complex", "single", explicit_tokens_complex)
#print "#endif"
...@@ -159,12 +159,14 @@ module ELPA1_COMPUTE ...@@ -159,12 +159,14 @@ module ELPA1_COMPUTE
#define DATATYPE REAL(kind=rk8) #define DATATYPE REAL(kind=rk8)
#define BYTESIZE 8 #define BYTESIZE 8
#define REALCASE 1 #define REALCASE 1
#define DOUBLE_PRECISION 1
#include "elpa_transpose_vectors.X90" #include "elpa_transpose_vectors.X90"
#include "elpa_reduce_add_vectors.X90" #include "elpa_reduce_add_vectors.X90"
#undef DOUBLE_PRECISION_REAL #undef DOUBLE_PRECISION_REAL
#undef DATATYPE #undef DATATYPE
#undef BYTESIZE #undef BYTESIZE
#undef REALCASE #undef REALCASE
#undef DOUBLE_PRECISION
! single precision ! single precision
#ifdef WANT_SINGLE_PRECISION_REAL #ifdef WANT_SINGLE_PRECISION_REAL
...@@ -173,11 +175,13 @@ module ELPA1_COMPUTE ...@@ -173,11 +175,13 @@ module ELPA1_COMPUTE
#define DATATYPE REAL(kind=rk4) #define DATATYPE REAL(kind=rk4)
#define BYTESIZE 4 #define BYTESIZE 4
#define REALCASE 1 #define REALCASE 1
#define SINGLE_PRECISION 1
#include "elpa_transpose_vectors.X90" #include "elpa_transpose_vectors.X90"
#include "elpa_reduce_add_vectors.X90" #include "elpa_reduce_add_vectors.X90"
#undef DATATYPE #undef DATATYPE
#undef BYTESIZE #undef BYTESIZE
#undef REALCASE #undef REALCASE
#undef SINGLE_PRECISION
#endif #endif
...@@ -187,11 +191,13 @@ module ELPA1_COMPUTE ...@@ -187,11 +191,13 @@ module ELPA1_COMPUTE
#define DATATYPE COMPLEX(kind=ck8) #define DATATYPE COMPLEX(kind=ck8)
#define BYTESIZE 16 #define BYTESIZE 16
#define COMPLEXCASE 1 #define COMPLEXCASE 1
#define DOUBLE_PRECISION 1
#include "elpa_transpose_vectors.X90" #include "elpa_transpose_vectors.X90"
#include "elpa_reduce_add_vectors.X90" #include "elpa_reduce_add_vectors.X90"
#undef DATATYPE #undef DATATYPE
#undef BYTESIZE #undef BYTESIZE
#undef COMPLEXCASE #undef COMPLEXCASE
#undef DOUBLE_PRECISION
#undef DOUBLE_PRECISION_COMPLEX #undef DOUBLE_PRECISION_COMPLEX
#ifdef WANT_SINGLE_PRECISION_COMPLEX #ifdef WANT_SINGLE_PRECISION_COMPLEX
...@@ -200,11 +206,13 @@ module ELPA1_COMPUTE ...@@ -200,11 +206,13 @@ module ELPA1_COMPUTE
#undef DOUBLE_PRECISION_REAL #undef DOUBLE_PRECISION_REAL
#define DATATYPE COMPLEX(kind=ck4) #define DATATYPE COMPLEX(kind=ck4)
#define COMPLEXCASE 1 #define COMPLEXCASE 1
#define SINGLE_PRECISION 1
#include "elpa_transpose_vectors.X90" #include "elpa_transpose_vectors.X90"
#include "elpa_reduce_add_vectors.X90" #include "elpa_reduce_add_vectors.X90"
#undef DATATYPE #undef DATATYPE
#undef BYTESIZE #undef BYTESIZE
#undef COMPLEXCASE #undef COMPLEXCASE
#undef SINGLE_PRECISION
#endif /* WANT_SINGLE_PRECISION_COMPLEX */ #endif /* WANT_SINGLE_PRECISION_COMPLEX */
...@@ -213,6 +221,9 @@ module ELPA1_COMPUTE ...@@ -213,6 +221,9 @@ module ELPA1_COMPUTE
#define REAL_DATATYPE rk8 #define REAL_DATATYPE rk8
#define REALCASE 1 #define REALCASE 1
#define DOUBLE_PRECISION 1
! remove? :
#undef COMPLEXCASE #undef COMPLEXCASE
#include "elpa1_compute_template.X90" #include "elpa1_compute_template.X90"
...@@ -220,6 +231,7 @@ module ELPA1_COMPUTE ...@@ -220,6 +231,7 @@ module ELPA1_COMPUTE
#undef DOUBLE_PRECISION_REAL #undef DOUBLE_PRECISION_REAL
#undef REAL_DATATYPE #undef REAL_DATATYPE
#undef REALCASE #undef REALCASE
#undef DOUBLE_PRECISION
! real single precision ! real single precision
#if defined(WANT_SINGLE_PRECISION_REAL) #if defined(WANT_SINGLE_PRECISION_REAL)
...@@ -228,11 +240,15 @@ module ELPA1_COMPUTE ...@@ -228,11 +240,15 @@ module ELPA1_COMPUTE
#define REAL_DATATYPE rk4 #define REAL_DATATYPE rk4
#define REALCASE 1 #define REALCASE 1
#define SINGLE_PRECISION 1
!remove? :
#undef COMPLEXCASE #undef COMPLEXCASE
#include "elpa1_compute_template.X90" #include "elpa1_compute_template.X90"
#undef REALCASE #undef REALCASE
#undef SINGLE_PRECISION
#undef DOUBLE_PRECISION_REAL #undef DOUBLE_PRECISION_REAL
#undef REAL_DATATYPE #undef REAL_DATATYPE
...@@ -245,10 +261,14 @@ module ELPA1_COMPUTE ...@@ -245,10 +261,14 @@ module ELPA1_COMPUTE
#define COMPLEX_DATATYPE ck8 #define COMPLEX_DATATYPE ck8
#define COMPLEXCASE 1 #define COMPLEXCASE 1
#define DOUBLE_PRECISION 1
! remove? :
#undef REALCASE #undef REALCASE
#include "elpa1_compute_template.X90" #include "elpa1_compute_template.X90"
#undef COMPLEXCASE #undef COMPLEXCASE
#undef DOUBLE_PRECISION
#undef DOUBLE_PRECISION_COMPLEX #undef DOUBLE_PRECISION_COMPLEX
#undef REAL_DATATYPE #undef REAL_DATATYPE
...@@ -263,11 +283,14 @@ module ELPA1_COMPUTE ...@@ -263,11 +283,14 @@ module ELPA1_COMPUTE
#define COMPLEX_DATATYPE ck4 #define COMPLEX_DATATYPE ck4
#define COMPLEXCASE 1 #define COMPLEXCASE 1
#define SINGLE_PRECISION 1
!remove ? :
#undef REALCASE #undef REALCASE
#include "elpa1_compute_template.X90" #include "elpa1_compute_template.X90"
#undef COMPLEXCASE #undef COMPLEXCASE
#undef SINGLE_PRECISION
#undef DOUBLE_PRECISION_COMPLEX #undef DOUBLE_PRECISION_COMPLEX
#undef COMPLEX_DATATYPE #undef COMPLEX_DATATYPE
......
...@@ -52,13 +52,7 @@ ...@@ -52,13 +52,7 @@
! distributed along with the original code in the file "COPYING". ! distributed along with the original code in the file "COPYING".
#endif #endif
#if REALCASE == 1
#include "precision_macros.h" #include "precision_macros.h"
#endif
#if COMPLEXCASE == 1
#include "precision_macros_complex.h"
#endif
#if REALCASE == 1 #if REALCASE == 1
......
...@@ -400,6 +400,14 @@ module ELPA2 ...@@ -400,6 +400,14 @@ module ELPA2
!> \result success logical, false if error occured !> \result success logical, false if error occured
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! #undef PRECISION
! #undef MATH_DATATYPE
! #define MATH_DATATYPE real
! #define PRECISION double
! #include "elpa2_template.X90"
#define DOUBLE_PRECISION_REAL #define DOUBLE_PRECISION_REAL
#ifdef DOUBLE_PRECISION_REAL #ifdef DOUBLE_PRECISION_REAL
...@@ -599,6 +607,7 @@ module ELPA2 ...@@ -599,6 +607,7 @@ module ELPA2
else else
nbw = (63/nblk+1)*nblk nbw = (63/nblk+1)*nblk
endif endif
write(*,*) "nbw", nbw
num_blocks = (na-1)/nbw + 1 num_blocks = (na-1)/nbw + 1
......
...@@ -167,8 +167,12 @@ module ELPA2_compute ...@@ -167,8 +167,12 @@ module ELPA2_compute
#define DOUBLE_PRECISION_REAL 1 #define DOUBLE_PRECISION_REAL 1
#define REAL_DATATYPE rk8 #define REAL_DATATYPE rk8
#define REALCASE 1
#define DOUBLE_PRECISION 1
#include "precision_macros.h" #include "precision_macros.h"
#include "elpa2_compute_real_template.X90" #include "elpa2_compute_real_template.X90"
#undef REALCASE
#undef DOUBLE_PRECISION
#undef DOUBLE_PRECISION_REAL #undef DOUBLE_PRECISION_REAL
#undef REAL_DATATYPE #undef REAL_DATATYPE
...@@ -179,8 +183,12 @@ module ELPA2_compute ...@@ -179,8 +183,12 @@ module ELPA2_compute
#undef DOUBLE_PRECISION_REAL #undef DOUBLE_PRECISION_REAL
#define REAL_DATATYPE rk4 #define REAL_DATATYPE rk4
#define REALCASE 1
#define SINGLE_PRECISION 1
#include "precision_macros.h" #include "precision_macros.h"
#include "elpa2_compute_real_template.X90" #include "elpa2_compute_real_template.X90"
#undef REALCASE
#undef SINGLE_PRECISION
#undef DOUBLE_PRECISION_REAL #undef DOUBLE_PRECISION_REAL
#undef REAL_DATATYPE #undef REAL_DATATYPE
...@@ -192,8 +200,12 @@ module ELPA2_compute ...@@ -192,8 +200,12 @@ module ELPA2_compute
#define REAL_DATATYPE rk8 #define REAL_DATATYPE rk8
#define COMPLEX_DATATYPE ck8 #define COMPLEX_DATATYPE ck8
#include "precision_macros_complex.h" #define COMPLEXCASE 1
#define DOUBLE_PRECISION 1
#include "precision_macros.h"
#include "elpa2_compute_complex_template.X90" #include "elpa2_compute_complex_template.X90"
#undef COMPLEXCASE
#undef DOUBLE_PRECISION
#undef DOUBLE_PRECISION_COMPLEX #undef DOUBLE_PRECISION_COMPLEX
#undef REAL_DATATYPE #undef REAL_DATATYPE
...@@ -207,8 +219,12 @@ module ELPA2_compute ...@@ -207,8 +219,12 @@ module ELPA2_compute
#define REAL_DATATYPE rk4 #define REAL_DATATYPE rk4
#define COMPLEX_DATATYPE ck4 #define COMPLEX_DATATYPE ck4
#include "precision_macros_complex.h" #define COMPLEXCASE 1
#define SINGLE_PRECISION 1
#include "precision_macros.h"
#include "elpa2_compute_complex_template.X90" #include "elpa2_compute_complex_template.X90"
#undef COMPLEXCASE
#undef SINGLE_PRECISION
#undef DOUBLE_PRECISION_COMPLEX #undef DOUBLE_PRECISION_COMPLEX
#undef COMPLEX_DATATYPE #undef COMPLEX_DATATYPE
......
This diff is collapsed.
#undef PRECISION
#undef MATH_DATATYPE
#define MATH_DATATYPE complex
#ifdef DOUBLE_PRECISION_COMPLEX
#define PRECISION double
#else
#define PRECISION single
#endif
#ifdef DOUBLE_PRECISION_COMPLEX
#undef elpa_transpose_vectors_complex_PRECISION
#undef elpa_reduce_add_vectors_complex_PRECISION
#undef bandred_complex_PRECISION
#undef trans_ev_band_to_full_complex_PRECISION
#undef tridiag_band_complex_PRECISION
#undef trans_ev_tridi_to_band_complex_PRECISION
#undef band_band_complex_PRECISION
#undef tridiag_complex_PRECISION
#undef solve_tridi_PRECISION
#undef solve_tridi_col_PRECISION
#undef solve_tridi_single_problem_PRECISION
#undef qr_pdgeqrf_2dcomm_PRECISION
#undef hh_transform_complex_PRECISION
#undef symm_matrix_allreduce_PRECISION
#undef herm_matrix_allreduce_PRECISION
#undef redist_band_complex_PRECISION
#undef unpack_row_complex_cpu_PRECISION
#undef unpack_row_complex_cpu_openmp_PRECISION
#undef unpack_and_prepare_row_group_complex_gpu_PRECISION
#undef extract_hh_tau_complex_gpu_PRECISION
#undef compute_hh_dot_products_complex_gpu_PRECISION
#undef compute_hh_trafo_complex_cpu_openmp_PRECISION
#undef compute_hh_trafo_complex_cpu_PRECISION
#undef pack_row_group_complex_gpu_PRECISION
#undef pack_row_complex_cpu_openmp_PRECISION
#undef pack_row_complex_cpu_PRECISION
#undef wy_gen_PRECISION
#undef wy_right_PRECISION
#undef wy_left_PRECISION
#undef wy_symm_PRECISION
#undef merge_recursive_PRECISION
#undef merge_systems_PRECISION
#undef distribute_global_column_PRECISION
#undef check_monotony_PRECISION
#undef global_gather_PRECISION
#undef resort_ev_PRECISION
#undef transform_columns_PRECISION
#undef solve_secular_equation_PRECISION
#undef global_product_PRECISION
#undef add_tmp_PRECISION
#undef v_add_s_PRECISION
#undef launch_compute_hh_trafo_c_kernel_complex_PRECISION
#undef compute_hh_trafo_complex_gpu_PRECISION
#undef launch_my_pack_c_kernel_complex_PRECISION
#undef launch_my_unpack_c_kernel_complex_PRECISION
#undef launch_compute_hh_dotp_c_kernel_complex_PRECISION
#undef launch_extract_hh_tau_c_kernel_complex_PRECISION
#undef PRECISION_GEMV
#undef PRECISION_TRMV
#undef PRECISION_GEMM
#undef PRECISION_TRMM
#undef PRECISION_HERK
#undef PRECISION_SYRK
#undef PRECISION_SYMV
#undef PRECISION_SYMM
#undef PRECISION_HEMV
#undef PRECISION_HER2
#undef PRECISION_SYR2
#undef PRECISION_SYR2K
#undef PRECISION_GEQRF
#undef PRECISION_STEDC
#undef PRECISION_STEQR
#undef PRECISION_LAMRG
#undef PRECISION_LAMCH
#undef PRECISION_LAPY2
#undef PRECISION_LAED4
#undef PRECISION_LAED5
#undef cublas_PRECISION_GEMM
#undef cublas_PRECISION_TRMM
#undef cublas_PRECISION_GEMV
#undef PRECISION_SUFFIX
#undef MPI_COMPLEX_PRECISION
#undef MPI_COMPLEX_EXPLICIT_PRECISION
#undef MPI_REAL_PRECISION
#undef KIND_PRECISION
#undef PRECISION_CMPLX
#undef PRECISION_IMAG
#undef PRECISION_REAL
#undef CONST_REAL_0_0
#undef CONST_REAL_1_0
#undef CONST_REAL_0_5
#undef CONST_COMPLEX_PAIR_0_0
#undef CONST_COMPLEX_PAIR_1_0
#undef CONST_COMPLEX_PAIR_NEGATIVE_1_0
#undef CONST_COMPLEX_PAIR_NEGATIVE_0_5
#undef CONST_COMPLEX_0_0
#undef CONST_COMPLEX_1_0
#undef size_of_PRECISION_complex
#define elpa_transpose_vectors_complex_PRECISION elpa_transpose_vectors_complex_double
#define elpa_reduce_add_vectors_complex_PRECISION elpa_reduce_add_vectors_complex_double
#define bandred_complex_PRECISION bandred_complex_double
#define trans_ev_band_to_full_complex_PRECISION trans_ev_band_to_full_complex_double
#define tridiag_band_complex_PRECISION tridiag_band_complex_double
#define trans_ev_tridi_to_band_complex_PRECISION trans_ev_tridi_to_band_complex_double
#define band_band_complex_PRECISION band_band_complex_double
#define tridiag_complex_PRECISION tridiag_complex_double
#define solve_tridi_PRECISION solve_tridi_double
#define solve_tridi_col_PRECISION solve_tridi_col_double
#define solve_tridi_single_problem_PRECISION solve_tridi_single_problem_double
#define qr_pdgeqrf_2dcomm_PRECISION qr_pdgeqrf_2dcomm_double
#define hh_transform_complex_PRECISION hh_transform_complex_double
#define symm_matrix_allreduce_PRECISION symm_matrix_allreduce_double
#define herm_matrix_allreduce_PRECISION herm_matrix_allreduce_double
#define redist_band_complex_PRECISION redist_band_complex_double
#define unpack_row_complex_cpu_PRECISION unpack_row_complex_cpu_double
#define unpack_row_complex_cpu_openmp_PRECISION unpack_row_complex_cpu_openmp_double
#define unpack_and_prepare_row_group_complex_gpu_PRECISION unpack_and_prepare_row_group_complex_gpu_double
#define extract_hh_tau_complex_gpu_PRECISION extract_hh_tau_complex_gpu_double
#define compute_hh_dot_products_complex_gpu_PRECISION compute_hh_dot_products_complex_gpu_double
#define compute_hh_trafo_complex_cpu_openmp_PRECISION compute_hh_trafo_complex_cpu_openmp_double
#define compute_hh_trafo_complex_cpu_PRECISION compute_hh_trafo_complex_cpu_double
#define pack_row_group_complex_gpu_PRECISION pack_row_group_complex_gpu_double
#define pack_row_complex_cpu_openmp_PRECISION pack_row_complex_cpu_openmp_double
#define pack_row_complex_cpu_PRECISION pack_row_complex_cpu_double
#define wy_gen_PRECISION wy_gen_double
#define wy_right_PRECISION wy_right_double
#define wy_left_PRECISION wy_left_double
#define wy_symm_PRECISION wy_symm_double
#define merge_recursive_PRECISION merge_recursive_double
#define merge_systems_PRECISION merge_systems_double
#define distribute_global_column_PRECISION distribute_global_column_double
#define check_monotony_PRECISION check_monotony_double
#define global_gather_PRECISION global_gather_double
#define resort_ev_PRECISION resort_ev_double
#define transform_columns_PRECISION transform_columns_double
#define solve_secular_equation_PRECISION solve_secular_equation_double
#define global_product_PRECISION global_product_double
#define add_tmp_PRECISION add_tmp_double
#define v_add_s_PRECISION v_add_s_double
#define launch_compute_hh_trafo_c_kernel_complex_PRECISION launch_compute_hh_trafo_c_kernel_complex_double
#define compute_hh_trafo_complex_gpu_PRECISION compute_hh_trafo_complex_gpu_double
#define launch_my_pack_c_kernel_complex_PRECISION launch_my_pack_c_kernel_complex_double
#define launch_my_unpack_c_kernel_complex_PRECISION launch_my_unpack_c_kernel_complex_double
#define launch_compute_hh_dotp_c_kernel_complex_PRECISION launch_compute_hh_dotp_c_kernel_complex_double
#define launch_extract_hh_tau_c_kernel_complex_PRECISION launch_extract_hh_tau_c_kernel_complex_double
#define PRECISION_GEMV ZGEMV
#define PRECISION_TRMV ZTRMV
#define PRECISION_GEMM ZGEMM
#define PRECISION_TRMM ZTRMM
#define PRECISION_HERK ZHERK
#define PRECISION_SYRK ZSYRK
#define PRECISION_SYMV ZSYMV
#define PRECISION_SYMM ZSYMM
#define PRECISION_HEMV ZHEMV
#define PRECISION_HER2 ZHER2
#define PRECISION_SYR2 ZSYR2
#define PRECISION_SYR2K ZSYR2K
#define PRECISION_GEQRF ZGEQRF
#define PRECISION_STEDC ZSTEDC
#define PRECISION_STEQR ZSTEQR
#define PRECISION_LAMRG ZLAMRG
#define PRECISION_LAMCH ZLAMCH
#define PRECISION_LAPY2 ZLAPY2
#define PRECISION_LAED4 ZLAED4
#define PRECISION_LAED5 ZLAED5
#define cublas_PRECISION_GEMM cublas_ZGEMM
#define cublas_PRECISION_TRMM cublas_ZTRMM
#define cublas_PRECISION_GEMV cublas_ZGEMV
#define PRECISION_SUFFIX "_double"
#define MPI_COMPLEX_PRECISION MPI_DOUBLE_COMPLEX
#define MPI_COMPLEX_EXPLICIT_PRECISION MPI_COMPLEX16
#define MPI_REAL_PRECISION MPI_REAL8
#define KIND_PRECISION rk8
#define PRECISION_CMPLX DCMPLX
#define PRECISION_IMAG DIMAG
#define PRECISION_REAL DREAL
#define CONST_REAL_0_0 0.0_rk8
#define CONST_REAL_1_0 1.0_rk8
#define CONST_REAL_0_5 0.5_rk8
#define CONST_COMPLEX_PAIR_0_0 (0.0_rk8,0.0_rk8)
#define CONST_COMPLEX_PAIR_1_0 (1.0_rk8,0.0_rk8)
#define CONST_COMPLEX_PAIR_NEGATIVE_1_0 (-1.0_rk8,0.0_rk8)
#define CONST_COMPLEX_PAIR_NEGATIVE_0_5 (-0.5_rk8,0.0_rk8)
#define CONST_COMPLEX_0_0 0.0_ck8
#define CONST_COMPLEX_1_0 1.0_ck8
#define size_of_PRECISION_complex size_of_double_complex_datatype
#else
#undef elpa_transpose_vectors_complex_PRECISION
#undef elpa_reduce_add_vectors_complex_PRECISION
#undef bandred_complex_PRECISION
#undef trans_ev_band_to_full_complex_PRECISION
#undef tridiag_band_complex_PRECISION
#undef trans_ev_tridi_to_band_complex_PRECISION
#undef band_band_complex_PRECISION
#undef tridiag_complex_PRECISION
#undef solve_tridi_PRECISION
#undef solve_tridi_col_PRECISION
#undef solve_tridi_single_problem_PRECISION
#undef qr_pdgeqrf_2dcomm_PRECISION
#undef hh_transform_complex_PRECISION
#undef symm_matrix_allreduce_PRECISION
#undef herm_matrix_allreduce_PRECISION
#undef redist_band_complex_PRECISION
#undef unpack_row_complex_cpu_PRECISION
#undef unpack_row_complex_cpu_openmp_PRECISION
#undef unpack_and_prepare_row_group_complex_gpu_PRECISION
#undef extract_hh_tau_complex_gpu_PRECISION
#undef compute_hh_dot_products_complex_gpu_PRECISION
#undef compute_hh_trafo_complex_cpu_openmp_PRECISION
#undef compute_hh_trafo_complex_cpu_PRECISION
#undef pack_row_group_complex_gpu_PRECISION
#undef pack_row_complex_cpu_openmp_PRECISION
#undef pack_row_complex_cpu_PRECISION
#undef wy_gen_PRECISION
#undef wy_right_PRECISION
#undef wy_left_PRECISION
#undef wy_symm_PRECISION
#undef merge_recursive_PRECISION
#undef merge_systems_PRECISION
#undef distribute_global_column_PRECISION
#undef check_monotony_PRECISION
#undef global_gather_PRECISION
#undef resort_ev_PRECISION
#undef transform_columns_PRECISION
#undef solve_secular_equation_PRECISION
#undef global_product_PRECISION
#undef add_tmp_PRECISION
#undef v_add_s_PRECISION