Home
last modified time | relevance | path

Searched refs:v_dual (Results 1 – 4 of 4) sorted by relevance

/petsc/src/vec/vec/impls/seq/kokkos/
H A Dveckokkosimpl.hpp23 PetscScalarKokkosDualView v_dual; member
56 v_dual = PetscScalarKokkosDualView(v_d, v_h); in Vec_Kokkos()
57 if (!array_d) v_dual.modify_host(); in Vec_Kokkos()
61 Vec_Kokkos(PetscScalarKokkosDualView dual) : v_dual(dual) { } in Vec_Kokkos()
69 PetscScalarKokkosView v_d(array, v_dual.extent(0)); in UpdateArray()
70 PetscScalarKokkosViewHost v_h(array, v_dual.extent(0)); in UpdateArray()
74 PetscCallCXX(v_dual = PetscScalarKokkosDualView(v_d, v_h)); in UpdateArray()
81 PetscScalarKokkosViewHost v_h(array, v_dual.extent(0)); in UpdateArray()
84 PetscCallCXX(v_dual = PetscScalarKokkosDualView(v_dual.view<DefaultMemorySpace>(), v_h)); in UpdateArray()
85 PetscCallCXX(v_dual.modify_host()); in UpdateArray()
[all …]
H A Dveckok.kokkos.cxx26 PetscCallCXX(veckok->v_dual.sync<ExecutionSpace>()); in VecGetKokkosView_Private()
28 PetscCallCXX(*kv = veckok->v_dual.view<ExecutionSpace>()); in VecGetKokkosView_Private()
40 …if (overwrite) PetscCallCXX(veckok->v_dual.clear_sync_state()); /* If overwrite=true, clear the ol… in VecRestoreKokkosView_Private()
41 PetscCallCXX(veckok->v_dual.modify<ExecutionSpace>()); in VecRestoreKokkosView_Private()
54 PetscCallCXX(veckok->v_dual.sync<ExecutionSpace>()); in VecGetKokkosView()
55 PetscCallCXX(*kv = veckok->v_dual.view<ExecutionSpace>()); in VecGetKokkosView()
685 ykok->v_dual.clear_sync_state(); in VecCopy_SeqKokkos()
686 …PetscCallCXX(Kokkos::deep_copy(exec, ykok->v_dual, xkok->v_dual)); // either cpu2cpu or gpu2cpu, s… in VecCopy_SeqKokkos()
691 …if (xkok->v_dual.need_sync_host()) { // x's device has newer d… in VecCopy_SeqKokkos()
692 PetscCallCXX(Kokkos::deep_copy(exec, yv, xkok->v_dual.view_device())); // gpu2cpu in VecCopy_SeqKokkos()
[all …]
/petsc/include/petsc/private/
H A Dkokkosimpl.hpp130 static PetscErrorCode KokkosDualViewSyncHost(Kokkos::DualView<Type *> &v_dual, const Kokkos::Defaul… in KokkosDualViewSyncHost() argument
132 size_t bytes = v_dual.extent(0) * sizeof(Type); in KokkosDualViewSyncHost()
135 if (v_dual.need_sync_host()) { in KokkosDualViewSyncHost()
136 PetscCallCXX(v_dual.sync_host(exec)); in KokkosDualViewSyncHost()
147 static PetscErrorCode KokkosDualViewSyncDevice(Kokkos::DualView<Type *> &v_dual, const Kokkos::Defa… in KokkosDualViewSyncDevice() argument
149 size_t bytes = v_dual.extent(0) * sizeof(Type); in KokkosDualViewSyncDevice()
152 if (v_dual.need_sync_device()) { in KokkosDualViewSyncDevice()
153 PetscCallCXX(v_dual.sync_device(exec)); in KokkosDualViewSyncDevice()
/petsc/src/vec/vec/impls/mpi/kokkos/
H A Dmpikok.kokkos.cxx310 …PetscCallCXX(static_cast<Vec_Kokkos *>(v->spptr)->v_dual.modify_host()); // as we only init'ed arr… in VecDuplicateVecs_MPIKokkos_GEMV()
348 PetscScalarKokkosDualView v_dual; in VecCreate_MPIKokkos() local
354 …PetscCallCXX(v_dual = PetscScalarKokkosDualView("v_dual", v->map->n)); // Kokkos init's v_dual to … in VecCreate_MPIKokkos()
355 PetscCall(VecCreate_MPI_Private(v, PETSC_FALSE, 0, v_dual.view_host().data())); in VecCreate_MPIKokkos()
360 PetscCallCXX(v->spptr = new Vec_Kokkos(v_dual)); in VecCreate_MPIKokkos()
457 veckok->v_dual.modify_device(); /* Mark the device is modified */ in VecCreateMPIKokkosWithArray()