Auto-generated interfaces for assembly kernels

parent 4b7c1292
define extract_interface
@echo "Generating $@...";
@grep -h "^ *$1" $^ | sed 's/^ *$1//;' > $@ || { rm $@; exit 1; }
@grep -h "^ *$1" $^ | sed 's/^ *$1//;' >> $@ || { rm $@; exit 1; }
endef
elpa test:
......@@ -19,8 +19,9 @@ elpa/elpa_generated.h: $(top_srcdir)/src/elpa_c_interface.F90 | elpa
test/shared_sources/generated.h: $(wildcard $(top_srcdir)/test/shared_sources/*.F90) | test/shared_sources
$(call extract_interface,!c>)
elpa/elpa_generated_fortran_interfaces.h: $(wildcard $(top_srcdir)/src/elpa2_kernels/*.c) | elpa
elpa/elpa_generated_fortran_interfaces.h: $(wildcard $(top_srcdir)/src/elpa2_kernels/*.c) $(wildcard $(top_srcdir)/src/elpa2_kernels/*.s) | elpa
$(call extract_interface,!f>)
$(call extract_interface,#!f>)
generated_headers= config-f90.h elpa/elpa_generated.h test/shared_sources/generated.h elpa/elpa_generated_fortran_interfaces.h
generated-headers: $(generated_headers)
......@@ -54,8 +54,8 @@
# distributed along with the original code in the file "COPYING".
#
# --------------------------------------------------------------------------------------------------
.globl double_hh_trafo_
.globl single_hh_trafo_complex_
.globl double_hh_trafo
.globl single_hh_trafo_complex
.text
#-------------------------------------------------------------------------------
......@@ -382,8 +382,19 @@
# parameter 6: %r9 : ldh
#
#-------------------------------------------------------------------------------
#!f>#ifdef WITH_REAL_SSE_ASSEMBLY_KERNEL
#!f> interface
#!f> subroutine double_hh_trafo(q, hh, nb, nq, ldq, ldh) bind(C,name="double_hh_trafo")
#!f> use, intrinsic :: iso_c_binding
#!f> integer(kind=c_int) :: nb, nq, ldq, ldh
#!f> real(kind=c_double) :: q(*)
#!f> real(kind=c_double) :: hh(nb,6)
#!f> end subroutine
#!f> end interface
#!f>#endif
.align 16,0x90
double_hh_trafo_:
double_hh_trafo:
# Get integer parameters into corresponding registers
......@@ -698,8 +709,18 @@ return1:
# parameter 5: %r8 : ldq
#
#-------------------------------------------------------------------------------
#!f>#ifdef WITH_COMPLEX_SSE_ASSEMBLY_KERNEL
#!f> interface
#!f> subroutine single_hh_trafo_complex(q, hh, nb, nq, ldq) bind(C,name="single_hh_trafo_complex")
#!f> use, intrinsic :: iso_c_binding
#!f> integer(kind=c_int) :: nb, nq, ldq
#!f> complex(kind=c_double) :: q(*)
#!f> complex(kind=c_double) :: hh(nb,2)
#!f> end subroutine
#!f> end interface
#!f>#endif
.align 16,0x90
single_hh_trafo_complex_:
single_hh_trafo_complex:
# Get integer parameters into corresponding registers
......
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