Take out IBASE from exscan, makes no sense.

omp-threadsafe
sfilippone 2 years ago
parent 08ff37332a
commit f3efea0a89

@ -157,14 +157,13 @@ module psi_c_serial_mod
end interface psi_sct
interface psi_exscan
subroutine psi_c_exscanv(n,x,info,shift,ibase)
subroutine psi_c_exscanv(n,x,info,shift)
import :: psb_ipk_, psb_spk_
implicit none
integer(psb_ipk_), intent(in) :: n
complex(psb_spk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
complex(psb_spk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
end subroutine psi_c_exscanv
end interface psi_exscan

@ -157,14 +157,13 @@ module psi_d_serial_mod
end interface psi_sct
interface psi_exscan
subroutine psi_d_exscanv(n,x,info,shift,ibase)
subroutine psi_d_exscanv(n,x,info,shift)
import :: psb_ipk_, psb_dpk_
implicit none
integer(psb_ipk_), intent(in) :: n
real(psb_dpk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
real(psb_dpk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
end subroutine psi_d_exscanv
end interface psi_exscan

@ -157,14 +157,13 @@ module psi_e_serial_mod
end interface psi_sct
interface psi_exscan
subroutine psi_e_exscanv(n,x,info,shift,ibase)
subroutine psi_e_exscanv(n,x,info,shift)
import :: psb_ipk_, psb_lpk_,psb_mpk_, psb_epk_
implicit none
integer(psb_ipk_), intent(in) :: n
integer(psb_epk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_epk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
end subroutine psi_e_exscanv
end interface psi_exscan

@ -157,14 +157,13 @@ module psi_i2_serial_mod
end interface psi_sct
interface psi_exscan
subroutine psi_i2_exscanv(n,x,info,shift,ibase)
subroutine psi_i2_exscanv(n,x,info,shift)
import :: psb_ipk_, psb_lpk_,psb_mpk_, psb_epk_
implicit none
integer(psb_ipk_), intent(in) :: n
integer(psb_i2pk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_i2pk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
end subroutine psi_i2_exscanv
end interface psi_exscan

@ -157,14 +157,13 @@ module psi_m_serial_mod
end interface psi_sct
interface psi_exscan
subroutine psi_m_exscanv(n,x,info,shift,ibase)
subroutine psi_m_exscanv(n,x,info,shift)
import :: psb_ipk_, psb_lpk_,psb_mpk_, psb_epk_
implicit none
integer(psb_ipk_), intent(in) :: n
integer(psb_mpk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_mpk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
end subroutine psi_m_exscanv
end interface psi_exscan

@ -157,14 +157,13 @@ module psi_s_serial_mod
end interface psi_sct
interface psi_exscan
subroutine psi_s_exscanv(n,x,info,shift,ibase)
subroutine psi_s_exscanv(n,x,info,shift)
import :: psb_ipk_, psb_spk_
implicit none
integer(psb_ipk_), intent(in) :: n
real(psb_spk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
real(psb_spk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
end subroutine psi_s_exscanv
end interface psi_exscan

@ -157,14 +157,13 @@ module psi_z_serial_mod
end interface psi_sct
interface psi_exscan
subroutine psi_z_exscanv(n,x,info,shift,ibase)
subroutine psi_z_exscanv(n,x,info,shift)
import :: psb_ipk_, psb_dpk_
implicit none
integer(psb_ipk_), intent(in) :: n
complex(psb_dpk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
complex(psb_dpk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
end subroutine psi_z_exscanv
end interface psi_exscan

@ -2243,7 +2243,7 @@ subroutine psb_c_mv_csc_from_coo(a,b,info)
!$OMP END ATOMIC
end do
!$OMP END DO
call psi_exscan(nc+1,a%icp,info,shift=ione,ibase=ione)
call psi_exscan(nc+1,a%icp,info,shift=ione)
!$OMP END PARALLEL
#else
a%icp(:) = 0
@ -2251,7 +2251,7 @@ subroutine psb_c_mv_csc_from_coo(a,b,info)
i = itemp(k)
a%icp(i) = a%icp(i) + 1
end do
call psi_exscan(nc+1,a%icp,info,shift=ione,ibase=ione)
call psi_exscan(nc+1,a%icp,info,shift=ione)
#endif
call a%set_host()

@ -2935,7 +2935,7 @@ subroutine psb_c_cp_csr_from_coo(a,b,info)
!$OMP END ATOMIC
end do
!$OMP END DO
call psi_exscan(nr+1,a%irp,info,shift=ione,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
!$OMP END PARALLEL
#else
a%irp(:) = 0
@ -2943,7 +2943,7 @@ subroutine psb_c_cp_csr_from_coo(a,b,info)
i = itemp(k)
a%irp(i) = a%irp(i) + 1
end do
call psi_exscan(nr+1,a%irp,info,shift=cone,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
#endif
call a%set_host()
@ -3103,7 +3103,7 @@ subroutine psb_c_mv_csr_from_coo(a,b,info)
!$OMP END ATOMIC
end do
!$OMP END DO
call psi_exscan(nr+1,a%irp,info,shift=ione,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
!$OMP END PARALLEL
#else
a%irp(:) = 0
@ -3111,7 +3111,7 @@ subroutine psb_c_mv_csr_from_coo(a,b,info)
i = itemp(k)
a%irp(i) = a%irp(i) + 1
end do
call psi_exscan(nr+1,a%irp,info,shift=ione,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
#endif
call a%set_host()

@ -2243,7 +2243,7 @@ subroutine psb_d_mv_csc_from_coo(a,b,info)
!$OMP END ATOMIC
end do
!$OMP END DO
call psi_exscan(nc+1,a%icp,info,shift=ione,ibase=ione)
call psi_exscan(nc+1,a%icp,info,shift=ione)
!$OMP END PARALLEL
#else
a%icp(:) = 0
@ -2251,7 +2251,7 @@ subroutine psb_d_mv_csc_from_coo(a,b,info)
i = itemp(k)
a%icp(i) = a%icp(i) + 1
end do
call psi_exscan(nc+1,a%icp,info,shift=ione,ibase=ione)
call psi_exscan(nc+1,a%icp,info,shift=ione)
#endif
call a%set_host()

@ -2935,7 +2935,7 @@ subroutine psb_d_cp_csr_from_coo(a,b,info)
!$OMP END ATOMIC
end do
!$OMP END DO
call psi_exscan(nr+1,a%irp,info,shift=ione,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
!$OMP END PARALLEL
#else
a%irp(:) = 0
@ -2943,7 +2943,7 @@ subroutine psb_d_cp_csr_from_coo(a,b,info)
i = itemp(k)
a%irp(i) = a%irp(i) + 1
end do
call psi_exscan(nr+1,a%irp,info,shift=done,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
#endif
call a%set_host()
@ -3103,7 +3103,7 @@ subroutine psb_d_mv_csr_from_coo(a,b,info)
!$OMP END ATOMIC
end do
!$OMP END DO
call psi_exscan(nr+1,a%irp,info,shift=ione,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
!$OMP END PARALLEL
#else
a%irp(:) = 0
@ -3111,7 +3111,7 @@ subroutine psb_d_mv_csr_from_coo(a,b,info)
i = itemp(k)
a%irp(i) = a%irp(i) + 1
end do
call psi_exscan(nr+1,a%irp,info,shift=ione,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
#endif
call a%set_host()

@ -2243,7 +2243,7 @@ subroutine psb_s_mv_csc_from_coo(a,b,info)
!$OMP END ATOMIC
end do
!$OMP END DO
call psi_exscan(nc+1,a%icp,info,shift=ione,ibase=ione)
call psi_exscan(nc+1,a%icp,info,shift=ione)
!$OMP END PARALLEL
#else
a%icp(:) = 0
@ -2251,7 +2251,7 @@ subroutine psb_s_mv_csc_from_coo(a,b,info)
i = itemp(k)
a%icp(i) = a%icp(i) + 1
end do
call psi_exscan(nc+1,a%icp,info,shift=ione,ibase=ione)
call psi_exscan(nc+1,a%icp,info,shift=ione)
#endif
call a%set_host()

@ -2935,7 +2935,7 @@ subroutine psb_s_cp_csr_from_coo(a,b,info)
!$OMP END ATOMIC
end do
!$OMP END DO
call psi_exscan(nr+1,a%irp,info,shift=ione,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
!$OMP END PARALLEL
#else
a%irp(:) = 0
@ -2943,7 +2943,7 @@ subroutine psb_s_cp_csr_from_coo(a,b,info)
i = itemp(k)
a%irp(i) = a%irp(i) + 1
end do
call psi_exscan(nr+1,a%irp,info,shift=sone,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
#endif
call a%set_host()
@ -3103,7 +3103,7 @@ subroutine psb_s_mv_csr_from_coo(a,b,info)
!$OMP END ATOMIC
end do
!$OMP END DO
call psi_exscan(nr+1,a%irp,info,shift=ione,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
!$OMP END PARALLEL
#else
a%irp(:) = 0
@ -3111,7 +3111,7 @@ subroutine psb_s_mv_csr_from_coo(a,b,info)
i = itemp(k)
a%irp(i) = a%irp(i) + 1
end do
call psi_exscan(nr+1,a%irp,info,shift=ione,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
#endif
call a%set_host()

@ -2243,7 +2243,7 @@ subroutine psb_z_mv_csc_from_coo(a,b,info)
!$OMP END ATOMIC
end do
!$OMP END DO
call psi_exscan(nc+1,a%icp,info,shift=ione,ibase=ione)
call psi_exscan(nc+1,a%icp,info,shift=ione)
!$OMP END PARALLEL
#else
a%icp(:) = 0
@ -2251,7 +2251,7 @@ subroutine psb_z_mv_csc_from_coo(a,b,info)
i = itemp(k)
a%icp(i) = a%icp(i) + 1
end do
call psi_exscan(nc+1,a%icp,info,shift=ione,ibase=ione)
call psi_exscan(nc+1,a%icp,info,shift=ione)
#endif
call a%set_host()

@ -2935,7 +2935,7 @@ subroutine psb_z_cp_csr_from_coo(a,b,info)
!$OMP END ATOMIC
end do
!$OMP END DO
call psi_exscan(nr+1,a%irp,info,shift=ione,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
!$OMP END PARALLEL
#else
a%irp(:) = 0
@ -2943,7 +2943,7 @@ subroutine psb_z_cp_csr_from_coo(a,b,info)
i = itemp(k)
a%irp(i) = a%irp(i) + 1
end do
call psi_exscan(nr+1,a%irp,info,shift=zone,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
#endif
call a%set_host()
@ -3103,7 +3103,7 @@ subroutine psb_z_mv_csr_from_coo(a,b,info)
!$OMP END ATOMIC
end do
!$OMP END DO
call psi_exscan(nr+1,a%irp,info,shift=ione,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
!$OMP END PARALLEL
#else
a%irp(:) = 0
@ -3111,7 +3111,7 @@ subroutine psb_z_mv_csr_from_coo(a,b,info)
i = itemp(k)
a%irp(i) = a%irp(i) + 1
end do
call psi_exscan(nr+1,a%irp,info,shift=ione,ibase=ione)
call psi_exscan(nr+1,a%irp,info,shift=ione)
#endif
call a%set_host()

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine psi_c_exscanv(n,x,info,shift,ibase)
subroutine psi_c_exscanv(n,x,info,shift)
use psi_c_serial_mod, psb_protect_name => psi_c_exscanv
use psb_const_mod
use psb_error_mod
@ -41,10 +41,8 @@ subroutine psi_c_exscanv(n,x,info,shift,ibase)
complex(psb_spk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
complex(psb_spk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
complex(psb_spk_) :: shift_, tp, ts
integer(psb_ipk_) :: ibase_
logical is_nested, is_parallel
if (present(shift)) then
@ -52,11 +50,6 @@ subroutine psi_c_exscanv(n,x,info,shift,ibase)
else
shift_ = czero
end if
if (present(ibase)) then
ibase_ = ibase
else
ibase_ = ione
end if
#if defined(OPENMP)
is_parallel = omp_in_parallel()
@ -97,12 +90,12 @@ contains
wrk = (n)/nthreads
if (ithread < MOD((n),nthreads)) then
wrk = wrk + 1
first_idx = ithread*wrk + ibase_
first_idx = ithread*wrk + 1
else
first_idx = ithread*wrk + MOD((n),nthreads) + ibase_
first_idx = ithread*wrk + MOD((n),nthreads) + 1
end if
last_idx = min(first_idx + wrk - 1,n - (ione-ibase_))
last_idx = min(first_idx + wrk - 1,n )
if (first_idx<=last_idx) then
sumb(ithread+2) = sumb(ithread+2) + x(first_idx)
do i=first_idx+1,last_idx

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine psi_d_exscanv(n,x,info,shift,ibase)
subroutine psi_d_exscanv(n,x,info,shift)
use psi_d_serial_mod, psb_protect_name => psi_d_exscanv
use psb_const_mod
use psb_error_mod
@ -41,10 +41,8 @@ subroutine psi_d_exscanv(n,x,info,shift,ibase)
real(psb_dpk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
real(psb_dpk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
real(psb_dpk_) :: shift_, tp, ts
integer(psb_ipk_) :: ibase_
logical is_nested, is_parallel
if (present(shift)) then
@ -52,11 +50,6 @@ subroutine psi_d_exscanv(n,x,info,shift,ibase)
else
shift_ = dzero
end if
if (present(ibase)) then
ibase_ = ibase
else
ibase_ = ione
end if
#if defined(OPENMP)
is_parallel = omp_in_parallel()
@ -97,12 +90,12 @@ contains
wrk = (n)/nthreads
if (ithread < MOD((n),nthreads)) then
wrk = wrk + 1
first_idx = ithread*wrk + ibase_
first_idx = ithread*wrk + 1
else
first_idx = ithread*wrk + MOD((n),nthreads) + ibase_
first_idx = ithread*wrk + MOD((n),nthreads) + 1
end if
last_idx = min(first_idx + wrk - 1,n - (ione-ibase_))
last_idx = min(first_idx + wrk - 1,n )
if (first_idx<=last_idx) then
sumb(ithread+2) = sumb(ithread+2) + x(first_idx)
do i=first_idx+1,last_idx

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine psi_e_exscanv(n,x,info,shift,ibase)
subroutine psi_e_exscanv(n,x,info,shift)
use psi_e_serial_mod, psb_protect_name => psi_e_exscanv
use psb_const_mod
use psb_error_mod
@ -41,10 +41,8 @@ subroutine psi_e_exscanv(n,x,info,shift,ibase)
integer(psb_epk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_epk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
integer(psb_epk_) :: shift_, tp, ts
integer(psb_ipk_) :: ibase_
logical is_nested, is_parallel
if (present(shift)) then
@ -52,11 +50,6 @@ subroutine psi_e_exscanv(n,x,info,shift,ibase)
else
shift_ = ezero
end if
if (present(ibase)) then
ibase_ = ibase
else
ibase_ = ione
end if
#if defined(OPENMP)
is_parallel = omp_in_parallel()
@ -97,12 +90,12 @@ contains
wrk = (n)/nthreads
if (ithread < MOD((n),nthreads)) then
wrk = wrk + 1
first_idx = ithread*wrk + ibase_
first_idx = ithread*wrk + 1
else
first_idx = ithread*wrk + MOD((n),nthreads) + ibase_
first_idx = ithread*wrk + MOD((n),nthreads) + 1
end if
last_idx = min(first_idx + wrk - 1,n - (ione-ibase_))
last_idx = min(first_idx + wrk - 1,n )
if (first_idx<=last_idx) then
sumb(ithread+2) = sumb(ithread+2) + x(first_idx)
do i=first_idx+1,last_idx

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine psi_i2_exscanv(n,x,info,shift,ibase)
subroutine psi_i2_exscanv(n,x,info,shift)
use psi_i2_serial_mod, psb_protect_name => psi_i2_exscanv
use psb_const_mod
use psb_error_mod
@ -41,10 +41,8 @@ subroutine psi_i2_exscanv(n,x,info,shift,ibase)
integer(psb_i2pk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_i2pk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
integer(psb_i2pk_) :: shift_, tp, ts
integer(psb_ipk_) :: ibase_
logical is_nested, is_parallel
if (present(shift)) then
@ -52,11 +50,6 @@ subroutine psi_i2_exscanv(n,x,info,shift,ibase)
else
shift_ = i2zero
end if
if (present(ibase)) then
ibase_ = ibase
else
ibase_ = ione
end if
#if defined(OPENMP)
is_parallel = omp_in_parallel()
@ -97,12 +90,12 @@ contains
wrk = (n)/nthreads
if (ithread < MOD((n),nthreads)) then
wrk = wrk + 1
first_idx = ithread*wrk + ibase_
first_idx = ithread*wrk + 1
else
first_idx = ithread*wrk + MOD((n),nthreads) + ibase_
first_idx = ithread*wrk + MOD((n),nthreads) + 1
end if
last_idx = min(first_idx + wrk - 1,n - (ione-ibase_))
last_idx = min(first_idx + wrk - 1,n )
if (first_idx<=last_idx) then
sumb(ithread+2) = sumb(ithread+2) + x(first_idx)
do i=first_idx+1,last_idx

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine psi_m_exscanv(n,x,info,shift,ibase)
subroutine psi_m_exscanv(n,x,info,shift)
use psi_m_serial_mod, psb_protect_name => psi_m_exscanv
use psb_const_mod
use psb_error_mod
@ -41,10 +41,8 @@ subroutine psi_m_exscanv(n,x,info,shift,ibase)
integer(psb_mpk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_mpk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
integer(psb_mpk_) :: shift_, tp, ts
integer(psb_ipk_) :: ibase_
logical is_nested, is_parallel
if (present(shift)) then
@ -52,11 +50,6 @@ subroutine psi_m_exscanv(n,x,info,shift,ibase)
else
shift_ = mzero
end if
if (present(ibase)) then
ibase_ = ibase
else
ibase_ = ione
end if
#if defined(OPENMP)
is_parallel = omp_in_parallel()
@ -97,12 +90,12 @@ contains
wrk = (n)/nthreads
if (ithread < MOD((n),nthreads)) then
wrk = wrk + 1
first_idx = ithread*wrk + ibase_
first_idx = ithread*wrk + 1
else
first_idx = ithread*wrk + MOD((n),nthreads) + ibase_
first_idx = ithread*wrk + MOD((n),nthreads) + 1
end if
last_idx = min(first_idx + wrk - 1,n - (ione-ibase_))
last_idx = min(first_idx + wrk - 1,n )
if (first_idx<=last_idx) then
sumb(ithread+2) = sumb(ithread+2) + x(first_idx)
do i=first_idx+1,last_idx

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine psi_s_exscanv(n,x,info,shift,ibase)
subroutine psi_s_exscanv(n,x,info,shift)
use psi_s_serial_mod, psb_protect_name => psi_s_exscanv
use psb_const_mod
use psb_error_mod
@ -41,10 +41,8 @@ subroutine psi_s_exscanv(n,x,info,shift,ibase)
real(psb_spk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
real(psb_spk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
real(psb_spk_) :: shift_, tp, ts
integer(psb_ipk_) :: ibase_
logical is_nested, is_parallel
if (present(shift)) then
@ -52,11 +50,6 @@ subroutine psi_s_exscanv(n,x,info,shift,ibase)
else
shift_ = szero
end if
if (present(ibase)) then
ibase_ = ibase
else
ibase_ = ione
end if
#if defined(OPENMP)
is_parallel = omp_in_parallel()
@ -97,12 +90,12 @@ contains
wrk = (n)/nthreads
if (ithread < MOD((n),nthreads)) then
wrk = wrk + 1
first_idx = ithread*wrk + ibase_
first_idx = ithread*wrk + 1
else
first_idx = ithread*wrk + MOD((n),nthreads) + ibase_
first_idx = ithread*wrk + MOD((n),nthreads) + 1
end if
last_idx = min(first_idx + wrk - 1,n - (ione-ibase_))
last_idx = min(first_idx + wrk - 1,n )
if (first_idx<=last_idx) then
sumb(ithread+2) = sumb(ithread+2) + x(first_idx)
do i=first_idx+1,last_idx

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine psi_z_exscanv(n,x,info,shift,ibase)
subroutine psi_z_exscanv(n,x,info,shift)
use psi_z_serial_mod, psb_protect_name => psi_z_exscanv
use psb_const_mod
use psb_error_mod
@ -41,10 +41,8 @@ subroutine psi_z_exscanv(n,x,info,shift,ibase)
complex(psb_dpk_), intent (inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
complex(psb_dpk_), intent(in), optional :: shift
integer(psb_ipk_), intent(in), optional :: ibase
complex(psb_dpk_) :: shift_, tp, ts
integer(psb_ipk_) :: ibase_
logical is_nested, is_parallel
if (present(shift)) then
@ -52,11 +50,6 @@ subroutine psi_z_exscanv(n,x,info,shift,ibase)
else
shift_ = zzero
end if
if (present(ibase)) then
ibase_ = ibase
else
ibase_ = ione
end if
#if defined(OPENMP)
is_parallel = omp_in_parallel()
@ -97,12 +90,12 @@ contains
wrk = (n)/nthreads
if (ithread < MOD((n),nthreads)) then
wrk = wrk + 1
first_idx = ithread*wrk + ibase_
first_idx = ithread*wrk + 1
else
first_idx = ithread*wrk + MOD((n),nthreads) + ibase_
first_idx = ithread*wrk + MOD((n),nthreads) + 1
end if
last_idx = min(first_idx + wrk - 1,n - (ione-ibase_))
last_idx = min(first_idx + wrk - 1,n )
if (first_idx<=last_idx) then
sumb(ithread+2) = sumb(ithread+2) + x(first_idx)
do i=first_idx+1,last_idx

Loading…
Cancel
Save