From 864872ecacff43d40eed244a1044c0eb293db117 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sat, 17 Feb 2024 17:28:32 +0100 Subject: [PATCH] Intermediate implementation of abgdxyz on cuda --- cuda/psb_d_cuda_vect_mod.F90 | 39 ++++++++++++++++++++++++++++++------ cuda/spgpu/vector.h | 15 +++++++++++++- 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/cuda/psb_d_cuda_vect_mod.F90 b/cuda/psb_d_cuda_vect_mod.F90 index 03e65f91..fe5d3a38 100644 --- a/cuda/psb_d_cuda_vect_mod.F90 +++ b/cuda/psb_d_cuda_vect_mod.F90 @@ -923,13 +923,40 @@ contains real(psb_dpk_), intent (in) :: alpha, beta, gamma, delta integer(psb_ipk_), intent(out) :: info - call z%psb_d_base_vect_type%abgdxyz(m,alpha,beta,gamma,delta,x,y,info) -!!$ -!!$ if (x%is_dev()) call x%sync() -!!$ -!!$ call y%axpby(m,alpha,x,beta,info) -!!$ call z%axpby(m,gamma,y,delta,info) + + info = psb_success_ + if (.false.) then + + select type(xx => x) + type is (psb_d_vect_cuda) + ! Do something different here + if ((beta /= dzero).and.y%is_host())& + & call y%sync() + if (xx%is_host()) call xx%sync() + nx = getMultiVecDeviceSize(xx%deviceVect) + ny = getMultiVecDeviceSize(y%deviceVect) + if ((nx