#pragma once #include <../src/vec/is/sf/impls/basic/sfpack.h> #include #include #include namespace Petsc { namespace sf { namespace cupm { namespace impl { template struct PETSC_SINGLE_LIBRARY_VISIBILITY_INTERNAL SfInterface : device::cupm::impl::Interface { PETSC_CUPM_INHERIT_INTERFACE_TYPEDEFS_USING(T); private: template static PetscErrorCode Pack(PetscSFLink, PetscInt, PetscInt, PetscSFPackOpt, const PetscInt *, const void *, void *) noexcept; template static PetscErrorCode UnpackAndOp(PetscSFLink, PetscInt, PetscInt, PetscSFPackOpt, const PetscInt *, void *, const void *) noexcept; template static PetscErrorCode FetchAndOp(PetscSFLink, PetscInt, PetscInt, PetscSFPackOpt, const PetscInt *, void *, void *) noexcept; template static PetscErrorCode ScatterAndOp(PetscSFLink, PetscInt, PetscInt, PetscSFPackOpt, const PetscInt *, const void *, PetscInt, PetscSFPackOpt, const PetscInt *, void *) noexcept; template static PetscErrorCode ScatterAndInsert(PetscSFLink, PetscInt, PetscInt, PetscSFPackOpt, const PetscInt *, const void *, PetscInt, PetscSFPackOpt, const PetscInt *, void *) noexcept; template static PetscErrorCode FetchAndOpLocal(PetscSFLink, PetscInt, PetscInt, PetscSFPackOpt, const PetscInt *, void *, PetscInt, PetscSFPackOpt, const PetscInt *, const void *, void *) noexcept; template static void PackInit_RealType(PetscSFLink) noexcept; template struct PackInit_IntegerType_Atomic; template static void PackInit_IntegerType(PetscSFLink link) noexcept; #if PetscDefined(HAVE_COMPLEX) template static void PackInit_ComplexType(PetscSFLink link) noexcept; #endif template static void PackInit_PairType(PetscSFLink link) noexcept; template static void PackInit_DumbType(PetscSFLink link) noexcept; static PetscErrorCode LinkSyncDevice(PetscSFLink) noexcept; static PetscErrorCode LinkSyncStream(PetscSFLink) noexcept; static PetscErrorCode LinkMemcpy(PetscSFLink, PetscMemType, void *, PetscMemType, const void *, size_t) noexcept; static PetscErrorCode LinkDestroy_MPI(PetscSF, PetscSFLink) noexcept; public: static PetscErrorCode Malloc(PetscMemType, size_t, void **) noexcept; static PetscErrorCode Free(PetscMemType, void *) noexcept; static PetscErrorCode LinkSetUp(PetscSF, PetscSFLink, MPI_Datatype) noexcept; }; } // namespace impl } // namespace cupm } // namespace sf } // namespace Petsc