Commit e49dd8bf authored by Andreas Marek's avatar Andreas Marek

Start to unify real/complex case: elpa1_compute_template

parent 031b5b3a
......@@ -49,7 +49,7 @@ EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES = \
src/elpa_reduce_add_vectors.X90 \
src/elpa_transpose_vectors.X90 \
src/elpa1_compute_complex_template.X90 \
src/elpa1_compute_real_template.X90 \
src/elpa1_compute_template.X90 \
src/elpa2_compute_real_template.X90 \
src/elpa2_compute_complex_template.X90 \
src/elpa2_kernels/elpa2_kernels_real_template.X90 \
......@@ -884,13 +884,12 @@ EXTRA_DIST = \
test/Fortran/elpa_print_headers.X90 \
src/elpa_reduce_add_vectors.X90 \
src/elpa_transpose_vectors.X90 \
src/elpa1_compute_real_template.X90 \
src/elpa1_compute_template.X90 \
src/elpa1_merge_systems_real_template.X90 \
src/elpa1_solve_tridi_real_template.X90 \
src/elpa1_tools_template.X90 \
src/elpa1_trans_ev_template.X90 \
src/elpa1_tridiag_template.X90 \
src/elpa1_compute_complex_template.X90 \
src/elpa2_compute_real_template.X90 \
src/elpa2_compute_complex_template.X90 \
src/precision_macros.h \
......
#if 0
! This file is part of ELPA.
!
! The ELPA library was originally created by the ELPA consortium,
! consisting of the following organizations:
!
! - Max Planck Computing and Data Facility (MPCDF), formerly known as
! Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG),
! - Bergische Universität Wuppertal, Lehrstuhl für angewandte
! Informatik,
! - Technische Universität München, Lehrstuhl für Informatik mit
! Schwerpunkt Wissenschaftliches Rechnen ,
! - Fritz-Haber-Institut, Berlin, Abt. Theorie,
! - Max-Plack-Institut für Mathematik in den Naturwissenschaften,
! Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
! and
! - IBM Deutschland GmbH
!
! This particular source code file contains additions, changes and
! enhancements authored by Intel Corporation which is not part of
! the ELPA consortium.
!
! More information can be found here:
! http://elpa.mpcdf.mpg.de/
!
! ELPA is free software: you can redistribute it and/or modify
! it under the terms of the version 3 of the license of the
! GNU Lesser General Public License as published by the Free
! Software Foundation.
!
! ELPA is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU Lesser General Public License for more details.
!
! You should have received a copy of the GNU Lesser General Public License
! along with ELPA. If not, see <http://www.gnu.org/licenses/>
!
! ELPA reflects a substantial effort on the part of the original
! ELPA consortium, and we ask you to respect the spirit of the
! license that we chose: i.e., please contribute any changes you
! may have back to the original ELPA library distribution, and keep
! any derivatives of ELPA under the same license that we chose for
! the original distribution, the GNU Lesser General Public License.
!
!
! ELPA1 -- Faster replacements for ScaLAPACK symmetric eigenvalue routines
!
! Copyright of the original code rests with the authors inside the ELPA
! consortium. The copyright of any additional modifications shall rest
! with their original authors, but shall adhere to the licensing terms
! distributed along with the original code in the file "COPYING".
#endif
#include "precision_macros_complex.h"
#define COMPLEXCASE 1
#undef REALCASE
#include "elpa1_tridiag_template.X90"
#include "elpa1_trans_ev_template.X90"
#include "elpa1_tools_template.X90"
#undef COMPLEXCASE
#define ALREADY_DEFINED 1
......@@ -212,10 +212,14 @@ module ELPA1_COMPUTE
#define DOUBLE_PRECISION_REAL 1
#define REAL_DATATYPE rk8
#include "elpa1_compute_real_template.X90"
#define REALCASE 1
#undef COMPLEXCASE
#include "elpa1_compute_template.X90"
#undef DOUBLE_PRECISION_REAL
#undef REAL_DATATYPE
#undef REALCASE
! real single precision
#if defined(WANT_SINGLE_PRECISION_REAL)
......@@ -223,7 +227,12 @@ module ELPA1_COMPUTE
#undef DOUBLE_PRECISION_REAL
#define REAL_DATATYPE rk4
#include "elpa1_compute_real_template.X90"
#define REALCASE 1
#undef COMPLEXCASE
#include "elpa1_compute_template.X90"
#undef REALCASE
#undef DOUBLE_PRECISION_REAL
#undef REAL_DATATYPE
......@@ -234,7 +243,12 @@ module ELPA1_COMPUTE
#define DOUBLE_PRECISION_COMPLEX 1
#define REAL_DATATYPE rk8
#define COMPLEX_DATATYPE ck8
#include "elpa1_compute_complex_template.X90"
#define COMPLEXCASE 1
#undef REALCASE
#include "elpa1_compute_template.X90"
#undef COMPLEXCASE
#undef DOUBLE_PRECISION_COMPLEX
#undef REAL_DATATYPE
......@@ -248,7 +262,12 @@ module ELPA1_COMPUTE
#define REAL_DATATYPE rk4
#define COMPLEX_DATATYPE ck4
#include "elpa1_compute_complex_template.X90"
#define COMPLEXCASE 1
#undef REALCASE
#include "elpa1_compute_template.X90"
#undef COMPLEXCASE
#undef DOUBLE_PRECISION_COMPLEX
#undef COMPLEX_DATATYPE
......
......@@ -52,22 +52,39 @@
! distributed along with the original code in the file "COPYING".
#endif
#if REALCASE == 1
#include "precision_macros.h"
#endif
#if COMPLEXCASE == 1
#include "precision_macros_complex.h"
#endif
#if REALCASE == 1
!cannot use __FILE__ because filename with path can be too long for gfortran (max line length)
#define check_memcpy_cuda(file, success) call check_memcpy_CUDA_f(file, __LINE__, success)
#define check_alloc_cuda(file, success) call check_alloc_CUDA_f(file, __LINE__, success)
#define check_dealloc_cuda(file, success) call check_dealloc_CUDA_f(file, __LINE__, success)
#define REALCASE 1
#undef COMPLEXCASE
#endif
#if REALCASE == 1
#include "elpa1_tridiag_template.X90"
#include "elpa1_trans_ev_template.X90"
#undef REALCASE
#include "elpa1_solve_tridi_real_template.X90"
#include "elpa1_merge_systems_real_template.X90"
#define REALCASE 1
#undef COMPLEXCASE
#include "elpa1_tools_template.X90"
#undef REALCASE
#endif
#if COMPLEXCASE == 1
#include "elpa1_tridiag_template.X90"
#include "elpa1_trans_ev_template.X90"
#include "elpa1_tools_template.X90"
#define ALREADY_DEFINED 1
#endif
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