Change name sync|free space, unify allocate impl

oacc_loloum
sfilippone 7 months ago
parent 479135c62d
commit fbb974fb8b

@ -15,14 +15,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_c_csr_sparse_mat%allocate(m, n, nz) call a%psb_c_csr_sparse_mat%allocate(m, n, nz)
call a%set_host()
if (.not.allocated(a%val)) then call a%sync_dev_space()
allocate(a%val(nz))
allocate(a%ja(nz))
allocate(a%irp(m+1))
end if
call a%set_dev()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_c_csr_sparse_mat%cp_from_coo(b, info) call a%psb_c_csr_sparse_mat%cp_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_c_coo_sparse_mat) type is (psb_c_coo_sparse_mat)
call a%cp_from_coo(b, info) call a%cp_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_c_csr_sparse_mat%cp_from_fmt(b, info) call a%psb_c_csr_sparse_mat%cp_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -40,9 +40,9 @@ contains
call a%psb_c_csr_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans) call a%psb_c_csr_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans)
call y%set_host() call y%set_host()
else else
select type (xx => x) select type (xx => x)
type is (psb_c_vect_oacc) type is (psb_c_vect_oacc)
select type(yy => y) select type(yy => y)
type is (psb_c_vect_oacc) type is (psb_c_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (beta /= dzero) then if (beta /= dzero) then

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_c_csr_sparse_mat%mv_from_coo(b, info) call a%psb_c_csr_sparse_mat%mv_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_c_coo_sparse_mat) type is (psb_c_coo_sparse_mat)
call a%mv_from_coo(b, info) call a%mv_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_c_csr_sparse_mat%mv_from_fmt(b, info) call a%psb_c_csr_sparse_mat%mv_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -14,8 +14,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_c_csr_sparse_mat%reallocate(nz) call a%psb_c_csr_sparse_mat%reallocate(nz)
call a%sync_dev_space()
call a%set_dev() call a%set_host()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -21,20 +21,8 @@ contains
end if end if
call a%psb_c_ell_sparse_mat%allocate(m, n, nz_) call a%psb_c_ell_sparse_mat%allocate(m, n, nz_)
call a%sync_dev_space()
if (.not.allocated(a%val)) then call a%set_host()
allocate(a%val(m, nz_))
allocate(a%ja(m, nz_))
allocate(a%irn(m))
allocate(a%idiag(m))
end if
a%val = czero
a%ja = -1
a%irn = 0
a%idiag = 0
call a%set_dev()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_c_ell_sparse_mat%cp_from_coo(b, info) call a%psb_c_ell_sparse_mat%cp_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_c_coo_sparse_mat) type is (psb_c_coo_sparse_mat)
call a%cp_from_coo(b, info) call a%cp_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_c_ell_sparse_mat%cp_from_fmt(b, info) call a%psb_c_ell_sparse_mat%cp_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -40,9 +40,9 @@ contains
call a%psb_c_ell_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans) call a%psb_c_ell_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans)
call y%set_host() call y%set_host()
else else
select type (xx => x) select type (xx => x)
type is (psb_c_vect_oacc) type is (psb_c_vect_oacc)
select type(yy => y) select type(yy => y)
type is (psb_c_vect_oacc) type is (psb_c_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (beta /= dzero) then if (beta /= dzero) then

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_c_ell_sparse_mat%mv_from_coo(b, info) call a%psb_c_ell_sparse_mat%mv_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_c_coo_sparse_mat) type is (psb_c_coo_sparse_mat)
call a%mv_from_coo(b, info) call a%mv_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_c_ell_sparse_mat%mv_from_fmt(b, info) call a%psb_c_ell_sparse_mat%mv_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -14,8 +14,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_c_ell_sparse_mat%reallocate(nz) call a%psb_c_ell_sparse_mat%reallocate(nz)
call a%sync_dev_space()
call a%set_dev() call a%set_host()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -22,25 +22,8 @@ contains
end if end if
call a%psb_c_hll_sparse_mat%allocate(m, n, nz_) call a%psb_c_hll_sparse_mat%allocate(m, n, nz_)
call a%sync_dev_space()
hksz = a%hksz call a%set_host()
nhacks = (m + hksz - 1) / hksz
if (.not.allocated(a%val)) then
allocate(a%val(nz_ * m))
allocate(a%ja(nz_ * m))
allocate(a%irn(m))
allocate(a%idiag(m))
allocate(a%hkoffs(nhacks))
end if
a%val = czero
a%ja = -1
a%irn = 0
a%idiag = 0
a%hkoffs = 0
call a%set_dev()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_c_hll_sparse_mat%cp_from_coo(b, info) call a%psb_c_hll_sparse_mat%cp_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_c_coo_sparse_mat) type is (psb_c_coo_sparse_mat)
call a%cp_from_coo(b, info) call a%cp_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_c_hll_sparse_mat%cp_from_fmt(b, info) call a%psb_c_hll_sparse_mat%cp_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -40,9 +40,9 @@ contains
call a%psb_c_hll_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans) call a%psb_c_hll_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans)
call y%set_host() call y%set_host()
else else
select type (xx => x) select type (xx => x)
type is (psb_c_vect_oacc) type is (psb_c_vect_oacc)
select type(yy => y) select type(yy => y)
type is (psb_c_vect_oacc) type is (psb_c_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (beta /= dzero) then if (beta /= dzero) then

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_c_hll_sparse_mat%mv_from_coo(b, info) call a%psb_c_hll_sparse_mat%mv_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_c_coo_sparse_mat) type is (psb_c_coo_sparse_mat)
call a%mv_from_coo(b, info) call a%mv_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_c_hll_sparse_mat%mv_from_fmt(b, info) call a%psb_c_hll_sparse_mat%mv_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -15,8 +15,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_c_hll_sparse_mat%reallocate(nz) call a%psb_c_hll_sparse_mat%reallocate(nz)
call a%sync_dev_space()
call a%set_dev() call a%set_host()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -1,6 +1,6 @@
subroutine psb_c_oacc_mlt_v(x, y, info) subroutine psb_c_oacc_mlt_v(x, y, info)
use psb_c_oacc_vect_mod, psb_protect_name => psb_c_oacc_mlt_v use psb_c_oacc_vect_mod, psb_protect_name => psb_c_oacc_mlt_v
implicit none implicit none
class(psb_c_base_vect_type), intent(inout) :: x class(psb_c_base_vect_type), intent(inout) :: x
@ -13,7 +13,7 @@ subroutine psb_c_oacc_mlt_v(x, y, info)
n = min(x%get_nrows(), y%get_nrows()) n = min(x%get_nrows(), y%get_nrows())
info = 0 info = 0
n = min(x%get_nrows(), y%get_nrows()) n = min(x%get_nrows(), y%get_nrows())
select type(xx => x) select type(xx => x)
class is (psb_c_vect_oacc) class is (psb_c_vect_oacc)
if (y%is_host()) call y%sync() if (y%is_host()) call y%sync()
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()

@ -1,5 +1,5 @@
subroutine psb_c_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy) subroutine psb_c_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
use psb_c_oacc_vect_mod, psb_protect_name => psb_c_oacc_mlt_v_2 use psb_c_oacc_vect_mod, psb_protect_name => psb_c_oacc_mlt_v_2
use psb_string_mod use psb_string_mod
implicit none implicit none
complex(psb_spk_), intent(in) :: alpha, beta complex(psb_spk_), intent(in) :: alpha, beta
@ -18,9 +18,9 @@ subroutine psb_c_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
n = min(x%get_nrows(), y%get_nrows(), z%get_nrows()) n = min(x%get_nrows(), y%get_nrows(), z%get_nrows())
info = 0 info = 0
select type(xx => x) select type(xx => x)
class is (psb_c_vect_oacc) class is (psb_c_vect_oacc)
select type (yy => y) select type (yy => y)
class is (psb_c_vect_oacc) class is (psb_c_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync() if (yy%is_host()) call yy%sync()

@ -15,14 +15,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_d_csr_sparse_mat%allocate(m, n, nz) call a%psb_d_csr_sparse_mat%allocate(m, n, nz)
call a%set_host()
if (.not.allocated(a%val)) then call a%sync_dev_space()
allocate(a%val(nz))
allocate(a%ja(nz))
allocate(a%irp(m+1))
end if
call a%set_dev()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_d_csr_sparse_mat%cp_from_coo(b, info) call a%psb_d_csr_sparse_mat%cp_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_d_coo_sparse_mat) type is (psb_d_coo_sparse_mat)
call a%cp_from_coo(b, info) call a%cp_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_d_csr_sparse_mat%cp_from_fmt(b, info) call a%psb_d_csr_sparse_mat%cp_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -40,9 +40,9 @@ contains
call a%psb_d_csr_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans) call a%psb_d_csr_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans)
call y%set_host() call y%set_host()
else else
select type (xx => x) select type (xx => x)
type is (psb_d_vect_oacc) type is (psb_d_vect_oacc)
select type(yy => y) select type(yy => y)
type is (psb_d_vect_oacc) type is (psb_d_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (beta /= dzero) then if (beta /= dzero) then

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_d_csr_sparse_mat%mv_from_coo(b, info) call a%psb_d_csr_sparse_mat%mv_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_d_coo_sparse_mat) type is (psb_d_coo_sparse_mat)
call a%mv_from_coo(b, info) call a%mv_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_d_csr_sparse_mat%mv_from_fmt(b, info) call a%psb_d_csr_sparse_mat%mv_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -14,8 +14,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_d_csr_sparse_mat%reallocate(nz) call a%psb_d_csr_sparse_mat%reallocate(nz)
call a%sync_dev_space()
call a%set_dev() call a%set_host()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -21,20 +21,8 @@ contains
end if end if
call a%psb_d_ell_sparse_mat%allocate(m, n, nz_) call a%psb_d_ell_sparse_mat%allocate(m, n, nz_)
call a%sync_dev_space()
if (.not.allocated(a%val)) then call a%set_host()
allocate(a%val(m, nz_))
allocate(a%ja(m, nz_))
allocate(a%irn(m))
allocate(a%idiag(m))
end if
a%val = dzero
a%ja = -1
a%irn = 0
a%idiag = 0
call a%set_dev()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_d_ell_sparse_mat%cp_from_coo(b, info) call a%psb_d_ell_sparse_mat%cp_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_d_coo_sparse_mat) type is (psb_d_coo_sparse_mat)
call a%cp_from_coo(b, info) call a%cp_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_d_ell_sparse_mat%cp_from_fmt(b, info) call a%psb_d_ell_sparse_mat%cp_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -40,9 +40,9 @@ contains
call a%psb_d_ell_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans) call a%psb_d_ell_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans)
call y%set_host() call y%set_host()
else else
select type (xx => x) select type (xx => x)
type is (psb_d_vect_oacc) type is (psb_d_vect_oacc)
select type(yy => y) select type(yy => y)
type is (psb_d_vect_oacc) type is (psb_d_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (beta /= dzero) then if (beta /= dzero) then

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_d_ell_sparse_mat%mv_from_coo(b, info) call a%psb_d_ell_sparse_mat%mv_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_d_coo_sparse_mat) type is (psb_d_coo_sparse_mat)
call a%mv_from_coo(b, info) call a%mv_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_d_ell_sparse_mat%mv_from_fmt(b, info) call a%psb_d_ell_sparse_mat%mv_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -14,8 +14,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_d_ell_sparse_mat%reallocate(nz) call a%psb_d_ell_sparse_mat%reallocate(nz)
call a%sync_dev_space()
call a%set_dev() call a%set_host()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -22,25 +22,8 @@ contains
end if end if
call a%psb_d_hll_sparse_mat%allocate(m, n, nz_) call a%psb_d_hll_sparse_mat%allocate(m, n, nz_)
call a%sync_dev_space()
hksz = a%hksz call a%set_host()
nhacks = (m + hksz - 1) / hksz
if (.not.allocated(a%val)) then
allocate(a%val(nz_ * m))
allocate(a%ja(nz_ * m))
allocate(a%irn(m))
allocate(a%idiag(m))
allocate(a%hkoffs(nhacks))
end if
a%val = dzero
a%ja = -1
a%irn = 0
a%idiag = 0
a%hkoffs = 0
call a%set_dev()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_d_hll_sparse_mat%cp_from_coo(b, info) call a%psb_d_hll_sparse_mat%cp_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_d_coo_sparse_mat) type is (psb_d_coo_sparse_mat)
call a%cp_from_coo(b, info) call a%cp_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_d_hll_sparse_mat%cp_from_fmt(b, info) call a%psb_d_hll_sparse_mat%cp_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -40,9 +40,9 @@ contains
call a%psb_d_hll_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans) call a%psb_d_hll_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans)
call y%set_host() call y%set_host()
else else
select type (xx => x) select type (xx => x)
type is (psb_d_vect_oacc) type is (psb_d_vect_oacc)
select type(yy => y) select type(yy => y)
type is (psb_d_vect_oacc) type is (psb_d_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (beta /= dzero) then if (beta /= dzero) then

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_d_hll_sparse_mat%mv_from_coo(b, info) call a%psb_d_hll_sparse_mat%mv_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_d_coo_sparse_mat) type is (psb_d_coo_sparse_mat)
call a%mv_from_coo(b, info) call a%mv_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_d_hll_sparse_mat%mv_from_fmt(b, info) call a%psb_d_hll_sparse_mat%mv_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -15,8 +15,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_d_hll_sparse_mat%reallocate(nz) call a%psb_d_hll_sparse_mat%reallocate(nz)
call a%sync_dev_space()
call a%set_dev() call a%set_host()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -1,6 +1,6 @@
subroutine psb_d_oacc_mlt_v(x, y, info) subroutine psb_d_oacc_mlt_v(x, y, info)
use psb_d_oacc_vect_mod, psb_protect_name => psb_d_oacc_mlt_v use psb_d_oacc_vect_mod, psb_protect_name => psb_d_oacc_mlt_v
implicit none implicit none
class(psb_d_base_vect_type), intent(inout) :: x class(psb_d_base_vect_type), intent(inout) :: x
@ -13,7 +13,7 @@ subroutine psb_d_oacc_mlt_v(x, y, info)
n = min(x%get_nrows(), y%get_nrows()) n = min(x%get_nrows(), y%get_nrows())
info = 0 info = 0
n = min(x%get_nrows(), y%get_nrows()) n = min(x%get_nrows(), y%get_nrows())
select type(xx => x) select type(xx => x)
class is (psb_d_vect_oacc) class is (psb_d_vect_oacc)
if (y%is_host()) call y%sync() if (y%is_host()) call y%sync()
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()

@ -1,5 +1,5 @@
subroutine psb_d_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy) subroutine psb_d_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
use psb_d_oacc_vect_mod, psb_protect_name => psb_d_oacc_mlt_v_2 use psb_d_oacc_vect_mod, psb_protect_name => psb_d_oacc_mlt_v_2
use psb_string_mod use psb_string_mod
implicit none implicit none
real(psb_dpk_), intent(in) :: alpha, beta real(psb_dpk_), intent(in) :: alpha, beta
@ -18,9 +18,9 @@ subroutine psb_d_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
n = min(x%get_nrows(), y%get_nrows(), z%get_nrows()) n = min(x%get_nrows(), y%get_nrows(), z%get_nrows())
info = 0 info = 0
select type(xx => x) select type(xx => x)
class is (psb_d_vect_oacc) class is (psb_d_vect_oacc)
select type (yy => y) select type (yy => y)
class is (psb_d_vect_oacc) class is (psb_d_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync() if (yy%is_host()) call yy%sync()

@ -15,14 +15,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_s_csr_sparse_mat%allocate(m, n, nz) call a%psb_s_csr_sparse_mat%allocate(m, n, nz)
call a%set_host()
if (.not.allocated(a%val)) then call a%sync_dev_space()
allocate(a%val(nz))
allocate(a%ja(nz))
allocate(a%irp(m+1))
end if
call a%set_dev()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_s_csr_sparse_mat%cp_from_coo(b, info) call a%psb_s_csr_sparse_mat%cp_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_s_coo_sparse_mat) type is (psb_s_coo_sparse_mat)
call a%cp_from_coo(b, info) call a%cp_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_s_csr_sparse_mat%cp_from_fmt(b, info) call a%psb_s_csr_sparse_mat%cp_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -40,9 +40,9 @@ contains
call a%psb_s_csr_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans) call a%psb_s_csr_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans)
call y%set_host() call y%set_host()
else else
select type (xx => x) select type (xx => x)
type is (psb_s_vect_oacc) type is (psb_s_vect_oacc)
select type(yy => y) select type(yy => y)
type is (psb_s_vect_oacc) type is (psb_s_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (beta /= dzero) then if (beta /= dzero) then

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_s_csr_sparse_mat%mv_from_coo(b, info) call a%psb_s_csr_sparse_mat%mv_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_s_coo_sparse_mat) type is (psb_s_coo_sparse_mat)
call a%mv_from_coo(b, info) call a%mv_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_s_csr_sparse_mat%mv_from_fmt(b, info) call a%psb_s_csr_sparse_mat%mv_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -14,8 +14,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_s_csr_sparse_mat%reallocate(nz) call a%psb_s_csr_sparse_mat%reallocate(nz)
call a%sync_dev_space()
call a%set_dev() call a%set_host()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -21,20 +21,8 @@ contains
end if end if
call a%psb_s_ell_sparse_mat%allocate(m, n, nz_) call a%psb_s_ell_sparse_mat%allocate(m, n, nz_)
call a%sync_dev_space()
if (.not.allocated(a%val)) then call a%set_host()
allocate(a%val(m, nz_))
allocate(a%ja(m, nz_))
allocate(a%irn(m))
allocate(a%idiag(m))
end if
a%val = szero
a%ja = -1
a%irn = 0
a%idiag = 0
call a%set_dev()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_s_ell_sparse_mat%cp_from_coo(b, info) call a%psb_s_ell_sparse_mat%cp_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_s_coo_sparse_mat) type is (psb_s_coo_sparse_mat)
call a%cp_from_coo(b, info) call a%cp_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_s_ell_sparse_mat%cp_from_fmt(b, info) call a%psb_s_ell_sparse_mat%cp_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -40,9 +40,9 @@ contains
call a%psb_s_ell_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans) call a%psb_s_ell_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans)
call y%set_host() call y%set_host()
else else
select type (xx => x) select type (xx => x)
type is (psb_s_vect_oacc) type is (psb_s_vect_oacc)
select type(yy => y) select type(yy => y)
type is (psb_s_vect_oacc) type is (psb_s_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (beta /= dzero) then if (beta /= dzero) then

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_s_ell_sparse_mat%mv_from_coo(b, info) call a%psb_s_ell_sparse_mat%mv_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_s_coo_sparse_mat) type is (psb_s_coo_sparse_mat)
call a%mv_from_coo(b, info) call a%mv_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_s_ell_sparse_mat%mv_from_fmt(b, info) call a%psb_s_ell_sparse_mat%mv_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -14,8 +14,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_s_ell_sparse_mat%reallocate(nz) call a%psb_s_ell_sparse_mat%reallocate(nz)
call a%sync_dev_space()
call a%set_dev() call a%set_host()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -22,25 +22,8 @@ contains
end if end if
call a%psb_s_hll_sparse_mat%allocate(m, n, nz_) call a%psb_s_hll_sparse_mat%allocate(m, n, nz_)
call a%sync_dev_space()
hksz = a%hksz call a%set_host()
nhacks = (m + hksz - 1) / hksz
if (.not.allocated(a%val)) then
allocate(a%val(nz_ * m))
allocate(a%ja(nz_ * m))
allocate(a%irn(m))
allocate(a%idiag(m))
allocate(a%hkoffs(nhacks))
end if
a%val = szero
a%ja = -1
a%irn = 0
a%idiag = 0
a%hkoffs = 0
call a%set_dev()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_s_hll_sparse_mat%cp_from_coo(b, info) call a%psb_s_hll_sparse_mat%cp_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_s_coo_sparse_mat) type is (psb_s_coo_sparse_mat)
call a%cp_from_coo(b, info) call a%cp_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_s_hll_sparse_mat%cp_from_fmt(b, info) call a%psb_s_hll_sparse_mat%cp_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -40,9 +40,9 @@ contains
call a%psb_s_hll_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans) call a%psb_s_hll_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans)
call y%set_host() call y%set_host()
else else
select type (xx => x) select type (xx => x)
type is (psb_s_vect_oacc) type is (psb_s_vect_oacc)
select type(yy => y) select type(yy => y)
type is (psb_s_vect_oacc) type is (psb_s_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (beta /= dzero) then if (beta /= dzero) then

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_s_hll_sparse_mat%mv_from_coo(b, info) call a%psb_s_hll_sparse_mat%mv_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_s_coo_sparse_mat) type is (psb_s_coo_sparse_mat)
call a%mv_from_coo(b, info) call a%mv_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_s_hll_sparse_mat%mv_from_fmt(b, info) call a%psb_s_hll_sparse_mat%mv_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -15,8 +15,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_s_hll_sparse_mat%reallocate(nz) call a%psb_s_hll_sparse_mat%reallocate(nz)
call a%sync_dev_space()
call a%set_dev() call a%set_host()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -1,6 +1,6 @@
subroutine psb_s_oacc_mlt_v(x, y, info) subroutine psb_s_oacc_mlt_v(x, y, info)
use psb_s_oacc_vect_mod, psb_protect_name => psb_s_oacc_mlt_v use psb_s_oacc_vect_mod, psb_protect_name => psb_s_oacc_mlt_v
implicit none implicit none
class(psb_s_base_vect_type), intent(inout) :: x class(psb_s_base_vect_type), intent(inout) :: x
@ -13,7 +13,7 @@ subroutine psb_s_oacc_mlt_v(x, y, info)
n = min(x%get_nrows(), y%get_nrows()) n = min(x%get_nrows(), y%get_nrows())
info = 0 info = 0
n = min(x%get_nrows(), y%get_nrows()) n = min(x%get_nrows(), y%get_nrows())
select type(xx => x) select type(xx => x)
class is (psb_s_vect_oacc) class is (psb_s_vect_oacc)
if (y%is_host()) call y%sync() if (y%is_host()) call y%sync()
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()

@ -1,5 +1,5 @@
subroutine psb_s_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy) subroutine psb_s_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
use psb_s_oacc_vect_mod, psb_protect_name => psb_s_oacc_mlt_v_2 use psb_s_oacc_vect_mod, psb_protect_name => psb_s_oacc_mlt_v_2
use psb_string_mod use psb_string_mod
implicit none implicit none
real(psb_spk_), intent(in) :: alpha, beta real(psb_spk_), intent(in) :: alpha, beta
@ -18,9 +18,9 @@ subroutine psb_s_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
n = min(x%get_nrows(), y%get_nrows(), z%get_nrows()) n = min(x%get_nrows(), y%get_nrows(), z%get_nrows())
info = 0 info = 0
select type(xx => x) select type(xx => x)
class is (psb_s_vect_oacc) class is (psb_s_vect_oacc)
select type (yy => y) select type (yy => y)
class is (psb_s_vect_oacc) class is (psb_s_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync() if (yy%is_host()) call yy%sync()

@ -15,14 +15,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_z_csr_sparse_mat%allocate(m, n, nz) call a%psb_z_csr_sparse_mat%allocate(m, n, nz)
call a%set_host()
if (.not.allocated(a%val)) then call a%sync_dev_space()
allocate(a%val(nz))
allocate(a%ja(nz))
allocate(a%irp(m+1))
end if
call a%set_dev()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_z_csr_sparse_mat%cp_from_coo(b, info) call a%psb_z_csr_sparse_mat%cp_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_z_coo_sparse_mat) type is (psb_z_coo_sparse_mat)
call a%cp_from_coo(b, info) call a%cp_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_z_csr_sparse_mat%cp_from_fmt(b, info) call a%psb_z_csr_sparse_mat%cp_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -40,9 +40,9 @@ contains
call a%psb_z_csr_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans) call a%psb_z_csr_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans)
call y%set_host() call y%set_host()
else else
select type (xx => x) select type (xx => x)
type is (psb_z_vect_oacc) type is (psb_z_vect_oacc)
select type(yy => y) select type(yy => y)
type is (psb_z_vect_oacc) type is (psb_z_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (beta /= dzero) then if (beta /= dzero) then

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_z_csr_sparse_mat%mv_from_coo(b, info) call a%psb_z_csr_sparse_mat%mv_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_z_coo_sparse_mat) type is (psb_z_coo_sparse_mat)
call a%mv_from_coo(b, info) call a%mv_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_z_csr_sparse_mat%mv_from_fmt(b, info) call a%psb_z_csr_sparse_mat%mv_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -14,8 +14,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_z_csr_sparse_mat%reallocate(nz) call a%psb_z_csr_sparse_mat%reallocate(nz)
call a%sync_dev_space()
call a%set_dev() call a%set_host()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -21,20 +21,8 @@ contains
end if end if
call a%psb_z_ell_sparse_mat%allocate(m, n, nz_) call a%psb_z_ell_sparse_mat%allocate(m, n, nz_)
call a%sync_dev_space()
if (.not.allocated(a%val)) then call a%set_host()
allocate(a%val(m, nz_))
allocate(a%ja(m, nz_))
allocate(a%irn(m))
allocate(a%idiag(m))
end if
a%val = zzero
a%ja = -1
a%irn = 0
a%idiag = 0
call a%set_dev()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_z_ell_sparse_mat%cp_from_coo(b, info) call a%psb_z_ell_sparse_mat%cp_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_z_coo_sparse_mat) type is (psb_z_coo_sparse_mat)
call a%cp_from_coo(b, info) call a%cp_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_z_ell_sparse_mat%cp_from_fmt(b, info) call a%psb_z_ell_sparse_mat%cp_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -40,9 +40,9 @@ contains
call a%psb_z_ell_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans) call a%psb_z_ell_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans)
call y%set_host() call y%set_host()
else else
select type (xx => x) select type (xx => x)
type is (psb_z_vect_oacc) type is (psb_z_vect_oacc)
select type(yy => y) select type(yy => y)
type is (psb_z_vect_oacc) type is (psb_z_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (beta /= dzero) then if (beta /= dzero) then

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_z_ell_sparse_mat%mv_from_coo(b, info) call a%psb_z_ell_sparse_mat%mv_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_z_coo_sparse_mat) type is (psb_z_coo_sparse_mat)
call a%mv_from_coo(b, info) call a%mv_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_z_ell_sparse_mat%mv_from_fmt(b, info) call a%psb_z_ell_sparse_mat%mv_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -14,8 +14,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_z_ell_sparse_mat%reallocate(nz) call a%psb_z_ell_sparse_mat%reallocate(nz)
call a%sync_dev_space()
call a%set_dev() call a%set_host()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -22,25 +22,8 @@ contains
end if end if
call a%psb_z_hll_sparse_mat%allocate(m, n, nz_) call a%psb_z_hll_sparse_mat%allocate(m, n, nz_)
call a%sync_dev_space()
hksz = a%hksz call a%set_host()
nhacks = (m + hksz - 1) / hksz
if (.not.allocated(a%val)) then
allocate(a%val(nz_ * m))
allocate(a%ja(nz_ * m))
allocate(a%irn(m))
allocate(a%idiag(m))
allocate(a%hkoffs(nhacks))
end if
a%val = zzero
a%ja = -1
a%irn = 0
a%idiag = 0
a%hkoffs = 0
call a%set_dev()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_z_hll_sparse_mat%cp_from_coo(b, info) call a%psb_z_hll_sparse_mat%cp_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_z_coo_sparse_mat) type is (psb_z_coo_sparse_mat)
call a%cp_from_coo(b, info) call a%cp_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_z_hll_sparse_mat%cp_from_fmt(b, info) call a%psb_z_hll_sparse_mat%cp_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -40,9 +40,9 @@ contains
call a%psb_z_hll_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans) call a%psb_z_hll_sparse_mat%inner_spsm(alpha, x, beta, y, info, trans)
call y%set_host() call y%set_host()
else else
select type (xx => x) select type (xx => x)
type is (psb_z_vect_oacc) type is (psb_z_vect_oacc)
select type(yy => y) select type(yy => y)
type is (psb_z_vect_oacc) type is (psb_z_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (beta /= dzero) then if (beta /= dzero) then

@ -10,10 +10,10 @@ contains
info = psb_success_ info = psb_success_
call a%free_space() call a%free_dev_space()
call a%psb_z_hll_sparse_mat%mv_from_coo(b, info) call a%psb_z_hll_sparse_mat%mv_from_coo(b, info)
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()

@ -14,10 +14,10 @@ contains
type is (psb_z_coo_sparse_mat) type is (psb_z_coo_sparse_mat)
call a%mv_from_coo(b, info) call a%mv_from_coo(b, info)
class default class default
call a%free_space() call a%free_dev_space()
call a%psb_z_hll_sparse_mat%mv_from_fmt(b, info) call a%psb_z_hll_sparse_mat%mv_from_fmt(b, info)
if (info /= 0) return if (info /= 0) return
call a%sync_space() call a%sync_dev_space()
call a%set_host() call a%set_host()
call a%sync() call a%sync()
end select end select

@ -15,8 +15,8 @@ contains
info = psb_success_ info = psb_success_
call a%psb_z_hll_sparse_mat%reallocate(nz) call a%psb_z_hll_sparse_mat%reallocate(nz)
call a%sync_dev_space()
call a%set_dev() call a%set_host()
if (info /= 0) goto 9999 if (info /= 0) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -1,6 +1,6 @@
subroutine psb_z_oacc_mlt_v(x, y, info) subroutine psb_z_oacc_mlt_v(x, y, info)
use psb_z_oacc_vect_mod, psb_protect_name => psb_z_oacc_mlt_v use psb_z_oacc_vect_mod, psb_protect_name => psb_z_oacc_mlt_v
implicit none implicit none
class(psb_z_base_vect_type), intent(inout) :: x class(psb_z_base_vect_type), intent(inout) :: x
@ -13,7 +13,7 @@ subroutine psb_z_oacc_mlt_v(x, y, info)
n = min(x%get_nrows(), y%get_nrows()) n = min(x%get_nrows(), y%get_nrows())
info = 0 info = 0
n = min(x%get_nrows(), y%get_nrows()) n = min(x%get_nrows(), y%get_nrows())
select type(xx => x) select type(xx => x)
class is (psb_z_vect_oacc) class is (psb_z_vect_oacc)
if (y%is_host()) call y%sync() if (y%is_host()) call y%sync()
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()

@ -1,5 +1,5 @@
subroutine psb_z_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy) subroutine psb_z_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
use psb_z_oacc_vect_mod, psb_protect_name => psb_z_oacc_mlt_v_2 use psb_z_oacc_vect_mod, psb_protect_name => psb_z_oacc_mlt_v_2
use psb_string_mod use psb_string_mod
implicit none implicit none
complex(psb_dpk_), intent(in) :: alpha, beta complex(psb_dpk_), intent(in) :: alpha, beta
@ -18,9 +18,9 @@ subroutine psb_z_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
n = min(x%get_nrows(), y%get_nrows(), z%get_nrows()) n = min(x%get_nrows(), y%get_nrows(), z%get_nrows())
info = 0 info = 0
select type(xx => x) select type(xx => x)
class is (psb_z_vect_oacc) class is (psb_z_vect_oacc)
select type (yy => y) select type (yy => y)
class is (psb_z_vect_oacc) class is (psb_z_vect_oacc)
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync() if (yy%is_host()) call yy%sync()

@ -13,32 +13,32 @@ module psb_c_oacc_csr_mat_mod
type, extends(psb_c_csr_sparse_mat) :: psb_c_oacc_csr_sparse_mat type, extends(psb_c_csr_sparse_mat) :: psb_c_oacc_csr_sparse_mat
integer(psb_ipk_) :: devstate = is_host integer(psb_ipk_) :: devstate = is_host
contains contains
procedure, nopass :: get_fmt => c_oacc_csr_get_fmt procedure, nopass :: get_fmt => c_oacc_csr_get_fmt
procedure, pass(a) :: sizeof => c_oacc_csr_sizeof procedure, pass(a) :: sizeof => c_oacc_csr_sizeof
procedure, pass(a) :: vect_mv => psb_c_oacc_csr_vect_mv procedure, pass(a) :: vect_mv => psb_c_oacc_csr_vect_mv
procedure, pass(a) :: in_vect_sv => psb_c_oacc_csr_inner_vect_sv procedure, pass(a) :: in_vect_sv => psb_c_oacc_csr_inner_vect_sv
procedure, pass(a) :: csmm => psb_c_oacc_csr_csmm procedure, pass(a) :: csmm => psb_c_oacc_csr_csmm
procedure, pass(a) :: csmv => psb_c_oacc_csr_csmv procedure, pass(a) :: csmv => psb_c_oacc_csr_csmv
procedure, pass(a) :: scals => psb_c_oacc_csr_scals procedure, pass(a) :: scals => psb_c_oacc_csr_scals
procedure, pass(a) :: scalv => psb_c_oacc_csr_scal procedure, pass(a) :: scalv => psb_c_oacc_csr_scal
procedure, pass(a) :: reallocate_nz => psb_c_oacc_csr_reallocate_nz procedure, pass(a) :: reallocate_nz => psb_c_oacc_csr_reallocate_nz
procedure, pass(a) :: allocate_mnnz => psb_c_oacc_csr_allocate_mnnz procedure, pass(a) :: allocate_mnnz => psb_c_oacc_csr_allocate_mnnz
procedure, pass(a) :: cp_from_coo => psb_c_oacc_csr_cp_from_coo procedure, pass(a) :: cp_from_coo => psb_c_oacc_csr_cp_from_coo
procedure, pass(a) :: cp_from_fmt => psb_c_oacc_csr_cp_from_fmt procedure, pass(a) :: cp_from_fmt => psb_c_oacc_csr_cp_from_fmt
procedure, pass(a) :: mv_from_coo => psb_c_oacc_csr_mv_from_coo procedure, pass(a) :: mv_from_coo => psb_c_oacc_csr_mv_from_coo
procedure, pass(a) :: mv_from_fmt => psb_c_oacc_csr_mv_from_fmt procedure, pass(a) :: mv_from_fmt => psb_c_oacc_csr_mv_from_fmt
procedure, pass(a) :: free => c_oacc_csr_free procedure, pass(a) :: free => c_oacc_csr_free
procedure, pass(a) :: mold => psb_c_oacc_csr_mold procedure, pass(a) :: mold => psb_c_oacc_csr_mold
procedure, pass(a) :: all => c_oacc_csr_all procedure, pass(a) :: all => c_oacc_csr_all
procedure, pass(a) :: is_host => c_oacc_csr_is_host procedure, pass(a) :: is_host => c_oacc_csr_is_host
procedure, pass(a) :: is_sync => c_oacc_csr_is_sync procedure, pass(a) :: is_sync => c_oacc_csr_is_sync
procedure, pass(a) :: is_dev => c_oacc_csr_is_dev procedure, pass(a) :: is_dev => c_oacc_csr_is_dev
procedure, pass(a) :: set_host => c_oacc_csr_set_host procedure, pass(a) :: set_host => c_oacc_csr_set_host
procedure, pass(a) :: set_sync => c_oacc_csr_set_sync procedure, pass(a) :: set_sync => c_oacc_csr_set_sync
procedure, pass(a) :: set_dev => c_oacc_csr_set_dev procedure, pass(a) :: set_dev => c_oacc_csr_set_dev
procedure, pass(a) :: free_space => c_oacc_csr_free_space procedure, pass(a) :: free_dev_space => c_oacc_csr_free_dev_space
procedure, pass(a) :: sync_space => c_oacc_csr_sync_space procedure, pass(a) :: sync_dev_space => c_oacc_csr_sync_dev_space
procedure, pass(a) :: sync => c_oacc_csr_sync procedure, pass(a) :: sync => c_oacc_csr_sync
end type psb_c_oacc_csr_sparse_mat end type psb_c_oacc_csr_sparse_mat
interface interface
@ -156,7 +156,7 @@ module psb_c_oacc_csr_mat_mod
contains contains
subroutine c_oacc_csr_free_space(a) subroutine c_oacc_csr_free_dev_space(a)
use psb_base_mod use psb_base_mod
implicit none implicit none
class(psb_c_oacc_csr_sparse_mat), intent(inout) :: a class(psb_c_oacc_csr_sparse_mat), intent(inout) :: a
@ -167,7 +167,7 @@ contains
if (allocated(a%irp)) call acc_delete_finalize(a%irp) if (allocated(a%irp)) call acc_delete_finalize(a%irp)
return return
end subroutine c_oacc_csr_free_space end subroutine c_oacc_csr_free_dev_space
subroutine c_oacc_csr_free(a) subroutine c_oacc_csr_free(a)
use psb_base_mod use psb_base_mod
@ -175,7 +175,7 @@ contains
class(psb_c_oacc_csr_sparse_mat), intent(inout) :: a class(psb_c_oacc_csr_sparse_mat), intent(inout) :: a
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
call a%free_space() call a%free_dev_space()
call a%psb_c_csr_sparse_mat%free() call a%psb_c_csr_sparse_mat%free()
return return
@ -218,7 +218,7 @@ contains
allocate(a%ja(nz),stat=info) allocate(a%ja(nz),stat=info)
allocate(a%irp(m+1),stat=info) allocate(a%irp(m+1),stat=info)
if (info == 0) call a%set_host() if (info == 0) call a%set_host()
if (info == 0) call a%sync_space() if (info == 0) call a%sync_dev_space()
end subroutine c_oacc_csr_all end subroutine c_oacc_csr_all
function c_oacc_csr_is_host(a) result(res) function c_oacc_csr_is_host(a) result(res)
@ -266,13 +266,13 @@ contains
a%devstate = is_dev a%devstate = is_dev
end subroutine c_oacc_csr_set_dev end subroutine c_oacc_csr_set_dev
subroutine c_oacc_csr_sync_space(a) subroutine c_oacc_csr_sync_dev_space(a)
implicit none implicit none
class(psb_c_oacc_csr_sparse_mat), intent(inout) :: a class(psb_c_oacc_csr_sparse_mat), intent(inout) :: a
if (allocated(a%val)) call acc_create(a%val) if (allocated(a%val)) call acc_create(a%val)
if (allocated(a%ja)) call acc_create(a%ja) if (allocated(a%ja)) call acc_create(a%ja)
if (allocated(a%irp)) call acc_create(a%irp) if (allocated(a%irp)) call acc_create(a%irp)
end subroutine c_oacc_csr_sync_space end subroutine c_oacc_csr_sync_dev_space
subroutine c_oacc_csr_sync(a) subroutine c_oacc_csr_sync(a)
implicit none implicit none
@ -280,7 +280,7 @@ contains
class(psb_c_oacc_csr_sparse_mat), pointer :: tmpa class(psb_c_oacc_csr_sparse_mat), pointer :: tmpa
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
tmpa => a tmpa => a
if (a%is_dev()) then if (a%is_dev()) then
call acc_update_self(a%val) call acc_update_self(a%val)
call acc_update_self(a%ja) call acc_update_self(a%ja)

@ -12,31 +12,31 @@ module psb_c_oacc_ell_mat_mod
type, extends(psb_c_ell_sparse_mat) :: psb_c_oacc_ell_sparse_mat type, extends(psb_c_ell_sparse_mat) :: psb_c_oacc_ell_sparse_mat
integer(psb_ipk_) :: devstate = is_host integer(psb_ipk_) :: devstate = is_host
contains contains
procedure, nopass :: get_fmt => c_oacc_ell_get_fmt procedure, nopass :: get_fmt => c_oacc_ell_get_fmt
procedure, pass(a) :: sizeof => c_oacc_ell_sizeof procedure, pass(a) :: sizeof => c_oacc_ell_sizeof
procedure, pass(a) :: is_host => c_oacc_ell_is_host procedure, pass(a) :: is_host => c_oacc_ell_is_host
procedure, pass(a) :: is_sync => c_oacc_ell_is_sync procedure, pass(a) :: is_sync => c_oacc_ell_is_sync
procedure, pass(a) :: is_dev => c_oacc_ell_is_dev procedure, pass(a) :: is_dev => c_oacc_ell_is_dev
procedure, pass(a) :: set_host => c_oacc_ell_set_host procedure, pass(a) :: set_host => c_oacc_ell_set_host
procedure, pass(a) :: set_sync => c_oacc_ell_set_sync procedure, pass(a) :: set_sync => c_oacc_ell_set_sync
procedure, pass(a) :: set_dev => c_oacc_ell_set_dev procedure, pass(a) :: set_dev => c_oacc_ell_set_dev
procedure, pass(a) :: sync_space => c_oacc_ell_sync_space procedure, pass(a) :: sync_dev_space => c_oacc_ell_sync_dev_space
procedure, pass(a) :: sync => c_oacc_ell_sync procedure, pass(a) :: sync => c_oacc_ell_sync
procedure, pass(a) :: free_space => c_oacc_ell_free_space procedure, pass(a) :: free_dev_space => c_oacc_ell_free_dev_space
procedure, pass(a) :: free => c_oacc_ell_free procedure, pass(a) :: free => c_oacc_ell_free
procedure, pass(a) :: vect_mv => psb_c_oacc_ell_vect_mv procedure, pass(a) :: vect_mv => psb_c_oacc_ell_vect_mv
procedure, pass(a) :: in_vect_sv => psb_c_oacc_ell_inner_vect_sv procedure, pass(a) :: in_vect_sv => psb_c_oacc_ell_inner_vect_sv
procedure, pass(a) :: csmm => psb_c_oacc_ell_csmm procedure, pass(a) :: csmm => psb_c_oacc_ell_csmm
procedure, pass(a) :: csmv => psb_c_oacc_ell_csmv procedure, pass(a) :: csmv => psb_c_oacc_ell_csmv
procedure, pass(a) :: scals => psb_c_oacc_ell_scals procedure, pass(a) :: scals => psb_c_oacc_ell_scals
procedure, pass(a) :: scalv => psb_c_oacc_ell_scal procedure, pass(a) :: scalv => psb_c_oacc_ell_scal
procedure, pass(a) :: reallocate_nz => psb_c_oacc_ell_reallocate_nz procedure, pass(a) :: reallocate_nz => psb_c_oacc_ell_reallocate_nz
procedure, pass(a) :: allocate_mnnz => psb_c_oacc_ell_allocate_mnnz procedure, pass(a) :: allocate_mnnz => psb_c_oacc_ell_allocate_mnnz
procedure, pass(a) :: cp_from_coo => psb_c_oacc_ell_cp_from_coo procedure, pass(a) :: cp_from_coo => psb_c_oacc_ell_cp_from_coo
procedure, pass(a) :: cp_from_fmt => psb_c_oacc_ell_cp_from_fmt procedure, pass(a) :: cp_from_fmt => psb_c_oacc_ell_cp_from_fmt
procedure, pass(a) :: mv_from_coo => psb_c_oacc_ell_mv_from_coo procedure, pass(a) :: mv_from_coo => psb_c_oacc_ell_mv_from_coo
procedure, pass(a) :: mv_from_fmt => psb_c_oacc_ell_mv_from_fmt procedure, pass(a) :: mv_from_fmt => psb_c_oacc_ell_mv_from_fmt
procedure, pass(a) :: mold => psb_c_oacc_ell_mold procedure, pass(a) :: mold => psb_c_oacc_ell_mold
end type psb_c_oacc_ell_sparse_mat end type psb_c_oacc_ell_sparse_mat
@ -154,7 +154,7 @@ module psb_c_oacc_ell_mat_mod
contains contains
subroutine c_oacc_ell_free_space(a) subroutine c_oacc_ell_free_dev_space(a)
use psb_base_mod use psb_base_mod
implicit none implicit none
class(psb_c_oacc_ell_sparse_mat), intent(inout) :: a class(psb_c_oacc_ell_sparse_mat), intent(inout) :: a
@ -166,7 +166,7 @@ contains
if (allocated(a%idiag)) call acc_delete_finalize(a%idiag) if (allocated(a%idiag)) call acc_delete_finalize(a%idiag)
return return
end subroutine c_oacc_ell_free_space end subroutine c_oacc_ell_free_dev_space
subroutine c_oacc_ell_free(a) subroutine c_oacc_ell_free(a)
use psb_base_mod use psb_base_mod
@ -174,7 +174,7 @@ contains
class(psb_c_oacc_ell_sparse_mat), intent(inout) :: a class(psb_c_oacc_ell_sparse_mat), intent(inout) :: a
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
call a%free_space() call a%free_dev_space()
call a%psb_c_ell_sparse_mat%free() call a%psb_c_ell_sparse_mat%free()
return return
@ -195,7 +195,7 @@ contains
end function c_oacc_ell_sizeof end function c_oacc_ell_sizeof
subroutine c_oacc_ell_sync_space(a) subroutine c_oacc_ell_sync_dev_space(a)
implicit none implicit none
class(psb_c_oacc_ell_sparse_mat), intent(inout) :: a class(psb_c_oacc_ell_sparse_mat), intent(inout) :: a
@ -203,7 +203,7 @@ contains
if (allocated(a%ja)) call acc_create(a%ja) if (allocated(a%ja)) call acc_create(a%ja)
if (allocated(a%irn)) call acc_create(a%irn) if (allocated(a%irn)) call acc_create(a%irn)
if (allocated(a%idiag)) call acc_create(a%idiag) if (allocated(a%idiag)) call acc_create(a%idiag)
end subroutine c_oacc_ell_sync_space end subroutine c_oacc_ell_sync_dev_space
function c_oacc_ell_is_host(a) result(res) function c_oacc_ell_is_host(a) result(res)
implicit none implicit none
@ -262,7 +262,7 @@ contains
class(psb_c_oacc_ell_sparse_mat), pointer :: tmpa class(psb_c_oacc_ell_sparse_mat), pointer :: tmpa
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
tmpa => a tmpa => a
if (a%is_dev()) then if (a%is_dev()) then
call acc_update_self(a%val) call acc_update_self(a%val)
call acc_update_self(a%ja) call acc_update_self(a%ja)

@ -12,31 +12,31 @@ module psb_c_oacc_hll_mat_mod
type, extends(psb_c_hll_sparse_mat) :: psb_c_oacc_hll_sparse_mat type, extends(psb_c_hll_sparse_mat) :: psb_c_oacc_hll_sparse_mat
integer(psb_ipk_) :: devstate = is_host integer(psb_ipk_) :: devstate = is_host
contains contains
procedure, nopass :: get_fmt => c_oacc_hll_get_fmt procedure, nopass :: get_fmt => c_oacc_hll_get_fmt
procedure, pass(a) :: sizeof => c_oacc_hll_sizeof procedure, pass(a) :: sizeof => c_oacc_hll_sizeof
procedure, pass(a) :: is_host => c_oacc_hll_is_host procedure, pass(a) :: is_host => c_oacc_hll_is_host
procedure, pass(a) :: is_sync => c_oacc_hll_is_sync procedure, pass(a) :: is_sync => c_oacc_hll_is_sync
procedure, pass(a) :: is_dev => c_oacc_hll_is_dev procedure, pass(a) :: is_dev => c_oacc_hll_is_dev
procedure, pass(a) :: set_host => c_oacc_hll_set_host procedure, pass(a) :: set_host => c_oacc_hll_set_host
procedure, pass(a) :: set_sync => c_oacc_hll_set_sync procedure, pass(a) :: set_sync => c_oacc_hll_set_sync
procedure, pass(a) :: set_dev => c_oacc_hll_set_dev procedure, pass(a) :: set_dev => c_oacc_hll_set_dev
procedure, pass(a) :: sync_space => c_oacc_hll_sync_space procedure, pass(a) :: sync_dev_space => c_oacc_hll_sync_dev_space
procedure, pass(a) :: sync => c_oacc_hll_sync procedure, pass(a) :: sync => c_oacc_hll_sync
procedure, pass(a) :: free_space => c_oacc_hll_free_space procedure, pass(a) :: free_dev_space => c_oacc_hll_free_dev_space
procedure, pass(a) :: free => c_oacc_hll_free procedure, pass(a) :: free => c_oacc_hll_free
procedure, pass(a) :: vect_mv => psb_c_oacc_hll_vect_mv procedure, pass(a) :: vect_mv => psb_c_oacc_hll_vect_mv
procedure, pass(a) :: in_vect_sv => psb_c_oacc_hll_inner_vect_sv procedure, pass(a) :: in_vect_sv => psb_c_oacc_hll_inner_vect_sv
procedure, pass(a) :: csmm => psb_c_oacc_hll_csmm procedure, pass(a) :: csmm => psb_c_oacc_hll_csmm
procedure, pass(a) :: csmv => psb_c_oacc_hll_csmv procedure, pass(a) :: csmv => psb_c_oacc_hll_csmv
procedure, pass(a) :: scals => psb_c_oacc_hll_scals procedure, pass(a) :: scals => psb_c_oacc_hll_scals
procedure, pass(a) :: scalv => psb_c_oacc_hll_scal procedure, pass(a) :: scalv => psb_c_oacc_hll_scal
procedure, pass(a) :: reallocate_nz => psb_c_oacc_hll_reallocate_nz procedure, pass(a) :: reallocate_nz => psb_c_oacc_hll_reallocate_nz
procedure, pass(a) :: allocate_mnnz => psb_c_oacc_hll_allocate_mnnz procedure, pass(a) :: allocate_mnnz => psb_c_oacc_hll_allocate_mnnz
procedure, pass(a) :: cp_from_coo => psb_c_oacc_hll_cp_from_coo procedure, pass(a) :: cp_from_coo => psb_c_oacc_hll_cp_from_coo
procedure, pass(a) :: cp_from_fmt => psb_c_oacc_hll_cp_from_fmt procedure, pass(a) :: cp_from_fmt => psb_c_oacc_hll_cp_from_fmt
procedure, pass(a) :: mv_from_coo => psb_c_oacc_hll_mv_from_coo procedure, pass(a) :: mv_from_coo => psb_c_oacc_hll_mv_from_coo
procedure, pass(a) :: mv_from_fmt => psb_c_oacc_hll_mv_from_fmt procedure, pass(a) :: mv_from_fmt => psb_c_oacc_hll_mv_from_fmt
procedure, pass(a) :: mold => psb_c_oacc_hll_mold procedure, pass(a) :: mold => psb_c_oacc_hll_mold
end type psb_c_oacc_hll_sparse_mat end type psb_c_oacc_hll_sparse_mat
@ -154,7 +154,7 @@ module psb_c_oacc_hll_mat_mod
contains contains
subroutine c_oacc_hll_free_space(a) subroutine c_oacc_hll_free_dev_space(a)
use psb_base_mod use psb_base_mod
implicit none implicit none
class(psb_c_oacc_hll_sparse_mat), intent(inout) :: a class(psb_c_oacc_hll_sparse_mat), intent(inout) :: a
@ -167,7 +167,7 @@ contains
if (allocated(a%hkoffs)) call acc_delete_finalize(a%hkoffs) if (allocated(a%hkoffs)) call acc_delete_finalize(a%hkoffs)
return return
end subroutine c_oacc_hll_free_space end subroutine c_oacc_hll_free_dev_space
subroutine c_oacc_hll_free(a) subroutine c_oacc_hll_free(a)
use psb_base_mod use psb_base_mod
@ -175,7 +175,7 @@ contains
class(psb_c_oacc_hll_sparse_mat), intent(inout) :: a class(psb_c_oacc_hll_sparse_mat), intent(inout) :: a
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
call a%free_space() call a%free_dev_space()
call a%psb_c_hll_sparse_mat%free() call a%psb_c_hll_sparse_mat%free()
return return
@ -249,7 +249,7 @@ contains
res = 'HLLOA' res = 'HLLOA'
end function c_oacc_hll_get_fmt end function c_oacc_hll_get_fmt
subroutine c_oacc_hll_sync_space(a) subroutine c_oacc_hll_sync_dev_space(a)
implicit none implicit none
class(psb_c_oacc_hll_sparse_mat), intent(inout) :: a class(psb_c_oacc_hll_sparse_mat), intent(inout) :: a
@ -258,7 +258,7 @@ contains
if (allocated(a%irn)) call acc_create(a%irn) if (allocated(a%irn)) call acc_create(a%irn)
if (allocated(a%idiag)) call acc_create(a%idiag) if (allocated(a%idiag)) call acc_create(a%idiag)
if (allocated(a%hkoffs)) call acc_create(a%hkoffs) if (allocated(a%hkoffs)) call acc_create(a%hkoffs)
end subroutine c_oacc_hll_sync_space end subroutine c_oacc_hll_sync_dev_space
subroutine c_oacc_hll_sync(a) subroutine c_oacc_hll_sync(a)
@ -267,7 +267,7 @@ contains
class(psb_c_oacc_hll_sparse_mat), pointer :: tmpa class(psb_c_oacc_hll_sparse_mat), pointer :: tmpa
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
tmpa => a tmpa => a
if (a%is_dev()) then if (a%is_dev()) then
call acc_update_self(a%val) call acc_update_self(a%val)
call acc_update_self(a%ja) call acc_update_self(a%ja)

@ -15,50 +15,50 @@ module psb_c_oacc_vect_mod
integer :: state = is_host integer :: state = is_host
contains contains
procedure, pass(x) :: get_nrows => c_oacc_get_nrows procedure, pass(x) :: get_nrows => c_oacc_get_nrows
procedure, nopass :: get_fmt => c_oacc_get_fmt procedure, nopass :: get_fmt => c_oacc_get_fmt
procedure, pass(x) :: all => c_oacc_vect_all procedure, pass(x) :: all => c_oacc_vect_all
procedure, pass(x) :: zero => c_oacc_zero procedure, pass(x) :: zero => c_oacc_zero
procedure, pass(x) :: asb_m => c_oacc_asb_m procedure, pass(x) :: asb_m => c_oacc_asb_m
procedure, pass(x) :: sync => c_oacc_sync procedure, pass(x) :: sync => c_oacc_sync
procedure, pass(x) :: sync_space => c_oacc_sync_space procedure, pass(x) :: sync_dev_space => c_oacc_sync_dev_space
procedure, pass(x) :: bld_x => c_oacc_bld_x procedure, pass(x) :: bld_x => c_oacc_bld_x
procedure, pass(x) :: bld_mn => c_oacc_bld_mn procedure, pass(x) :: bld_mn => c_oacc_bld_mn
procedure, pass(x) :: free => c_oacc_vect_free procedure, pass(x) :: free => c_oacc_vect_free
procedure, pass(x) :: ins_a => c_oacc_ins_a procedure, pass(x) :: ins_a => c_oacc_ins_a
procedure, pass(x) :: ins_v => c_oacc_ins_v procedure, pass(x) :: ins_v => c_oacc_ins_v
procedure, pass(x) :: is_host => c_oacc_is_host procedure, pass(x) :: is_host => c_oacc_is_host
procedure, pass(x) :: is_dev => c_oacc_is_dev procedure, pass(x) :: is_dev => c_oacc_is_dev
procedure, pass(x) :: is_sync => c_oacc_is_sync procedure, pass(x) :: is_sync => c_oacc_is_sync
procedure, pass(x) :: set_host => c_oacc_set_host procedure, pass(x) :: set_host => c_oacc_set_host
procedure, pass(x) :: set_dev => c_oacc_set_dev procedure, pass(x) :: set_dev => c_oacc_set_dev
procedure, pass(x) :: set_sync => c_oacc_set_sync procedure, pass(x) :: set_sync => c_oacc_set_sync
procedure, pass(x) :: set_scal => c_oacc_set_scal procedure, pass(x) :: set_scal => c_oacc_set_scal
procedure, pass(x) :: gthzv_x => c_oacc_gthzv_x procedure, pass(x) :: gthzv_x => c_oacc_gthzv_x
procedure, pass(x) :: gthzbuf_x => c_oacc_gthzbuf procedure, pass(x) :: gthzbuf_x => c_oacc_gthzbuf
procedure, pass(y) :: sctb => c_oacc_sctb procedure, pass(y) :: sctb => c_oacc_sctb
procedure, pass(y) :: sctb_x => c_oacc_sctb_x procedure, pass(y) :: sctb_x => c_oacc_sctb_x
procedure, pass(y) :: sctb_buf => c_oacc_sctb_buf procedure, pass(y) :: sctb_buf => c_oacc_sctb_buf
procedure, pass(x) :: get_size => c_oacc_get_size procedure, pass(x) :: get_size => c_oacc_get_size
procedure, pass(x) :: dot_v => c_oacc_vect_dot procedure, pass(x) :: dot_v => c_oacc_vect_dot
procedure, pass(x) :: dot_a => c_oacc_dot_a procedure, pass(x) :: dot_a => c_oacc_dot_a
procedure, pass(y) :: axpby_v => c_oacc_axpby_v procedure, pass(y) :: axpby_v => c_oacc_axpby_v
procedure, pass(y) :: axpby_a => c_oacc_axpby_a procedure, pass(y) :: axpby_a => c_oacc_axpby_a
procedure, pass(z) :: upd_xyz => c_oacc_upd_xyz procedure, pass(z) :: upd_xyz => c_oacc_upd_xyz
procedure, pass(y) :: mlt_a => c_oacc_mlt_a procedure, pass(y) :: mlt_a => c_oacc_mlt_a
procedure, pass(z) :: mlt_a_2 => c_oacc_mlt_a_2 procedure, pass(z) :: mlt_a_2 => c_oacc_mlt_a_2
procedure, pass(y) :: mlt_v => psb_c_oacc_mlt_v procedure, pass(y) :: mlt_v => psb_c_oacc_mlt_v
procedure, pass(z) :: mlt_v_2 => psb_c_oacc_mlt_v_2 procedure, pass(z) :: mlt_v_2 => psb_c_oacc_mlt_v_2
procedure, pass(x) :: scal => c_oacc_scal procedure, pass(x) :: scal => c_oacc_scal
procedure, pass(x) :: nrm2 => c_oacc_nrm2 procedure, pass(x) :: nrm2 => c_oacc_nrm2
procedure, pass(x) :: amax => c_oacc_amax procedure, pass(x) :: amax => c_oacc_amax
procedure, pass(x) :: asum => c_oacc_asum procedure, pass(x) :: asum => c_oacc_asum
procedure, pass(x) :: absval1 => c_oacc_absval1 procedure, pass(x) :: absval1 => c_oacc_absval1
procedure, pass(x) :: absval2 => c_oacc_absval2 procedure, pass(x) :: absval2 => c_oacc_absval2
final :: c_oacc_final_vect_free final :: c_oacc_final_vect_free
end type psb_c_vect_oacc end type psb_c_vect_oacc
@ -117,7 +117,7 @@ contains
integer(psb_ipk_) :: i integer(psb_ipk_) :: i
n = min(size(x%v), size(y%v)) n = min(size(x%v), size(y%v))
select type (yy => y) select type (yy => y)
class is (psb_c_vect_oacc) class is (psb_c_vect_oacc)
if (x%is_host()) call x%sync() if (x%is_host()) call x%sync()
if (yy%is_host()) call yy%sync() if (yy%is_host()) call yy%sync()
@ -287,7 +287,7 @@ contains
info = psb_success_ info = psb_success_
select type(xx => x) select type(xx => x)
type is (psb_c_vect_oacc) type is (psb_c_vect_oacc)
if ((beta /= czero) .and. y%is_host()) call y%sync() if ((beta /= czero) .and. y%is_host()) call y%sync()
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
@ -354,11 +354,11 @@ contains
info = psb_success_ info = psb_success_
gpu_done = .false. gpu_done = .false.
select type(xx => x) select type(xx => x)
class is (psb_c_vect_oacc) class is (psb_c_vect_oacc)
select type(yy => y) select type(yy => y)
class is (psb_c_vect_oacc) class is (psb_c_vect_oacc)
select type(zz => z) select type(zz => z)
class is (psb_c_vect_oacc) class is (psb_c_vect_oacc)
if ((beta /= czero) .and. yy%is_host()) call yy%sync() if ((beta /= czero) .and. yy%is_host()) call yy%sync()
if ((delta /= czero) .and. zz%is_host()) call zz%sync() if ((delta /= czero) .and. zz%is_host()) call zz%sync()
@ -405,7 +405,7 @@ contains
return return
end if end if
select type(ii => idx) select type(ii => idx)
class is (psb_i_vect_oacc) class is (psb_i_vect_oacc)
if (ii%is_host()) call ii%sync() if (ii%is_host()) call ii%sync()
if (y%is_host()) call y%sync() if (y%is_host()) call y%sync()
@ -432,7 +432,7 @@ contains
class(psb_c_vect_oacc) :: y class(psb_c_vect_oacc) :: y
integer(psb_ipk_) :: info, ni integer(psb_ipk_) :: info, ni
select type(ii => idx) select type(ii => idx)
class is (psb_i_vect_oacc) class is (psb_i_vect_oacc)
if (ii%is_host()) call ii%sync() if (ii%is_host()) call ii%sync()
class default class default
@ -485,7 +485,7 @@ contains
return return
end if end if
select type(ii => idx) select type(ii => idx)
class is (psb_i_vect_oacc) class is (psb_i_vect_oacc)
if (ii%is_host()) call ii%sync() if (ii%is_host()) call ii%sync()
class default class default
@ -512,7 +512,7 @@ contains
info = 0 info = 0
select type(ii => idx) select type(ii => idx)
class is (psb_i_vect_oacc) class is (psb_i_vect_oacc)
if (ii%is_host()) call ii%sync() if (ii%is_host()) call ii%sync()
class default class default
@ -544,9 +544,9 @@ contains
if (psb_errstatus_fatal()) return if (psb_errstatus_fatal()) return
done_oacc = .false. done_oacc = .false.
select type(virl => irl) select type(virl => irl)
type is (psb_i_vect_oacc) type is (psb_i_vect_oacc)
select type(vval => val) select type(vval => val)
type is (psb_c_vect_oacc) type is (psb_c_vect_oacc)
if (vval%is_host()) call vval%sync() if (vval%is_host()) call vval%sync()
if (virl%is_host()) call virl%sync() if (virl%is_host()) call virl%sync()
@ -561,11 +561,11 @@ contains
end select end select
if (.not.done_oacc) then if (.not.done_oacc) then
select type(virl => irl) select type(virl => irl)
type is (psb_i_vect_oacc) type is (psb_i_vect_oacc)
if (virl%is_dev()) call virl%sync() if (virl%is_dev()) call virl%sync()
end select end select
select type(vval => val) select type(vval => val)
type is (psb_c_vect_oacc) type is (psb_c_vect_oacc)
if (vval%is_dev()) call vval%sync() if (vval%is_dev()) call vval%sync()
end select end select
@ -611,7 +611,7 @@ contains
call psb_errpush(info, 'c_oacc_bld_mn', i_err=(/n, n, n, n, n/)) call psb_errpush(info, 'c_oacc_bld_mn', i_err=(/n, n, n, n, n/))
end if end if
call x%set_host() call x%set_host()
call x%sync_space() call x%sync_dev_space()
end subroutine c_oacc_bld_mn end subroutine c_oacc_bld_mn
@ -633,7 +633,7 @@ contains
end if end if
x%v(:) = this(:) x%v(:) = this(:)
call x%set_host() call x%set_host()
call x%sync_space() call x%sync_dev_space()
end subroutine c_oacc_bld_x end subroutine c_oacc_bld_x
@ -719,7 +719,7 @@ contains
res = czero res = czero
!write(0,*) 'dot_v' !write(0,*) 'dot_v'
select type(yy => y) select type(yy => y)
type is (psb_c_base_vect_type) type is (psb_c_base_vect_type)
if (x%is_dev()) call x%sync() if (x%is_dev()) call x%sync()
res = ddot(n, x%v, 1, yy%v, 1) res = ddot(n, x%v, 1, yy%v, 1)
@ -762,11 +762,11 @@ contains
end function c_oacc_dot_a end function c_oacc_dot_a
subroutine c_oacc_sync_space(x) subroutine c_oacc_sync_dev_space(x)
implicit none implicit none
class(psb_c_vect_oacc), intent(inout) :: x class(psb_c_vect_oacc), intent(inout) :: x
if (allocated(x%v)) call acc_create(x%v) if (allocated(x%v)) call acc_create(x%v)
end subroutine c_oacc_sync_space end subroutine c_oacc_sync_dev_space
subroutine c_oacc_sync(x) subroutine c_oacc_sync(x)
implicit none implicit none
@ -840,7 +840,7 @@ contains
i_err=(/n, n, n, n, n/)) i_err=(/n, n, n, n, n/))
end if end if
call x%set_host() call x%set_host()
call x%sync_space() call x%sync_dev_space()
end subroutine c_oacc_vect_all end subroutine c_oacc_vect_all
subroutine c_oacc_final_vect_free(x) subroutine c_oacc_final_vect_free(x)

@ -13,32 +13,32 @@ module psb_d_oacc_csr_mat_mod
type, extends(psb_d_csr_sparse_mat) :: psb_d_oacc_csr_sparse_mat type, extends(psb_d_csr_sparse_mat) :: psb_d_oacc_csr_sparse_mat
integer(psb_ipk_) :: devstate = is_host integer(psb_ipk_) :: devstate = is_host
contains contains
procedure, nopass :: get_fmt => d_oacc_csr_get_fmt procedure, nopass :: get_fmt => d_oacc_csr_get_fmt
procedure, pass(a) :: sizeof => d_oacc_csr_sizeof procedure, pass(a) :: sizeof => d_oacc_csr_sizeof
procedure, pass(a) :: vect_mv => psb_d_oacc_csr_vect_mv procedure, pass(a) :: vect_mv => psb_d_oacc_csr_vect_mv
procedure, pass(a) :: in_vect_sv => psb_d_oacc_csr_inner_vect_sv procedure, pass(a) :: in_vect_sv => psb_d_oacc_csr_inner_vect_sv
procedure, pass(a) :: csmm => psb_d_oacc_csr_csmm procedure, pass(a) :: csmm => psb_d_oacc_csr_csmm
procedure, pass(a) :: csmv => psb_d_oacc_csr_csmv procedure, pass(a) :: csmv => psb_d_oacc_csr_csmv
procedure, pass(a) :: scals => psb_d_oacc_csr_scals procedure, pass(a) :: scals => psb_d_oacc_csr_scals
procedure, pass(a) :: scalv => psb_d_oacc_csr_scal procedure, pass(a) :: scalv => psb_d_oacc_csr_scal
procedure, pass(a) :: reallocate_nz => psb_d_oacc_csr_reallocate_nz procedure, pass(a) :: reallocate_nz => psb_d_oacc_csr_reallocate_nz
procedure, pass(a) :: allocate_mnnz => psb_d_oacc_csr_allocate_mnnz procedure, pass(a) :: allocate_mnnz => psb_d_oacc_csr_allocate_mnnz
procedure, pass(a) :: cp_from_coo => psb_d_oacc_csr_cp_from_coo procedure, pass(a) :: cp_from_coo => psb_d_oacc_csr_cp_from_coo
procedure, pass(a) :: cp_from_fmt => psb_d_oacc_csr_cp_from_fmt procedure, pass(a) :: cp_from_fmt => psb_d_oacc_csr_cp_from_fmt
procedure, pass(a) :: mv_from_coo => psb_d_oacc_csr_mv_from_coo procedure, pass(a) :: mv_from_coo => psb_d_oacc_csr_mv_from_coo
procedure, pass(a) :: mv_from_fmt => psb_d_oacc_csr_mv_from_fmt procedure, pass(a) :: mv_from_fmt => psb_d_oacc_csr_mv_from_fmt
procedure, pass(a) :: free => d_oacc_csr_free procedure, pass(a) :: free => d_oacc_csr_free
procedure, pass(a) :: mold => psb_d_oacc_csr_mold procedure, pass(a) :: mold => psb_d_oacc_csr_mold
procedure, pass(a) :: all => d_oacc_csr_all procedure, pass(a) :: all => d_oacc_csr_all
procedure, pass(a) :: is_host => d_oacc_csr_is_host procedure, pass(a) :: is_host => d_oacc_csr_is_host
procedure, pass(a) :: is_sync => d_oacc_csr_is_sync procedure, pass(a) :: is_sync => d_oacc_csr_is_sync
procedure, pass(a) :: is_dev => d_oacc_csr_is_dev procedure, pass(a) :: is_dev => d_oacc_csr_is_dev
procedure, pass(a) :: set_host => d_oacc_csr_set_host procedure, pass(a) :: set_host => d_oacc_csr_set_host
procedure, pass(a) :: set_sync => d_oacc_csr_set_sync procedure, pass(a) :: set_sync => d_oacc_csr_set_sync
procedure, pass(a) :: set_dev => d_oacc_csr_set_dev procedure, pass(a) :: set_dev => d_oacc_csr_set_dev
procedure, pass(a) :: free_space => d_oacc_csr_free_space procedure, pass(a) :: free_dev_space => d_oacc_csr_free_dev_space
procedure, pass(a) :: sync_space => d_oacc_csr_sync_space procedure, pass(a) :: sync_dev_space => d_oacc_csr_sync_dev_space
procedure, pass(a) :: sync => d_oacc_csr_sync procedure, pass(a) :: sync => d_oacc_csr_sync
end type psb_d_oacc_csr_sparse_mat end type psb_d_oacc_csr_sparse_mat
interface interface
@ -156,7 +156,7 @@ module psb_d_oacc_csr_mat_mod
contains contains
subroutine d_oacc_csr_free_space(a) subroutine d_oacc_csr_free_dev_space(a)
use psb_base_mod use psb_base_mod
implicit none implicit none
class(psb_d_oacc_csr_sparse_mat), intent(inout) :: a class(psb_d_oacc_csr_sparse_mat), intent(inout) :: a
@ -167,7 +167,7 @@ contains
if (allocated(a%irp)) call acc_delete_finalize(a%irp) if (allocated(a%irp)) call acc_delete_finalize(a%irp)
return return
end subroutine d_oacc_csr_free_space end subroutine d_oacc_csr_free_dev_space
subroutine d_oacc_csr_free(a) subroutine d_oacc_csr_free(a)
use psb_base_mod use psb_base_mod
@ -175,7 +175,7 @@ contains
class(psb_d_oacc_csr_sparse_mat), intent(inout) :: a class(psb_d_oacc_csr_sparse_mat), intent(inout) :: a
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
call a%free_space() call a%free_dev_space()
call a%psb_d_csr_sparse_mat%free() call a%psb_d_csr_sparse_mat%free()
return return
@ -218,7 +218,7 @@ contains
allocate(a%ja(nz),stat=info) allocate(a%ja(nz),stat=info)
allocate(a%irp(m+1),stat=info) allocate(a%irp(m+1),stat=info)
if (info == 0) call a%set_host() if (info == 0) call a%set_host()
if (info == 0) call a%sync_space() if (info == 0) call a%sync_dev_space()
end subroutine d_oacc_csr_all end subroutine d_oacc_csr_all
function d_oacc_csr_is_host(a) result(res) function d_oacc_csr_is_host(a) result(res)
@ -266,13 +266,13 @@ contains
a%devstate = is_dev a%devstate = is_dev
end subroutine d_oacc_csr_set_dev end subroutine d_oacc_csr_set_dev
subroutine d_oacc_csr_sync_space(a) subroutine d_oacc_csr_sync_dev_space(a)
implicit none implicit none
class(psb_d_oacc_csr_sparse_mat), intent(inout) :: a class(psb_d_oacc_csr_sparse_mat), intent(inout) :: a
if (allocated(a%val)) call acc_create(a%val) if (allocated(a%val)) call acc_create(a%val)
if (allocated(a%ja)) call acc_create(a%ja) if (allocated(a%ja)) call acc_create(a%ja)
if (allocated(a%irp)) call acc_create(a%irp) if (allocated(a%irp)) call acc_create(a%irp)
end subroutine d_oacc_csr_sync_space end subroutine d_oacc_csr_sync_dev_space
subroutine d_oacc_csr_sync(a) subroutine d_oacc_csr_sync(a)
implicit none implicit none
@ -280,7 +280,7 @@ contains
class(psb_d_oacc_csr_sparse_mat), pointer :: tmpa class(psb_d_oacc_csr_sparse_mat), pointer :: tmpa
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
tmpa => a tmpa => a
if (a%is_dev()) then if (a%is_dev()) then
call acc_update_self(a%val) call acc_update_self(a%val)
call acc_update_self(a%ja) call acc_update_self(a%ja)

@ -12,31 +12,31 @@ module psb_d_oacc_ell_mat_mod
type, extends(psb_d_ell_sparse_mat) :: psb_d_oacc_ell_sparse_mat type, extends(psb_d_ell_sparse_mat) :: psb_d_oacc_ell_sparse_mat
integer(psb_ipk_) :: devstate = is_host integer(psb_ipk_) :: devstate = is_host
contains contains
procedure, nopass :: get_fmt => d_oacc_ell_get_fmt procedure, nopass :: get_fmt => d_oacc_ell_get_fmt
procedure, pass(a) :: sizeof => d_oacc_ell_sizeof procedure, pass(a) :: sizeof => d_oacc_ell_sizeof
procedure, pass(a) :: is_host => d_oacc_ell_is_host procedure, pass(a) :: is_host => d_oacc_ell_is_host
procedure, pass(a) :: is_sync => d_oacc_ell_is_sync procedure, pass(a) :: is_sync => d_oacc_ell_is_sync
procedure, pass(a) :: is_dev => d_oacc_ell_is_dev procedure, pass(a) :: is_dev => d_oacc_ell_is_dev
procedure, pass(a) :: set_host => d_oacc_ell_set_host procedure, pass(a) :: set_host => d_oacc_ell_set_host
procedure, pass(a) :: set_sync => d_oacc_ell_set_sync procedure, pass(a) :: set_sync => d_oacc_ell_set_sync
procedure, pass(a) :: set_dev => d_oacc_ell_set_dev procedure, pass(a) :: set_dev => d_oacc_ell_set_dev
procedure, pass(a) :: sync_space => d_oacc_ell_sync_space procedure, pass(a) :: sync_dev_space => d_oacc_ell_sync_dev_space
procedure, pass(a) :: sync => d_oacc_ell_sync procedure, pass(a) :: sync => d_oacc_ell_sync
procedure, pass(a) :: free_space => d_oacc_ell_free_space procedure, pass(a) :: free_dev_space => d_oacc_ell_free_dev_space
procedure, pass(a) :: free => d_oacc_ell_free procedure, pass(a) :: free => d_oacc_ell_free
procedure, pass(a) :: vect_mv => psb_d_oacc_ell_vect_mv procedure, pass(a) :: vect_mv => psb_d_oacc_ell_vect_mv
procedure, pass(a) :: in_vect_sv => psb_d_oacc_ell_inner_vect_sv procedure, pass(a) :: in_vect_sv => psb_d_oacc_ell_inner_vect_sv
procedure, pass(a) :: csmm => psb_d_oacc_ell_csmm procedure, pass(a) :: csmm => psb_d_oacc_ell_csmm
procedure, pass(a) :: csmv => psb_d_oacc_ell_csmv procedure, pass(a) :: csmv => psb_d_oacc_ell_csmv
procedure, pass(a) :: scals => psb_d_oacc_ell_scals procedure, pass(a) :: scals => psb_d_oacc_ell_scals
procedure, pass(a) :: scalv => psb_d_oacc_ell_scal procedure, pass(a) :: scalv => psb_d_oacc_ell_scal
procedure, pass(a) :: reallocate_nz => psb_d_oacc_ell_reallocate_nz procedure, pass(a) :: reallocate_nz => psb_d_oacc_ell_reallocate_nz
procedure, pass(a) :: allocate_mnnz => psb_d_oacc_ell_allocate_mnnz procedure, pass(a) :: allocate_mnnz => psb_d_oacc_ell_allocate_mnnz
procedure, pass(a) :: cp_from_coo => psb_d_oacc_ell_cp_from_coo procedure, pass(a) :: cp_from_coo => psb_d_oacc_ell_cp_from_coo
procedure, pass(a) :: cp_from_fmt => psb_d_oacc_ell_cp_from_fmt procedure, pass(a) :: cp_from_fmt => psb_d_oacc_ell_cp_from_fmt
procedure, pass(a) :: mv_from_coo => psb_d_oacc_ell_mv_from_coo procedure, pass(a) :: mv_from_coo => psb_d_oacc_ell_mv_from_coo
procedure, pass(a) :: mv_from_fmt => psb_d_oacc_ell_mv_from_fmt procedure, pass(a) :: mv_from_fmt => psb_d_oacc_ell_mv_from_fmt
procedure, pass(a) :: mold => psb_d_oacc_ell_mold procedure, pass(a) :: mold => psb_d_oacc_ell_mold
end type psb_d_oacc_ell_sparse_mat end type psb_d_oacc_ell_sparse_mat
@ -154,7 +154,7 @@ module psb_d_oacc_ell_mat_mod
contains contains
subroutine d_oacc_ell_free_space(a) subroutine d_oacc_ell_free_dev_space(a)
use psb_base_mod use psb_base_mod
implicit none implicit none
class(psb_d_oacc_ell_sparse_mat), intent(inout) :: a class(psb_d_oacc_ell_sparse_mat), intent(inout) :: a
@ -166,7 +166,7 @@ contains
if (allocated(a%idiag)) call acc_delete_finalize(a%idiag) if (allocated(a%idiag)) call acc_delete_finalize(a%idiag)
return return
end subroutine d_oacc_ell_free_space end subroutine d_oacc_ell_free_dev_space
subroutine d_oacc_ell_free(a) subroutine d_oacc_ell_free(a)
use psb_base_mod use psb_base_mod
@ -174,7 +174,7 @@ contains
class(psb_d_oacc_ell_sparse_mat), intent(inout) :: a class(psb_d_oacc_ell_sparse_mat), intent(inout) :: a
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
call a%free_space() call a%free_dev_space()
call a%psb_d_ell_sparse_mat%free() call a%psb_d_ell_sparse_mat%free()
return return
@ -195,7 +195,7 @@ contains
end function d_oacc_ell_sizeof end function d_oacc_ell_sizeof
subroutine d_oacc_ell_sync_space(a) subroutine d_oacc_ell_sync_dev_space(a)
implicit none implicit none
class(psb_d_oacc_ell_sparse_mat), intent(inout) :: a class(psb_d_oacc_ell_sparse_mat), intent(inout) :: a
@ -203,7 +203,7 @@ contains
if (allocated(a%ja)) call acc_create(a%ja) if (allocated(a%ja)) call acc_create(a%ja)
if (allocated(a%irn)) call acc_create(a%irn) if (allocated(a%irn)) call acc_create(a%irn)
if (allocated(a%idiag)) call acc_create(a%idiag) if (allocated(a%idiag)) call acc_create(a%idiag)
end subroutine d_oacc_ell_sync_space end subroutine d_oacc_ell_sync_dev_space
function d_oacc_ell_is_host(a) result(res) function d_oacc_ell_is_host(a) result(res)
implicit none implicit none
@ -262,7 +262,7 @@ contains
class(psb_d_oacc_ell_sparse_mat), pointer :: tmpa class(psb_d_oacc_ell_sparse_mat), pointer :: tmpa
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
tmpa => a tmpa => a
if (a%is_dev()) then if (a%is_dev()) then
call acc_update_self(a%val) call acc_update_self(a%val)
call acc_update_self(a%ja) call acc_update_self(a%ja)

@ -12,31 +12,31 @@ module psb_d_oacc_hll_mat_mod
type, extends(psb_d_hll_sparse_mat) :: psb_d_oacc_hll_sparse_mat type, extends(psb_d_hll_sparse_mat) :: psb_d_oacc_hll_sparse_mat
integer(psb_ipk_) :: devstate = is_host integer(psb_ipk_) :: devstate = is_host
contains contains
procedure, nopass :: get_fmt => d_oacc_hll_get_fmt procedure, nopass :: get_fmt => d_oacc_hll_get_fmt
procedure, pass(a) :: sizeof => d_oacc_hll_sizeof procedure, pass(a) :: sizeof => d_oacc_hll_sizeof
procedure, pass(a) :: is_host => d_oacc_hll_is_host procedure, pass(a) :: is_host => d_oacc_hll_is_host
procedure, pass(a) :: is_sync => d_oacc_hll_is_sync procedure, pass(a) :: is_sync => d_oacc_hll_is_sync
procedure, pass(a) :: is_dev => d_oacc_hll_is_dev procedure, pass(a) :: is_dev => d_oacc_hll_is_dev
procedure, pass(a) :: set_host => d_oacc_hll_set_host procedure, pass(a) :: set_host => d_oacc_hll_set_host
procedure, pass(a) :: set_sync => d_oacc_hll_set_sync procedure, pass(a) :: set_sync => d_oacc_hll_set_sync
procedure, pass(a) :: set_dev => d_oacc_hll_set_dev procedure, pass(a) :: set_dev => d_oacc_hll_set_dev
procedure, pass(a) :: sync_space => d_oacc_hll_sync_space procedure, pass(a) :: sync_dev_space => d_oacc_hll_sync_dev_space
procedure, pass(a) :: sync => d_oacc_hll_sync procedure, pass(a) :: sync => d_oacc_hll_sync
procedure, pass(a) :: free_space => d_oacc_hll_free_space procedure, pass(a) :: free_dev_space => d_oacc_hll_free_dev_space
procedure, pass(a) :: free => d_oacc_hll_free procedure, pass(a) :: free => d_oacc_hll_free
procedure, pass(a) :: vect_mv => psb_d_oacc_hll_vect_mv procedure, pass(a) :: vect_mv => psb_d_oacc_hll_vect_mv
procedure, pass(a) :: in_vect_sv => psb_d_oacc_hll_inner_vect_sv procedure, pass(a) :: in_vect_sv => psb_d_oacc_hll_inner_vect_sv
procedure, pass(a) :: csmm => psb_d_oacc_hll_csmm procedure, pass(a) :: csmm => psb_d_oacc_hll_csmm
procedure, pass(a) :: csmv => psb_d_oacc_hll_csmv procedure, pass(a) :: csmv => psb_d_oacc_hll_csmv
procedure, pass(a) :: scals => psb_d_oacc_hll_scals procedure, pass(a) :: scals => psb_d_oacc_hll_scals
procedure, pass(a) :: scalv => psb_d_oacc_hll_scal procedure, pass(a) :: scalv => psb_d_oacc_hll_scal
procedure, pass(a) :: reallocate_nz => psb_d_oacc_hll_reallocate_nz procedure, pass(a) :: reallocate_nz => psb_d_oacc_hll_reallocate_nz
procedure, pass(a) :: allocate_mnnz => psb_d_oacc_hll_allocate_mnnz procedure, pass(a) :: allocate_mnnz => psb_d_oacc_hll_allocate_mnnz
procedure, pass(a) :: cp_from_coo => psb_d_oacc_hll_cp_from_coo procedure, pass(a) :: cp_from_coo => psb_d_oacc_hll_cp_from_coo
procedure, pass(a) :: cp_from_fmt => psb_d_oacc_hll_cp_from_fmt procedure, pass(a) :: cp_from_fmt => psb_d_oacc_hll_cp_from_fmt
procedure, pass(a) :: mv_from_coo => psb_d_oacc_hll_mv_from_coo procedure, pass(a) :: mv_from_coo => psb_d_oacc_hll_mv_from_coo
procedure, pass(a) :: mv_from_fmt => psb_d_oacc_hll_mv_from_fmt procedure, pass(a) :: mv_from_fmt => psb_d_oacc_hll_mv_from_fmt
procedure, pass(a) :: mold => psb_d_oacc_hll_mold procedure, pass(a) :: mold => psb_d_oacc_hll_mold
end type psb_d_oacc_hll_sparse_mat end type psb_d_oacc_hll_sparse_mat
@ -154,7 +154,7 @@ module psb_d_oacc_hll_mat_mod
contains contains
subroutine d_oacc_hll_free_space(a) subroutine d_oacc_hll_free_dev_space(a)
use psb_base_mod use psb_base_mod
implicit none implicit none
class(psb_d_oacc_hll_sparse_mat), intent(inout) :: a class(psb_d_oacc_hll_sparse_mat), intent(inout) :: a
@ -167,7 +167,7 @@ contains
if (allocated(a%hkoffs)) call acc_delete_finalize(a%hkoffs) if (allocated(a%hkoffs)) call acc_delete_finalize(a%hkoffs)
return return
end subroutine d_oacc_hll_free_space end subroutine d_oacc_hll_free_dev_space
subroutine d_oacc_hll_free(a) subroutine d_oacc_hll_free(a)
use psb_base_mod use psb_base_mod
@ -175,7 +175,7 @@ contains
class(psb_d_oacc_hll_sparse_mat), intent(inout) :: a class(psb_d_oacc_hll_sparse_mat), intent(inout) :: a
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
call a%free_space() call a%free_dev_space()
call a%psb_d_hll_sparse_mat%free() call a%psb_d_hll_sparse_mat%free()
return return
@ -249,7 +249,7 @@ contains
res = 'HLLOA' res = 'HLLOA'
end function d_oacc_hll_get_fmt end function d_oacc_hll_get_fmt
subroutine d_oacc_hll_sync_space(a) subroutine d_oacc_hll_sync_dev_space(a)
implicit none implicit none
class(psb_d_oacc_hll_sparse_mat), intent(inout) :: a class(psb_d_oacc_hll_sparse_mat), intent(inout) :: a
@ -258,7 +258,7 @@ contains
if (allocated(a%irn)) call acc_create(a%irn) if (allocated(a%irn)) call acc_create(a%irn)
if (allocated(a%idiag)) call acc_create(a%idiag) if (allocated(a%idiag)) call acc_create(a%idiag)
if (allocated(a%hkoffs)) call acc_create(a%hkoffs) if (allocated(a%hkoffs)) call acc_create(a%hkoffs)
end subroutine d_oacc_hll_sync_space end subroutine d_oacc_hll_sync_dev_space
subroutine d_oacc_hll_sync(a) subroutine d_oacc_hll_sync(a)
@ -267,7 +267,7 @@ contains
class(psb_d_oacc_hll_sparse_mat), pointer :: tmpa class(psb_d_oacc_hll_sparse_mat), pointer :: tmpa
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
tmpa => a tmpa => a
if (a%is_dev()) then if (a%is_dev()) then
call acc_update_self(a%val) call acc_update_self(a%val)
call acc_update_self(a%ja) call acc_update_self(a%ja)

@ -15,50 +15,50 @@ module psb_d_oacc_vect_mod
integer :: state = is_host integer :: state = is_host
contains contains
procedure, pass(x) :: get_nrows => d_oacc_get_nrows procedure, pass(x) :: get_nrows => d_oacc_get_nrows
procedure, nopass :: get_fmt => d_oacc_get_fmt procedure, nopass :: get_fmt => d_oacc_get_fmt
procedure, pass(x) :: all => d_oacc_vect_all procedure, pass(x) :: all => d_oacc_vect_all
procedure, pass(x) :: zero => d_oacc_zero procedure, pass(x) :: zero => d_oacc_zero
procedure, pass(x) :: asb_m => d_oacc_asb_m procedure, pass(x) :: asb_m => d_oacc_asb_m
procedure, pass(x) :: sync => d_oacc_sync procedure, pass(x) :: sync => d_oacc_sync
procedure, pass(x) :: sync_space => d_oacc_sync_space procedure, pass(x) :: sync_dev_space => d_oacc_sync_dev_space
procedure, pass(x) :: bld_x => d_oacc_bld_x procedure, pass(x) :: bld_x => d_oacc_bld_x
procedure, pass(x) :: bld_mn => d_oacc_bld_mn procedure, pass(x) :: bld_mn => d_oacc_bld_mn
procedure, pass(x) :: free => d_oacc_vect_free procedure, pass(x) :: free => d_oacc_vect_free
procedure, pass(x) :: ins_a => d_oacc_ins_a procedure, pass(x) :: ins_a => d_oacc_ins_a
procedure, pass(x) :: ins_v => d_oacc_ins_v procedure, pass(x) :: ins_v => d_oacc_ins_v
procedure, pass(x) :: is_host => d_oacc_is_host procedure, pass(x) :: is_host => d_oacc_is_host
procedure, pass(x) :: is_dev => d_oacc_is_dev procedure, pass(x) :: is_dev => d_oacc_is_dev
procedure, pass(x) :: is_sync => d_oacc_is_sync procedure, pass(x) :: is_sync => d_oacc_is_sync
procedure, pass(x) :: set_host => d_oacc_set_host procedure, pass(x) :: set_host => d_oacc_set_host
procedure, pass(x) :: set_dev => d_oacc_set_dev procedure, pass(x) :: set_dev => d_oacc_set_dev
procedure, pass(x) :: set_sync => d_oacc_set_sync procedure, pass(x) :: set_sync => d_oacc_set_sync
procedure, pass(x) :: set_scal => d_oacc_set_scal procedure, pass(x) :: set_scal => d_oacc_set_scal
procedure, pass(x) :: gthzv_x => d_oacc_gthzv_x procedure, pass(x) :: gthzv_x => d_oacc_gthzv_x
procedure, pass(x) :: gthzbuf_x => d_oacc_gthzbuf procedure, pass(x) :: gthzbuf_x => d_oacc_gthzbuf
procedure, pass(y) :: sctb => d_oacc_sctb procedure, pass(y) :: sctb => d_oacc_sctb
procedure, pass(y) :: sctb_x => d_oacc_sctb_x procedure, pass(y) :: sctb_x => d_oacc_sctb_x
procedure, pass(y) :: sctb_buf => d_oacc_sctb_buf procedure, pass(y) :: sctb_buf => d_oacc_sctb_buf
procedure, pass(x) :: get_size => d_oacc_get_size procedure, pass(x) :: get_size => d_oacc_get_size
procedure, pass(x) :: dot_v => d_oacc_vect_dot procedure, pass(x) :: dot_v => d_oacc_vect_dot
procedure, pass(x) :: dot_a => d_oacc_dot_a procedure, pass(x) :: dot_a => d_oacc_dot_a
procedure, pass(y) :: axpby_v => d_oacc_axpby_v procedure, pass(y) :: axpby_v => d_oacc_axpby_v
procedure, pass(y) :: axpby_a => d_oacc_axpby_a procedure, pass(y) :: axpby_a => d_oacc_axpby_a
procedure, pass(z) :: upd_xyz => d_oacc_upd_xyz procedure, pass(z) :: upd_xyz => d_oacc_upd_xyz
procedure, pass(y) :: mlt_a => d_oacc_mlt_a procedure, pass(y) :: mlt_a => d_oacc_mlt_a
procedure, pass(z) :: mlt_a_2 => d_oacc_mlt_a_2 procedure, pass(z) :: mlt_a_2 => d_oacc_mlt_a_2
procedure, pass(y) :: mlt_v => psb_d_oacc_mlt_v procedure, pass(y) :: mlt_v => psb_d_oacc_mlt_v
procedure, pass(z) :: mlt_v_2 => psb_d_oacc_mlt_v_2 procedure, pass(z) :: mlt_v_2 => psb_d_oacc_mlt_v_2
procedure, pass(x) :: scal => d_oacc_scal procedure, pass(x) :: scal => d_oacc_scal
procedure, pass(x) :: nrm2 => d_oacc_nrm2 procedure, pass(x) :: nrm2 => d_oacc_nrm2
procedure, pass(x) :: amax => d_oacc_amax procedure, pass(x) :: amax => d_oacc_amax
procedure, pass(x) :: asum => d_oacc_asum procedure, pass(x) :: asum => d_oacc_asum
procedure, pass(x) :: absval1 => d_oacc_absval1 procedure, pass(x) :: absval1 => d_oacc_absval1
procedure, pass(x) :: absval2 => d_oacc_absval2 procedure, pass(x) :: absval2 => d_oacc_absval2
final :: d_oacc_final_vect_free final :: d_oacc_final_vect_free
end type psb_d_vect_oacc end type psb_d_vect_oacc
@ -117,7 +117,7 @@ contains
integer(psb_ipk_) :: i integer(psb_ipk_) :: i
n = min(size(x%v), size(y%v)) n = min(size(x%v), size(y%v))
select type (yy => y) select type (yy => y)
class is (psb_d_vect_oacc) class is (psb_d_vect_oacc)
if (x%is_host()) call x%sync() if (x%is_host()) call x%sync()
if (yy%is_host()) call yy%sync() if (yy%is_host()) call yy%sync()
@ -287,7 +287,7 @@ contains
info = psb_success_ info = psb_success_
select type(xx => x) select type(xx => x)
type is (psb_d_vect_oacc) type is (psb_d_vect_oacc)
if ((beta /= dzero) .and. y%is_host()) call y%sync() if ((beta /= dzero) .and. y%is_host()) call y%sync()
if (xx%is_host()) call xx%sync() if (xx%is_host()) call xx%sync()
@ -354,11 +354,11 @@ contains
info = psb_success_ info = psb_success_
gpu_done = .false. gpu_done = .false.
select type(xx => x) select type(xx => x)
class is (psb_d_vect_oacc) class is (psb_d_vect_oacc)
select type(yy => y) select type(yy => y)
class is (psb_d_vect_oacc) class is (psb_d_vect_oacc)
select type(zz => z) select type(zz => z)
class is (psb_d_vect_oacc) class is (psb_d_vect_oacc)
if ((beta /= dzero) .and. yy%is_host()) call yy%sync() if ((beta /= dzero) .and. yy%is_host()) call yy%sync()
if ((delta /= dzero) .and. zz%is_host()) call zz%sync() if ((delta /= dzero) .and. zz%is_host()) call zz%sync()
@ -405,7 +405,7 @@ contains
return return
end if end if
select type(ii => idx) select type(ii => idx)
class is (psb_i_vect_oacc) class is (psb_i_vect_oacc)
if (ii%is_host()) call ii%sync() if (ii%is_host()) call ii%sync()
if (y%is_host()) call y%sync() if (y%is_host()) call y%sync()
@ -432,7 +432,7 @@ contains
class(psb_d_vect_oacc) :: y class(psb_d_vect_oacc) :: y
integer(psb_ipk_) :: info, ni integer(psb_ipk_) :: info, ni
select type(ii => idx) select type(ii => idx)
class is (psb_i_vect_oacc) class is (psb_i_vect_oacc)
if (ii%is_host()) call ii%sync() if (ii%is_host()) call ii%sync()
class default class default
@ -485,7 +485,7 @@ contains
return return
end if end if
select type(ii => idx) select type(ii => idx)
class is (psb_i_vect_oacc) class is (psb_i_vect_oacc)
if (ii%is_host()) call ii%sync() if (ii%is_host()) call ii%sync()
class default class default
@ -512,7 +512,7 @@ contains
info = 0 info = 0
select type(ii => idx) select type(ii => idx)
class is (psb_i_vect_oacc) class is (psb_i_vect_oacc)
if (ii%is_host()) call ii%sync() if (ii%is_host()) call ii%sync()
class default class default
@ -544,9 +544,9 @@ contains
if (psb_errstatus_fatal()) return if (psb_errstatus_fatal()) return
done_oacc = .false. done_oacc = .false.
select type(virl => irl) select type(virl => irl)
type is (psb_i_vect_oacc) type is (psb_i_vect_oacc)
select type(vval => val) select type(vval => val)
type is (psb_d_vect_oacc) type is (psb_d_vect_oacc)
if (vval%is_host()) call vval%sync() if (vval%is_host()) call vval%sync()
if (virl%is_host()) call virl%sync() if (virl%is_host()) call virl%sync()
@ -561,11 +561,11 @@ contains
end select end select
if (.not.done_oacc) then if (.not.done_oacc) then
select type(virl => irl) select type(virl => irl)
type is (psb_i_vect_oacc) type is (psb_i_vect_oacc)
if (virl%is_dev()) call virl%sync() if (virl%is_dev()) call virl%sync()
end select end select
select type(vval => val) select type(vval => val)
type is (psb_d_vect_oacc) type is (psb_d_vect_oacc)
if (vval%is_dev()) call vval%sync() if (vval%is_dev()) call vval%sync()
end select end select
@ -611,7 +611,7 @@ contains
call psb_errpush(info, 'd_oacc_bld_mn', i_err=(/n, n, n, n, n/)) call psb_errpush(info, 'd_oacc_bld_mn', i_err=(/n, n, n, n, n/))
end if end if
call x%set_host() call x%set_host()
call x%sync_space() call x%sync_dev_space()
end subroutine d_oacc_bld_mn end subroutine d_oacc_bld_mn
@ -633,7 +633,7 @@ contains
end if end if
x%v(:) = this(:) x%v(:) = this(:)
call x%set_host() call x%set_host()
call x%sync_space() call x%sync_dev_space()
end subroutine d_oacc_bld_x end subroutine d_oacc_bld_x
@ -719,7 +719,7 @@ contains
res = dzero res = dzero
!write(0,*) 'dot_v' !write(0,*) 'dot_v'
select type(yy => y) select type(yy => y)
type is (psb_d_base_vect_type) type is (psb_d_base_vect_type)
if (x%is_dev()) call x%sync() if (x%is_dev()) call x%sync()
res = ddot(n, x%v, 1, yy%v, 1) res = ddot(n, x%v, 1, yy%v, 1)
@ -762,11 +762,11 @@ contains
end function d_oacc_dot_a end function d_oacc_dot_a
subroutine d_oacc_sync_space(x) subroutine d_oacc_sync_dev_space(x)
implicit none implicit none
class(psb_d_vect_oacc), intent(inout) :: x class(psb_d_vect_oacc), intent(inout) :: x
if (allocated(x%v)) call acc_create(x%v) if (allocated(x%v)) call acc_create(x%v)
end subroutine d_oacc_sync_space end subroutine d_oacc_sync_dev_space
subroutine d_oacc_sync(x) subroutine d_oacc_sync(x)
implicit none implicit none
@ -840,7 +840,7 @@ contains
i_err=(/n, n, n, n, n/)) i_err=(/n, n, n, n, n/))
end if end if
call x%set_host() call x%set_host()
call x%sync_space() call x%sync_dev_space()
end subroutine d_oacc_vect_all end subroutine d_oacc_vect_all
subroutine d_oacc_final_vect_free(x) subroutine d_oacc_final_vect_free(x)

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save