1 #ifndef HOSTDEVICE_HPP 2 #define HOSTDEVICE_HPP 3 4 #if defined(__cplusplus) 5 #include "../impldevicebase.hpp" /*I "petscdevice.h" I*/ 6 7 namespace Petsc 8 { 9 10 namespace device 11 { 12 13 namespace host 14 { 15 16 class Device : public ::Petsc::device::impl::DeviceBase<Device> { 17 public: 18 PETSC_DEVICE_IMPL_BASE_CLASS_HEADER(base_type, Device); 19 20 static PetscErrorCode initialize(MPI_Comm, PetscInt *, PetscBool *, PetscDeviceInitType *) noexcept; 21 22 private: 23 PETSC_CXX_COMPAT_DECL(constexpr PetscDeviceType PETSC_DEVICE_IMPL_()) { return PETSC_DEVICE_HOST; } 24 25 static PetscErrorCode get_attribute_(PetscInt, PetscDeviceAttribute, void *) noexcept; 26 }; 27 28 } // namespace host 29 30 } // namespace device 31 32 } // namespace Petsc 33 34 #endif // __cplusplus 35 36 #endif // HOSTDEVICE_HPP 37