Remove obsolete files

oacc_loloum
sfilippone 5 months ago
parent f783478df3
commit 6236f3489c

@ -1,86 +0,0 @@
submodule (psb_c_oacc_csr_mat_mod) psb_c_oacc_csr_csmm_impl
use psb_base_mod
contains
module subroutine psb_c_oacc_csr_csmm(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_c_oacc_csr_sparse_mat), intent(in) :: a
complex(psb_spk_), intent(in) :: alpha, beta
complex(psb_spk_), intent(in) :: x(:,:)
complex(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n,k, nxy
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'c_oacc_csmm'
logical, parameter :: debug = .false.
info = psb_success_
call psb_erractionsave(err_act)
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_c_csr_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nxy = min(size(x,2), size(y,2))
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, m
y(i,j) = beta * y(i,j)
end do
end do
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, n
do k = a%irp(i), a%irp(i+1) - 1
y(a%ja(k), j) = y(a%ja(k), j) + alpha * a%val(k) * x(i, j)
end do
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_c_oacc_csr_csmm
end submodule psb_c_oacc_csr_csmm_impl

@ -1,81 +0,0 @@
submodule (psb_c_oacc_csr_mat_mod) psb_c_oacc_csr_csmv_impl
use psb_base_mod
contains
module subroutine psb_c_oacc_csr_csmv(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_c_oacc_csr_sparse_mat), intent(in) :: a
complex(psb_spk_), intent(in) :: alpha, beta
complex(psb_spk_), intent(in) :: x(:)
complex(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'c_oacc_csmv'
logical, parameter :: debug = .false.
call psb_erractionsave(err_act)
info = psb_success_
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_c_csr_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
!$acc parallel loop present(a, x, y)
do i = 1, m
y(i) = beta * y(i)
end do
!$acc parallel loop present(a, x, y)
do i = 1, n
do j = a%irp(i), a%irp(i+1) - 1
y(a%ja(j)) = y(a%ja(j)) + alpha * a%val(j) * x(i)
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_c_oacc_csr_csmv
end submodule psb_c_oacc_csr_csmv_impl

@ -1,86 +0,0 @@
submodule (psb_c_oacc_ell_mat_mod) psb_c_oacc_ell_csmm_impl
use psb_base_mod
contains
module subroutine psb_c_oacc_ell_csmm(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_c_oacc_ell_sparse_mat), intent(in) :: a
complex(psb_spk_), intent(in) :: alpha, beta
complex(psb_spk_), intent(in) :: x(:,:)
complex(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, k, nxy, nzt
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'c_oacc_ell_csmm'
logical, parameter :: debug = .false.
info = psb_success_
call psb_erractionsave(err_act)
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_c_ell_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nxy = min(size(x,2), size(y,2))
nzt = a%nzt
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, m
y(i,j) = beta * y(i,j)
end do
end do
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, n
do k = 1, nzt
y(i, j) = y(i, j) + alpha * a%val(i, k) * x(a%ja(i, k), j)
end do
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_c_oacc_ell_csmm
end submodule psb_c_oacc_ell_csmm_impl

@ -1,82 +0,0 @@
submodule (psb_c_oacc_ell_mat_mod) psb_c_oacc_ell_csmv_impl
use psb_base_mod
contains
module subroutine psb_c_oacc_ell_csmv(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_c_oacc_ell_sparse_mat), intent(in) :: a
complex(psb_spk_), intent(in) :: alpha, beta
complex(psb_spk_), intent(in) :: x(:)
complex(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, nzt
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'c_oacc_ell_csmv'
logical, parameter :: debug = .false.
call psb_erractionsave(err_act)
info = psb_success_
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_c_ell_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nzt = a%nzt
!$acc parallel loop present(a, x, y)
do i = 1, m
y(i) = beta * y(i)
end do
!$acc parallel loop present(a, x, y)
do i = 1, m
do j = 1, nzt
y(i) = y(i) + alpha * a%val(i, j) * x(a%ja(i, j))
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_c_oacc_ell_csmv
end submodule psb_c_oacc_ell_csmv_impl

@ -1,86 +0,0 @@
submodule (psb_c_oacc_hll_mat_mod) psb_c_oacc_hll_csmm_impl
use psb_base_mod
contains
module subroutine psb_c_oacc_hll_csmm(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_c_oacc_hll_sparse_mat), intent(in) :: a
complex(psb_spk_), intent(in) :: alpha, beta
complex(psb_spk_), intent(in) :: x(:,:)
complex(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, k, nxy, nhacks
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'c_oacc_hll_csmm'
logical, parameter :: debug = .false.
info = psb_success_
call psb_erractionsave(err_act)
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_c_hll_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nxy = min(size(x,2), size(y,2))
nhacks = (a%get_nrows() + a%hksz - 1) / a%hksz
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, m
y(i,j) = beta * y(i,j)
end do
end do
!$acc parallel loop present(a, x, y)
do j = 1, nxy
do k = 1, nhacks
do i = a%hkoffs(k), a%hkoffs(k + 1) - 1
y(a%irn(i), j) = y(a%irn(i), j) + alpha * a%val(i) * x(a%ja(i), j)
end do
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_c_oacc_hll_csmm
end submodule psb_c_oacc_hll_csmm_impl

@ -1,84 +0,0 @@
submodule (psb_c_oacc_hll_mat_mod) psb_c_oacc_hll_csmv_impl
use psb_base_mod
contains
module subroutine psb_c_oacc_hll_csmv(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_c_oacc_hll_sparse_mat), intent(in) :: a
complex(psb_spk_), intent(in) :: alpha, beta
complex(psb_spk_), intent(in) :: x(:)
complex(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, hksz, nhacks
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'c_oacc_hll_csmv'
logical, parameter :: debug = .false.
call psb_erractionsave(err_act)
info = psb_success_
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_c_hll_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
hksz = a%hksz
nhacks = (a%get_nrows() + hksz - 1) / hksz
!$acc parallel loop present(a, x, y)
do i = 1, m
y(i) = beta * y(i)
end do
! This loop nest cannot be run with collapse, since
! the inner loop extent varies.
!$acc parallel loop present(a, x, y)
do i = 1, nhacks
do j = a%hkoffs(i), a%hkoffs(i + 1) - 1
y(a%irn(j)) = y(a%irn(j)) + alpha * a%val(j) * x(a%ja(j))
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_c_oacc_hll_csmv
end submodule psb_c_oacc_hll_csmv_impl

@ -1,86 +0,0 @@
submodule (psb_d_oacc_csr_mat_mod) psb_d_oacc_csr_csmm_impl
use psb_base_mod
contains
module subroutine psb_d_oacc_csr_csmm(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_d_oacc_csr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta
real(psb_dpk_), intent(in) :: x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n,k, nxy
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'd_oacc_csmm'
logical, parameter :: debug = .false.
info = psb_success_
call psb_erractionsave(err_act)
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_d_csr_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nxy = min(size(x,2), size(y,2))
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, m
y(i,j) = beta * y(i,j)
end do
end do
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, n
do k = a%irp(i), a%irp(i+1) - 1
y(a%ja(k), j) = y(a%ja(k), j) + alpha * a%val(k) * x(i, j)
end do
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_d_oacc_csr_csmm
end submodule psb_d_oacc_csr_csmm_impl

@ -1,81 +0,0 @@
submodule (psb_d_oacc_csr_mat_mod) psb_d_oacc_csr_csmv_impl
use psb_base_mod
contains
module subroutine psb_d_oacc_csr_csmv(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_d_oacc_csr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta
real(psb_dpk_), intent(in) :: x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'd_oacc_csmv'
logical, parameter :: debug = .false.
call psb_erractionsave(err_act)
info = psb_success_
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_d_csr_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
!$acc parallel loop present(a, x, y)
do i = 1, m
y(i) = beta * y(i)
end do
!$acc parallel loop present(a, x, y)
do i = 1, n
do j = a%irp(i), a%irp(i+1) - 1
y(a%ja(j)) = y(a%ja(j)) + alpha * a%val(j) * x(i)
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_d_oacc_csr_csmv
end submodule psb_d_oacc_csr_csmv_impl

@ -1,86 +0,0 @@
submodule (psb_d_oacc_ell_mat_mod) psb_d_oacc_ell_csmm_impl
use psb_base_mod
contains
module subroutine psb_d_oacc_ell_csmm(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_d_oacc_ell_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta
real(psb_dpk_), intent(in) :: x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, k, nxy, nzt
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'd_oacc_ell_csmm'
logical, parameter :: debug = .false.
info = psb_success_
call psb_erractionsave(err_act)
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_d_ell_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nxy = min(size(x,2), size(y,2))
nzt = a%nzt
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, m
y(i,j) = beta * y(i,j)
end do
end do
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, n
do k = 1, nzt
y(i, j) = y(i, j) + alpha * a%val(i, k) * x(a%ja(i, k), j)
end do
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_d_oacc_ell_csmm
end submodule psb_d_oacc_ell_csmm_impl

@ -1,82 +0,0 @@
submodule (psb_d_oacc_ell_mat_mod) psb_d_oacc_ell_csmv_impl
use psb_base_mod
contains
module subroutine psb_d_oacc_ell_csmv(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_d_oacc_ell_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta
real(psb_dpk_), intent(in) :: x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, nzt
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'd_oacc_ell_csmv'
logical, parameter :: debug = .false.
call psb_erractionsave(err_act)
info = psb_success_
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_d_ell_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nzt = a%nzt
!$acc parallel loop present(a, x, y)
do i = 1, m
y(i) = beta * y(i)
end do
!$acc parallel loop present(a, x, y)
do i = 1, m
do j = 1, nzt
y(i) = y(i) + alpha * a%val(i, j) * x(a%ja(i, j))
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_d_oacc_ell_csmv
end submodule psb_d_oacc_ell_csmv_impl

@ -1,86 +0,0 @@
submodule (psb_d_oacc_hll_mat_mod) psb_d_oacc_hll_csmm_impl
use psb_base_mod
contains
module subroutine psb_d_oacc_hll_csmm(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_d_oacc_hll_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta
real(psb_dpk_), intent(in) :: x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, k, nxy, nhacks
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'd_oacc_hll_csmm'
logical, parameter :: debug = .false.
info = psb_success_
call psb_erractionsave(err_act)
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_d_hll_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nxy = min(size(x,2), size(y,2))
nhacks = (a%get_nrows() + a%hksz - 1) / a%hksz
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, m
y(i,j) = beta * y(i,j)
end do
end do
!$acc parallel loop present(a, x, y)
do j = 1, nxy
do k = 1, nhacks
do i = a%hkoffs(k), a%hkoffs(k + 1) - 1
y(a%irn(i), j) = y(a%irn(i), j) + alpha * a%val(i) * x(a%ja(i), j)
end do
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_d_oacc_hll_csmm
end submodule psb_d_oacc_hll_csmm_impl

@ -1,84 +0,0 @@
submodule (psb_d_oacc_hll_mat_mod) psb_d_oacc_hll_csmv_impl
use psb_base_mod
contains
module subroutine psb_d_oacc_hll_csmv(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_d_oacc_hll_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta
real(psb_dpk_), intent(in) :: x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, hksz, nhacks
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'd_oacc_hll_csmv'
logical, parameter :: debug = .false.
call psb_erractionsave(err_act)
info = psb_success_
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_d_hll_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
hksz = a%hksz
nhacks = (a%get_nrows() + hksz - 1) / hksz
!$acc parallel loop present(a, x, y)
do i = 1, m
y(i) = beta * y(i)
end do
! This loop nest cannot be run with collapse, since
! the inner loop extent varies.
!$acc parallel loop present(a, x, y)
do i = 1, nhacks
do j = a%hkoffs(i), a%hkoffs(i + 1) - 1
y(a%irn(j)) = y(a%irn(j)) + alpha * a%val(j) * x(a%ja(j))
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_d_oacc_hll_csmv
end submodule psb_d_oacc_hll_csmv_impl

@ -1,86 +0,0 @@
submodule (psb_s_oacc_csr_mat_mod) psb_s_oacc_csr_csmm_impl
use psb_base_mod
contains
module subroutine psb_s_oacc_csr_csmm(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_s_oacc_csr_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta
real(psb_spk_), intent(in) :: x(:,:)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n,k, nxy
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 's_oacc_csmm'
logical, parameter :: debug = .false.
info = psb_success_
call psb_erractionsave(err_act)
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_s_csr_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nxy = min(size(x,2), size(y,2))
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, m
y(i,j) = beta * y(i,j)
end do
end do
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, n
do k = a%irp(i), a%irp(i+1) - 1
y(a%ja(k), j) = y(a%ja(k), j) + alpha * a%val(k) * x(i, j)
end do
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_s_oacc_csr_csmm
end submodule psb_s_oacc_csr_csmm_impl

@ -1,81 +0,0 @@
submodule (psb_s_oacc_csr_mat_mod) psb_s_oacc_csr_csmv_impl
use psb_base_mod
contains
module subroutine psb_s_oacc_csr_csmv(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_s_oacc_csr_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta
real(psb_spk_), intent(in) :: x(:)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 's_oacc_csmv'
logical, parameter :: debug = .false.
call psb_erractionsave(err_act)
info = psb_success_
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_s_csr_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
!$acc parallel loop present(a, x, y)
do i = 1, m
y(i) = beta * y(i)
end do
!$acc parallel loop present(a, x, y)
do i = 1, n
do j = a%irp(i), a%irp(i+1) - 1
y(a%ja(j)) = y(a%ja(j)) + alpha * a%val(j) * x(i)
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_s_oacc_csr_csmv
end submodule psb_s_oacc_csr_csmv_impl

@ -1,86 +0,0 @@
submodule (psb_s_oacc_ell_mat_mod) psb_s_oacc_ell_csmm_impl
use psb_base_mod
contains
module subroutine psb_s_oacc_ell_csmm(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_s_oacc_ell_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta
real(psb_spk_), intent(in) :: x(:,:)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, k, nxy, nzt
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 's_oacc_ell_csmm'
logical, parameter :: debug = .false.
info = psb_success_
call psb_erractionsave(err_act)
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_s_ell_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nxy = min(size(x,2), size(y,2))
nzt = a%nzt
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, m
y(i,j) = beta * y(i,j)
end do
end do
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, n
do k = 1, nzt
y(i, j) = y(i, j) + alpha * a%val(i, k) * x(a%ja(i, k), j)
end do
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_s_oacc_ell_csmm
end submodule psb_s_oacc_ell_csmm_impl

@ -1,82 +0,0 @@
submodule (psb_s_oacc_ell_mat_mod) psb_s_oacc_ell_csmv_impl
use psb_base_mod
contains
module subroutine psb_s_oacc_ell_csmv(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_s_oacc_ell_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta
real(psb_spk_), intent(in) :: x(:)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, nzt
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 's_oacc_ell_csmv'
logical, parameter :: debug = .false.
call psb_erractionsave(err_act)
info = psb_success_
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_s_ell_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nzt = a%nzt
!$acc parallel loop present(a, x, y)
do i = 1, m
y(i) = beta * y(i)
end do
!$acc parallel loop present(a, x, y)
do i = 1, m
do j = 1, nzt
y(i) = y(i) + alpha * a%val(i, j) * x(a%ja(i, j))
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_s_oacc_ell_csmv
end submodule psb_s_oacc_ell_csmv_impl

@ -1,86 +0,0 @@
submodule (psb_s_oacc_hll_mat_mod) psb_s_oacc_hll_csmm_impl
use psb_base_mod
contains
module subroutine psb_s_oacc_hll_csmm(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_s_oacc_hll_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta
real(psb_spk_), intent(in) :: x(:,:)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, k, nxy, nhacks
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 's_oacc_hll_csmm'
logical, parameter :: debug = .false.
info = psb_success_
call psb_erractionsave(err_act)
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_s_hll_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nxy = min(size(x,2), size(y,2))
nhacks = (a%get_nrows() + a%hksz - 1) / a%hksz
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, m
y(i,j) = beta * y(i,j)
end do
end do
!$acc parallel loop present(a, x, y)
do j = 1, nxy
do k = 1, nhacks
do i = a%hkoffs(k), a%hkoffs(k + 1) - 1
y(a%irn(i), j) = y(a%irn(i), j) + alpha * a%val(i) * x(a%ja(i), j)
end do
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_s_oacc_hll_csmm
end submodule psb_s_oacc_hll_csmm_impl

@ -1,84 +0,0 @@
submodule (psb_s_oacc_hll_mat_mod) psb_s_oacc_hll_csmv_impl
use psb_base_mod
contains
module subroutine psb_s_oacc_hll_csmv(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_s_oacc_hll_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta
real(psb_spk_), intent(in) :: x(:)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, hksz, nhacks
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 's_oacc_hll_csmv'
logical, parameter :: debug = .false.
call psb_erractionsave(err_act)
info = psb_success_
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_s_hll_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
hksz = a%hksz
nhacks = (a%get_nrows() + hksz - 1) / hksz
!$acc parallel loop present(a, x, y)
do i = 1, m
y(i) = beta * y(i)
end do
! This loop nest cannot be run with collapse, since
! the inner loop extent varies.
!$acc parallel loop present(a, x, y)
do i = 1, nhacks
do j = a%hkoffs(i), a%hkoffs(i + 1) - 1
y(a%irn(j)) = y(a%irn(j)) + alpha * a%val(j) * x(a%ja(j))
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_s_oacc_hll_csmv
end submodule psb_s_oacc_hll_csmv_impl

@ -1,86 +0,0 @@
submodule (psb_z_oacc_csr_mat_mod) psb_z_oacc_csr_csmm_impl
use psb_base_mod
contains
module subroutine psb_z_oacc_csr_csmm(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_z_oacc_csr_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta
complex(psb_dpk_), intent(in) :: x(:,:)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n,k, nxy
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'z_oacc_csmm'
logical, parameter :: debug = .false.
info = psb_success_
call psb_erractionsave(err_act)
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_z_csr_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nxy = min(size(x,2), size(y,2))
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, m
y(i,j) = beta * y(i,j)
end do
end do
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, n
do k = a%irp(i), a%irp(i+1) - 1
y(a%ja(k), j) = y(a%ja(k), j) + alpha * a%val(k) * x(i, j)
end do
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_z_oacc_csr_csmm
end submodule psb_z_oacc_csr_csmm_impl

@ -1,81 +0,0 @@
submodule (psb_z_oacc_csr_mat_mod) psb_z_oacc_csr_csmv_impl
use psb_base_mod
contains
module subroutine psb_z_oacc_csr_csmv(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_z_oacc_csr_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta
complex(psb_dpk_), intent(in) :: x(:)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'z_oacc_csmv'
logical, parameter :: debug = .false.
call psb_erractionsave(err_act)
info = psb_success_
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_z_csr_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
!$acc parallel loop present(a, x, y)
do i = 1, m
y(i) = beta * y(i)
end do
!$acc parallel loop present(a, x, y)
do i = 1, n
do j = a%irp(i), a%irp(i+1) - 1
y(a%ja(j)) = y(a%ja(j)) + alpha * a%val(j) * x(i)
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_z_oacc_csr_csmv
end submodule psb_z_oacc_csr_csmv_impl

@ -1,86 +0,0 @@
submodule (psb_z_oacc_ell_mat_mod) psb_z_oacc_ell_csmm_impl
use psb_base_mod
contains
module subroutine psb_z_oacc_ell_csmm(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_z_oacc_ell_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta
complex(psb_dpk_), intent(in) :: x(:,:)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, k, nxy, nzt
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'z_oacc_ell_csmm'
logical, parameter :: debug = .false.
info = psb_success_
call psb_erractionsave(err_act)
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_z_ell_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nxy = min(size(x,2), size(y,2))
nzt = a%nzt
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, m
y(i,j) = beta * y(i,j)
end do
end do
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, n
do k = 1, nzt
y(i, j) = y(i, j) + alpha * a%val(i, k) * x(a%ja(i, k), j)
end do
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_z_oacc_ell_csmm
end submodule psb_z_oacc_ell_csmm_impl

@ -1,82 +0,0 @@
submodule (psb_z_oacc_ell_mat_mod) psb_z_oacc_ell_csmv_impl
use psb_base_mod
contains
module subroutine psb_z_oacc_ell_csmv(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_z_oacc_ell_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta
complex(psb_dpk_), intent(in) :: x(:)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, nzt
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'z_oacc_ell_csmv'
logical, parameter :: debug = .false.
call psb_erractionsave(err_act)
info = psb_success_
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_z_ell_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nzt = a%nzt
!$acc parallel loop present(a, x, y)
do i = 1, m
y(i) = beta * y(i)
end do
!$acc parallel loop present(a, x, y)
do i = 1, m
do j = 1, nzt
y(i) = y(i) + alpha * a%val(i, j) * x(a%ja(i, j))
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_z_oacc_ell_csmv
end submodule psb_z_oacc_ell_csmv_impl

@ -1,86 +0,0 @@
submodule (psb_z_oacc_hll_mat_mod) psb_z_oacc_hll_csmm_impl
use psb_base_mod
contains
module subroutine psb_z_oacc_hll_csmm(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_z_oacc_hll_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta
complex(psb_dpk_), intent(in) :: x(:,:)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, k, nxy, nhacks
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'z_oacc_hll_csmm'
logical, parameter :: debug = .false.
info = psb_success_
call psb_erractionsave(err_act)
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_z_hll_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
nxy = min(size(x,2), size(y,2))
nhacks = (a%get_nrows() + a%hksz - 1) / a%hksz
!$acc parallel loop collapse(2) present(a, x, y)
do j = 1, nxy
do i = 1, m
y(i,j) = beta * y(i,j)
end do
end do
!$acc parallel loop present(a, x, y)
do j = 1, nxy
do k = 1, nhacks
do i = a%hkoffs(k), a%hkoffs(k + 1) - 1
y(a%irn(i), j) = y(a%irn(i), j) + alpha * a%val(i) * x(a%ja(i), j)
end do
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_z_oacc_hll_csmm
end submodule psb_z_oacc_hll_csmm_impl

@ -1,84 +0,0 @@
submodule (psb_z_oacc_hll_mat_mod) psb_z_oacc_hll_csmv_impl
use psb_base_mod
contains
module subroutine psb_z_oacc_hll_csmv(alpha, a, x, beta, y, info, trans)
implicit none
class(psb_z_oacc_hll_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta
complex(psb_dpk_), intent(in) :: x(:)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
character :: trans_
integer(psb_ipk_) :: i, j, m, n, hksz, nhacks
logical :: tra
integer(psb_ipk_) :: err_act
character(len=20) :: name = 'z_oacc_hll_csmv'
logical, parameter :: debug = .false.
call psb_erractionsave(err_act)
info = psb_success_
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info, name)
goto 9999
endif
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (tra) then
m = a%get_ncols()
n = a%get_nrows()
else
n = a%get_ncols()
m = a%get_nrows()
end if
if (size(x,1) < n) then
info = 36
call psb_errpush(info, name, i_err = (/3 * ione, n, izero, izero, izero/))
goto 9999
end if
if (size(y,1) < m) then
info = 36
call psb_errpush(info, name, i_err = (/5 * ione, m, izero, izero, izero/))
goto 9999
end if
if (tra) then
call a%psb_z_hll_sparse_mat%spmm(alpha, x, beta, y, info, trans)
else
hksz = a%hksz
nhacks = (a%get_nrows() + hksz - 1) / hksz
!$acc parallel loop present(a, x, y)
do i = 1, m
y(i) = beta * y(i)
end do
! This loop nest cannot be run with collapse, since
! the inner loop extent varies.
!$acc parallel loop present(a, x, y)
do i = 1, nhacks
do j = a%hkoffs(i), a%hkoffs(i + 1) - 1
y(a%irn(j)) = y(a%irn(j)) + alpha * a%val(j) * x(a%ja(j))
end do
end do
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_z_oacc_hll_csmv
end submodule psb_z_oacc_hll_csmv_impl
Loading…
Cancel
Save