Commit 7a564731 authored by Andreas Marek's avatar Andreas Marek

Remove assumend size arrays from real simple kernel

This commit might be performance critical, it 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 8395e429
......@@ -71,8 +71,13 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, nq, ldq, ldh
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
real(kind=rk), intent(inout) :: q(ldq,*)
real(kind=rk), intent(in) :: hh(ldh,*)
#else
real(kind=rk), intent(inout) :: q(ldq,1:nb+1)
real(kind=rk), intent(in) :: hh(ldh,2)
#endif
real(kind=rk) :: s, h1, h2, tau1, tau2, x(nq), y(nq)
integer(kind=ik) :: i
......
......@@ -162,12 +162,27 @@ module compute_hh_trafo_real
w(:,1) = bcast_buffer(1:nbw,j+off)
w(:,2) = bcast_buffer(1:nbw,j+off-1)
#ifdef WITH_OPENMP
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
call double_hh_trafo_generic_simple(a(1,j+off+a_off-1,istripe,my_thread), &
w, nbw, nl, stripe_width, nbw)
#else
call double_hh_trafo_generic_simple(a(1:stripe_width,j+off+a_off-1:j+off+a_off-1+nbw,istripe,my_thread), &
w, nbw, nl, stripe_width, nbw)
#endif
#else /* WITH_OPENMP */
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
call double_hh_trafo_generic_simple(a(1,j+off+a_off-1,istripe), &
w, nbw, nl, stripe_width, nbw)
#else
call double_hh_trafo_generic_simple(a(1:stripe_width,j+off+a_off-1:j+off+a_off-1+nbw,istripe), &
w, nbw, nl, stripe_width, nbw)
#endif
#endif /* WITH_OPENMP */
enddo
#if defined(WITH_NO_SPECIFIC_REAL_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