Commit 85b93396 authored by Andreas Marek's avatar Andreas Marek

Unify compute_hh_trafo complex/real

parent 08caccbc
......@@ -29,7 +29,6 @@ libelpa@SUFFIX@_private_la_SOURCES = \
src/mod_redist_band.F90 \
src/mod_pack_unpack_cpu.F90 \
src/mod_compute_hh_trafo.F90 \
src/mod_compute_hh_trafo_complex.F90 \
src/aligned_mem.F90 \
src/elpa1_compute_private.F90 \
src/elpa2_determine_workload.F90 \
......@@ -904,11 +903,8 @@ elpa2_compute.i: $(top_srcdir)/src/elpa2_compute.F90
elpa2_kernels_real.i: $(top_srcdir)/src/elpa2_kernels/elpa2_kernels_real.F90
$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa2_kernels/elpa2_kernels_real.F90 -o $@
mod_compute_hh_trafo_real.i: $(top_srcdir)/src/mod_compute_hh_trafo_real.F90
$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/mod_compute_hh_trafo_real.F90 -o $@
mod_compute_hh_trafo_complex.i: $(top_srcdir)/src/mod_compute_hh_trafo_complex.F90
$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/mod_compute_hh_trafo_complex.F90 -o $@
mod_compute_hh_trafo.i: $(top_srcdir)/src/mod_compute_hh_trafo.F90
$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/mod_compute_hh_trafo.F90 -o $@
test_real.i: $(top_srcdir)/test/Fortran/test_real1.F90
$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/test/Fortran/test_real1.F90 -o $@
......
This diff is collapsed.
......@@ -47,13 +47,7 @@
use elpa2_workload
use pack_unpack_cpu
use pack_unpack_gpu
#if REALCASE == 1
use compute_hh_trafo_real
#endif
#if COMPLEXCASE == 1
use compute_hh_trafo_complex
#endif
use compute_hh_trafo
use cuda_functions
use precision
use iso_c_binding
......
......@@ -41,7 +41,7 @@
!
! This file was written by A. Marek, MPCDF
module compute_hh_trafo_real
module compute_hh_trafo
#include "config-f90.h"
use elpa_mpi
implicit none
......@@ -52,6 +52,14 @@ module compute_hh_trafo_real
public compute_hh_trafo_real_cpu_double
#endif
#ifdef WITH_OPENMP
public compute_hh_trafo_complex_cpu_openmp_double
#else
public compute_hh_trafo_complex_cpu_double
#endif
public compute_hh_trafo_complex_gpu_double
#ifdef WANT_SINGLE_PRECISION_REAL
#ifdef WITH_OPENMP
public compute_hh_trafo_real_cpu_openmp_single
......@@ -60,6 +68,16 @@ module compute_hh_trafo_real
#endif
#endif
#ifdef WANT_SINGLE_PRECISION_COMPLEX
#ifdef WITH_OPENMP
public compute_hh_trafo_complex_cpu_openmp_single
#else
public compute_hh_trafo_complex_cpu_single
#endif
public compute_hh_trafo_complex_gpu_single
#endif
contains
!real double precision
......@@ -80,5 +98,41 @@ module compute_hh_trafo_real
#undef SINGLE_PRECISION
#endif
!complex double precision
#define COMPLEXCASE 1
#define DOUBLE_PRECISION 1
#include "precision_macros.h"
#include "compute_hh_trafo.X90"
#undef COMPLEXCASE
#undef DOUBLE_PRECISION
! complex single precision
#if defined(WANT_SINGLE_PRECISION_COMPLEX)
#define COMPLEXCASE 1
#define SINGLE_PRECISION 1
#include "precision_macros.h"
#include "compute_hh_trafo.X90"
#undef COMPLEXCASE
#undef SINGLE_PRECISION
#endif
!complex double precision
#define COMPLEXCASE 1
#define DOUBLE_PRECISION 1
#include "precision_macros.h"
#include "compute_hh_trafo_complex_gpu.X90"
#undef COMPLEXCASE
#undef DOUBLE_PRECISION
! complex single precision
#if defined(WANT_SINGLE_PRECISION_COMPLEX)
#define COMPLEXCASE 1
#define SINGLE_PRECISION 1
#include "precision_macros.h"
#include "compute_hh_trafo_complex_gpu.X90"
#undef COMPLEXCASE
#undef SINGLE_PRECISION
#endif
end module
This diff is collapsed.
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