Actual source code: hostdevice.hpp

  1: #ifndef HOSTDEVICE_HPP
  2: #define HOSTDEVICE_HPP

  4: #if defined(__cplusplus)
  5:   #include "../impldevicebase.hpp" /*I "petscdevice.h" I*/

  7: namespace Petsc
  8: {

 10: namespace device
 11: {

 13: namespace host
 14: {

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

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

 22: private:
 23:   PETSC_CXX_COMPAT_DECL(constexpr PetscDeviceType PETSC_DEVICE_IMPL_()) { return PETSC_DEVICE_HOST; }

 25:   static PetscErrorCode get_attribute_(PetscInt, PetscDeviceAttribute, void *) noexcept;
 26: };

 28: } // namespace host

 30: } // namespace device

 32: } // namespace Petsc

 34: #endif // __cplusplus

 36: #endif // HOSTDEVICE_HPP