Date: 2026-07-30T21:14:25+00:00

Actual source code: hostdevice.hpp

      1: #pragma once

      3: #include "../impldevicebase.hpp" /*I "petscdevice.h" I*/

      5: namespace Petsc
      6: {

      8: namespace device
      9: {

     11: namespace host
     12: {

     14: class Device : public ::Petsc::device::impl::DeviceBase<Device> {
     15: public:
     16:   PETSC_DEVICE_IMPL_BASE_CLASS_HEADER(base_type, Device);

     18:   static PetscErrorCode initialize(MPI_Comm, PetscInt *, PetscBool *, PetscDeviceInitType *) noexcept;

     20: private:
     21:   PETSC_CXX_COMPAT_DECL(constexpr PetscDeviceType PETSC_DEVICE_IMPL_()) { return PETSC_DEVICE_HOST; }

     23:   static PetscErrorCode get_attribute_(PetscInt, PetscDeviceAttribute, void *) noexcept;
     24: };

     26: } // namespace host

     28: } // namespace device

     30: } // namespace Petsc