mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-06 22:55:08 +00:00
psb_geabs corrected version with test
This commit is contained in:
@@ -2770,7 +2770,7 @@ contains
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
if (allocated(x%v)) then
|
||||
call y%axpby(min(x%get_nrows(),y%get_nrows()),czero,x,cone,info)
|
||||
call y%axpby(min(x%get_nrows(),y%get_nrows()),cone,x,czero,info)
|
||||
call y%absval()
|
||||
end if
|
||||
|
||||
|
||||
@@ -2828,7 +2828,7 @@ contains
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
if (allocated(x%v)) then
|
||||
call y%axpby(min(x%get_nrows(),y%get_nrows()),dzero,x,done,info)
|
||||
call y%axpby(min(x%get_nrows(),y%get_nrows()),done,x,dzero,info)
|
||||
call y%absval()
|
||||
end if
|
||||
|
||||
|
||||
@@ -2828,7 +2828,7 @@ contains
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
if (allocated(x%v)) then
|
||||
call y%axpby(min(x%get_nrows(),y%get_nrows()),szero,x,sone,info)
|
||||
call y%axpby(min(x%get_nrows(),y%get_nrows()),sone,x,szero,info)
|
||||
call y%absval()
|
||||
end if
|
||||
|
||||
|
||||
@@ -2770,7 +2770,7 @@ contains
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
if (allocated(x%v)) then
|
||||
call y%axpby(min(x%get_nrows(),y%get_nrows()),zzero,x,zone,info)
|
||||
call y%axpby(min(x%get_nrows(),y%get_nrows()),zone,x,zzero,info)
|
||||
call y%absval()
|
||||
end if
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ subroutine psb_cabs_vect(x,y,desc_a,info)
|
||||
end if
|
||||
|
||||
if(desc_a%get_local_rows() > 0) then
|
||||
call y%absval(x)
|
||||
call x%absval(y)
|
||||
end if
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
|
||||
@@ -92,7 +92,7 @@ subroutine psb_dabs_vect(x,y,desc_a,info)
|
||||
end if
|
||||
|
||||
if(desc_a%get_local_rows() > 0) then
|
||||
call y%absval(x)
|
||||
call x%absval(y)
|
||||
end if
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
|
||||
@@ -92,7 +92,7 @@ subroutine psb_sabs_vect(x,y,desc_a,info)
|
||||
end if
|
||||
|
||||
if(desc_a%get_local_rows() > 0) then
|
||||
call y%absval(x)
|
||||
call x%absval(y)
|
||||
end if
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
|
||||
@@ -92,7 +92,7 @@ subroutine psb_zabs_vect(x,y,desc_a,info)
|
||||
end if
|
||||
|
||||
if(desc_a%get_local_rows() > 0) then
|
||||
call y%absval(x)
|
||||
call x%absval(y)
|
||||
end if
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
|
||||
@@ -214,7 +214,6 @@ program vecoperation
|
||||
call psb_geabs(x,absz,desc_a,info)
|
||||
|
||||
if (iam == psb_root_) then
|
||||
write(psb_out_unit,'("info = ",I1)')info
|
||||
vz = absz%get_vect()
|
||||
write(psb_out_unit,'("|x| = ",es12.1)')vz(:)
|
||||
end if
|
||||
|
||||
Reference in New Issue
Block a user