Cleanup hash_map using new indx_map%set_lc

repack-csga
sfilippone 8 months ago
parent 7ec394ce1c
commit d8ed01218d

@ -660,7 +660,7 @@ contains
logical, intent(in), optional :: mask(:) logical, intent(in), optional :: mask(:)
integer(psb_ipk_), intent(in), optional :: lidx(:) integer(psb_ipk_), intent(in), optional :: lidx(:)
integer(psb_ipk_) :: i, is, lip, nrow, ncol, inxt,& integer(psb_ipk_) :: i, is, lip, nrow, ncol,&
& err_act & err_act
integer(psb_lpk_) :: mglob, ip, nxt, tlip integer(psb_lpk_) :: mglob, ip, nxt, tlip
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
@ -706,7 +706,7 @@ contains
if (present(mask)) then if (present(mask)) then
!$omp parallel do default(none) schedule(dynamic) & !$omp parallel do default(none) schedule(dynamic) &
!$omp shared(lidx,mask,name,me,is,idx,ins_lck,mglob,idxmap,ncol,nrow,laddsz) & !$omp shared(lidx,mask,name,me,is,idx,ins_lck,mglob,idxmap,ncol,nrow,laddsz) &
!$omp private(i,ip,lip,tlip,nxt,inxt,info) & !$omp private(i,ip,lip,tlip,nxt,info) &
!$omp reduction(.AND.:isLoopValid) !$omp reduction(.AND.:isLoopValid)
do i = 1, is do i = 1, is
if (mask(i)) then if (mask(i)) then
@ -746,8 +746,8 @@ contains
isLoopValid = .false. isLoopValid = .false.
end if end if
idxmap%loc_to_glob(nxt) = ip idxmap%loc_to_glob(nxt) = ip
inxt = max(ncol,nxt) nxt = max(ncol,nxt)
call idxmap%set_lc(inxt) call idxmap%set_lc(nxt)
endif endif
idx(i) = lip idx(i) = lip
info = psb_success_ info = psb_success_
@ -770,7 +770,7 @@ contains
!$omp parallel do default(none) schedule(dynamic) & !$omp parallel do default(none) schedule(dynamic) &
!$omp shared(lidx,name,me,is,idx,ins_lck,mglob,idxmap,ncol,nrow,laddsz) & !$omp shared(lidx,name,me,is,idx,ins_lck,mglob,idxmap,ncol,nrow,laddsz) &
!$omp private(i,ip,lip,tlip,nxt,inxt,info) & !$omp private(i,ip,lip,tlip,nxt,info) &
!$omp reduction(.AND.:isLoopValid) !$omp reduction(.AND.:isLoopValid)
do i = 1, is do i = 1, is
ip = idx(i) ip = idx(i)
@ -809,8 +809,8 @@ contains
isLoopValid = .false. isLoopValid = .false.
end if end if
idxmap%loc_to_glob(nxt) = ip idxmap%loc_to_glob(nxt) = ip
inxt = max(ncol,nxt) nxt = max(ncol,nxt)
call idxmap%set_lc(inxt) call idxmap%set_lc(nxt)
endif endif
idx(i) = lip idx(i) = lip
info = psb_success_ info = psb_success_
@ -832,7 +832,7 @@ contains
if (present(mask)) then if (present(mask)) then
!$omp parallel do default(none) schedule(dynamic) & !$omp parallel do default(none) schedule(dynamic) &
!$omp shared(mask,name,me,is,idx,ins_lck,mglob,idxmap,ncol,nrow,laddsz) & !$omp shared(mask,name,me,is,idx,ins_lck,mglob,idxmap,ncol,nrow,laddsz) &
!$omp private(i,ip,lip,tlip,nxt,inxt,info) & !$omp private(i,ip,lip,tlip,nxt,info) &
!$omp reduction(.AND.:isLoopValid) !$omp reduction(.AND.:isLoopValid)
do i = 1, is do i = 1, is
if (mask(i)) then if (mask(i)) then
@ -868,9 +868,8 @@ contains
& a_err='psb_ensure_size',i_err=(/info/)) & a_err='psb_ensure_size',i_err=(/info/))
isLoopValid = .false. isLoopValid = .false.
end if end if
inxt = nxt idxmap%loc_to_glob(nxt) = ip
idxmap%loc_to_glob(inxt) = ip call idxmap%set_lc(nxt)
call idxmap%set_lc(inxt)
endif endif
idx(i) = lip idx(i) = lip
info = psb_success_ info = psb_success_
@ -892,7 +891,7 @@ contains
!$omp parallel do default(none) schedule(dynamic) & !$omp parallel do default(none) schedule(dynamic) &
!$omp shared(name,me,is,idx,ins_lck,mglob,idxmap,ncol,nrow,laddsz) & !$omp shared(name,me,is,idx,ins_lck,mglob,idxmap,ncol,nrow,laddsz) &
!$omp private(i,ip,lip,tlip,nxt,inxt,info) & !$omp private(i,ip,lip,tlip,nxt,info) &
!$omp reduction(.AND.:isLoopValid) !$omp reduction(.AND.:isLoopValid)
do i = 1, is do i = 1, is
ip = idx(i) ip = idx(i)
@ -927,9 +926,8 @@ contains
& a_err='psb_ensure_size',i_err=(/info/)) & a_err='psb_ensure_size',i_err=(/info/))
isLoopValid = .false. isLoopValid = .false.
end if end if
inxt = nxt idxmap%loc_to_glob(nxt) = ip
idxmap%loc_to_glob(inxt) = ip call idxmap%set_lc(nxt)
call idxmap%set_lc(inxt)
endif endif
idx(i) = lip idx(i) = lip
info = psb_success_ info = psb_success_

Loading…
Cancel
Save