Commit 0588cac0 authored by Andreas Marek's avatar Andreas Marek

Remove assumed size arrays from complex generic simple kernel

This commit is performance critical and has to be timed carefully.
Thus one can switch back to the old implementation. The new one,
however is more safe and better to debug
parent 04065afc
......@@ -71,9 +71,13 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, nq, ldq
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq,*)
complex(kind=ck), intent(in) :: hh(*)
#else
complex(kind=ck), intent(inout) :: q(1:ldq,1:nb)
complex(kind=ck), intent(in) :: hh(1:nb)
#endif
integer(kind=ik) :: i
complex(kind=ck) :: h1, tau1, x(nq)
......@@ -110,9 +114,13 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, nq, ldq, ldh
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq,*)
complex(kind=ck), intent(in) :: hh(ldh,*)
#else
complex(kind=ck), intent(inout) :: q(1:ldq,1:nb+1)
complex(kind=ck), intent(in) :: hh(1:ldh,1:2)
#endif
complex(kind=ck) :: s, h1, h2, tau1, tau2, x(nq), y(nq)
integer(kind=ik) :: i
......
......@@ -128,12 +128,24 @@ module compute_hh_trafo_complex
ttt = mpi_wtime()
do j = ncols, 1, -1
#ifdef WITH_OPENMP
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
call single_hh_trafo_complex_generic_simple(a(1,j+off+a_off,istripe,my_thread), &
bcast_buffer(1,j+off),nbw,nl,stripe_width)
#else
call single_hh_trafo_complex_generic_simple(a(1:stripe_width,j+off+a_off:j+off_a_off+nbw-1,istripe,my_thread), &
bcast_buffer(1:nbw,j+off),nbw,nl,stripe_width)
#endif
#else /* WITH_OPENMP */
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
call single_hh_trafo_complex_generic_simple(a(1,j+off+a_off,istripe), &
bcast_buffer(1,j+off),nbw,nl,stripe_width)
#else
call single_hh_trafo_complex_generic_simple(a(1:stripe_width,j+off+a_off:j+off+a_off+nbw-1,istripe), &
bcast_buffer(1:nbw,j+off),nbw,nl,stripe_width)
#endif
#endif /* WITH_OPENMP */
enddo
#if defined(WITH_NO_SPECIFIC_COMPLEX_KERNEL)
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