From 105aa3c5704bb01daef4b87126fd398857252afd Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sat, 17 Feb 2024 17:46:09 +0100 Subject: [PATCH] Intermediate impl of ABGDXYZ --- cuda/psb_d_cuda_vect_mod.F90 | 54 +++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/cuda/psb_d_cuda_vect_mod.F90 b/cuda/psb_d_cuda_vect_mod.F90 index fe5d3a38..36fac14e 100644 --- a/cuda/psb_d_cuda_vect_mod.F90 +++ b/cuda/psb_d_cuda_vect_mod.F90 @@ -922,33 +922,47 @@ contains class(psb_d_vect_cuda), intent(inout) :: z real(psb_dpk_), intent (in) :: alpha, beta, gamma, delta integer(psb_ipk_), intent(out) :: info - + integer(psb_ipk_) :: nx, ny, nz + logical :: gpu_done info = psb_success_ if (.false.) then - + gpu_done = .false. 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 y) + class is (psb_d_vect_cuda) + select type(zz => z) + class is (psb_d_vect_cuda) + ! Do something different here + if ((beta /= dzero).and.yy%is_host())& + & call yy%sync() + if ((delta /= dzero).and.zz%is_host())& + & call zz%sync() + if (xx%is_host()) call xx%sync() + nx = getMultiVecDeviceSize(xx%deviceVect) + ny = getMultiVecDeviceSize(yy%deviceVect) + nz = getMultiVecDeviceSize(zz%deviceVect) + if ((nx