// automatically generated by the FlatBuffers compiler, do not modify


#ifndef FLATBUFFERS_GENERATED_DEVICEPROPERTIES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
#define FLATBUFFERS_GENERATED_DEVICEPROPERTIES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_

#include "flatbuffers/flatbuffers.h"

// Ensure the included flatbuffers.h is the same version as when this file was
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
              FLATBUFFERS_VERSION_MINOR == 9 &&
              FLATBUFFERS_VERSION_REVISION == 23,
             "Non-compatible flatbuffers version included");

namespace hipdnn_flatbuffers_sdk {
namespace data_objects {

struct DeviceProperties;
struct DevicePropertiesBuilder;
struct DevicePropertiesT;

bool operator==(const DevicePropertiesT &lhs, const DevicePropertiesT &rhs);
bool operator!=(const DevicePropertiesT &lhs, const DevicePropertiesT &rhs);

struct DevicePropertiesT : public ::flatbuffers::NativeTable {
  typedef DeviceProperties TableType;
  int32_t device_id = -1;
  int32_t multi_processor_count = 0;
  uint64_t total_global_mem = 0;
  std::string architecture_name{};
};

/// @brief Device properties for heuristic plugin selection.
///
/// This table carries device facts needed for engine selection heuristics.
/// It is serialized by the backend and passed to heuristic plugins via
/// hipdnnHeuristicHandleSetDeviceProperties.
///
/// Evolution: New optional fields can be added without breaking compatibility.
/// Plugins verify and parse this buffer using flatbuffers::Verifier.
///
/// RFC 0007 Reference: Section 6 (Device Properties), Section 13.2 (Serialization)
struct DeviceProperties FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef DevicePropertiesT NativeTableType;
  typedef DevicePropertiesBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_DEVICE_ID = 4,
    VT_MULTI_PROCESSOR_COUNT = 6,
    VT_TOTAL_GLOBAL_MEM = 8,
    VT_ARCHITECTURE_NAME = 10
  };
  /// Device ID from hipGetDevice
  int32_t device_id() const {
    return GetField<int32_t>(VT_DEVICE_ID, -1);
  }
  bool mutate_device_id(int32_t _device_id = -1) {
    return SetField<int32_t>(VT_DEVICE_ID, _device_id, -1);
  }
  /// Number of multiprocessors (compute units)
  int32_t multi_processor_count() const {
    return GetField<int32_t>(VT_MULTI_PROCESSOR_COUNT, 0);
  }
  bool mutate_multi_processor_count(int32_t _multi_processor_count = 0) {
    return SetField<int32_t>(VT_MULTI_PROCESSOR_COUNT, _multi_processor_count, 0);
  }
  /// Total global memory in bytes
  uint64_t total_global_mem() const {
    return GetField<uint64_t>(VT_TOTAL_GLOBAL_MEM, 0);
  }
  bool mutate_total_global_mem(uint64_t _total_global_mem = 0) {
    return SetField<uint64_t>(VT_TOTAL_GLOBAL_MEM, _total_global_mem, 0);
  }
  /// GPU architecture name (e.g., "gfx90a", "gfx942")
  const ::flatbuffers::String *architecture_name() const {
    return GetPointer<const ::flatbuffers::String *>(VT_ARCHITECTURE_NAME);
  }
  ::flatbuffers::String *mutable_architecture_name() {
    return GetPointer<::flatbuffers::String *>(VT_ARCHITECTURE_NAME);
  }
  bool Verify(::flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<int32_t>(verifier, VT_DEVICE_ID, 4) &&
           VerifyField<int32_t>(verifier, VT_MULTI_PROCESSOR_COUNT, 4) &&
           VerifyField<uint64_t>(verifier, VT_TOTAL_GLOBAL_MEM, 8) &&
           VerifyOffset(verifier, VT_ARCHITECTURE_NAME) &&
           verifier.VerifyString(architecture_name()) &&
           verifier.EndTable();
  }
  DevicePropertiesT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(DevicePropertiesT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<DeviceProperties> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const DevicePropertiesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct DevicePropertiesBuilder {
  typedef DeviceProperties Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_device_id(int32_t device_id) {
    fbb_.AddElement<int32_t>(DeviceProperties::VT_DEVICE_ID, device_id, -1);
  }
  void add_multi_processor_count(int32_t multi_processor_count) {
    fbb_.AddElement<int32_t>(DeviceProperties::VT_MULTI_PROCESSOR_COUNT, multi_processor_count, 0);
  }
  void add_total_global_mem(uint64_t total_global_mem) {
    fbb_.AddElement<uint64_t>(DeviceProperties::VT_TOTAL_GLOBAL_MEM, total_global_mem, 0);
  }
  void add_architecture_name(::flatbuffers::Offset<::flatbuffers::String> architecture_name) {
    fbb_.AddOffset(DeviceProperties::VT_ARCHITECTURE_NAME, architecture_name);
  }
  explicit DevicePropertiesBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<DeviceProperties> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<DeviceProperties>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<DeviceProperties> CreateDeviceProperties(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int32_t device_id = -1,
    int32_t multi_processor_count = 0,
    uint64_t total_global_mem = 0,
    ::flatbuffers::Offset<::flatbuffers::String> architecture_name = 0) {
  DevicePropertiesBuilder builder_(_fbb);
  builder_.add_total_global_mem(total_global_mem);
  builder_.add_architecture_name(architecture_name);
  builder_.add_multi_processor_count(multi_processor_count);
  builder_.add_device_id(device_id);
  return builder_.Finish();
}

inline ::flatbuffers::Offset<DeviceProperties> CreateDevicePropertiesDirect(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int32_t device_id = -1,
    int32_t multi_processor_count = 0,
    uint64_t total_global_mem = 0,
    const char *architecture_name = nullptr) {
  auto architecture_name__ = architecture_name ? _fbb.CreateString(architecture_name) : 0;
  return hipdnn_flatbuffers_sdk::data_objects::CreateDeviceProperties(
      _fbb,
      device_id,
      multi_processor_count,
      total_global_mem,
      architecture_name__);
}

::flatbuffers::Offset<DeviceProperties> CreateDeviceProperties(::flatbuffers::FlatBufferBuilder &_fbb, const DevicePropertiesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);


inline bool operator==(const DevicePropertiesT &lhs, const DevicePropertiesT &rhs) {
  return
      (lhs.device_id == rhs.device_id) &&
      (lhs.multi_processor_count == rhs.multi_processor_count) &&
      (lhs.total_global_mem == rhs.total_global_mem) &&
      (lhs.architecture_name == rhs.architecture_name);
}

inline bool operator!=(const DevicePropertiesT &lhs, const DevicePropertiesT &rhs) {
    return !(lhs == rhs);
}


inline DevicePropertiesT *DeviceProperties::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
  auto _o = std::unique_ptr<DevicePropertiesT>(new DevicePropertiesT());
  UnPackTo(_o.get(), _resolver);
  return _o.release();
}

inline void DeviceProperties::UnPackTo(DevicePropertiesT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = device_id(); _o->device_id = _e; }
  { auto _e = multi_processor_count(); _o->multi_processor_count = _e; }
  { auto _e = total_global_mem(); _o->total_global_mem = _e; }
  { auto _e = architecture_name(); if (_e) _o->architecture_name = _e->str(); }
}

inline ::flatbuffers::Offset<DeviceProperties> DeviceProperties::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const DevicePropertiesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return CreateDeviceProperties(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<DeviceProperties> CreateDeviceProperties(::flatbuffers::FlatBufferBuilder &_fbb, const DevicePropertiesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const DevicePropertiesT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _device_id = _o->device_id;
  auto _multi_processor_count = _o->multi_processor_count;
  auto _total_global_mem = _o->total_global_mem;
  auto _architecture_name = _o->architecture_name.empty() ? 0 : _fbb.CreateString(_o->architecture_name);
  return hipdnn_flatbuffers_sdk::data_objects::CreateDeviceProperties(
      _fbb,
      _device_id,
      _multi_processor_count,
      _total_global_mem,
      _architecture_name);
}

inline const hipdnn_flatbuffers_sdk::data_objects::DeviceProperties *GetDeviceProperties(const void *buf) {
  return ::flatbuffers::GetRoot<hipdnn_flatbuffers_sdk::data_objects::DeviceProperties>(buf);
}

inline const hipdnn_flatbuffers_sdk::data_objects::DeviceProperties *GetSizePrefixedDeviceProperties(const void *buf) {
  return ::flatbuffers::GetSizePrefixedRoot<hipdnn_flatbuffers_sdk::data_objects::DeviceProperties>(buf);
}

inline DeviceProperties *GetMutableDeviceProperties(void *buf) {
  return ::flatbuffers::GetMutableRoot<DeviceProperties>(buf);
}

inline hipdnn_flatbuffers_sdk::data_objects::DeviceProperties *GetMutableSizePrefixedDeviceProperties(void *buf) {
  return ::flatbuffers::GetMutableSizePrefixedRoot<hipdnn_flatbuffers_sdk::data_objects::DeviceProperties>(buf);
}

inline const char *DevicePropertiesIdentifier() {
  return "HDDP";
}

inline bool DevicePropertiesBufferHasIdentifier(const void *buf) {
  return ::flatbuffers::BufferHasIdentifier(
      buf, DevicePropertiesIdentifier());
}

inline bool SizePrefixedDevicePropertiesBufferHasIdentifier(const void *buf) {
  return ::flatbuffers::BufferHasIdentifier(
      buf, DevicePropertiesIdentifier(), true);
}

inline bool VerifyDevicePropertiesBuffer(
    ::flatbuffers::Verifier &verifier) {
  return verifier.VerifyBuffer<hipdnn_flatbuffers_sdk::data_objects::DeviceProperties>(DevicePropertiesIdentifier());
}

inline bool VerifySizePrefixedDevicePropertiesBuffer(
    ::flatbuffers::Verifier &verifier) {
  return verifier.VerifySizePrefixedBuffer<hipdnn_flatbuffers_sdk::data_objects::DeviceProperties>(DevicePropertiesIdentifier());
}

inline void FinishDevicePropertiesBuffer(
    ::flatbuffers::FlatBufferBuilder &fbb,
    ::flatbuffers::Offset<hipdnn_flatbuffers_sdk::data_objects::DeviceProperties> root) {
  fbb.Finish(root, DevicePropertiesIdentifier());
}

inline void FinishSizePrefixedDevicePropertiesBuffer(
    ::flatbuffers::FlatBufferBuilder &fbb,
    ::flatbuffers::Offset<hipdnn_flatbuffers_sdk::data_objects::DeviceProperties> root) {
  fbb.FinishSizePrefixed(root, DevicePropertiesIdentifier());
}

inline std::unique_ptr<hipdnn_flatbuffers_sdk::data_objects::DevicePropertiesT> UnPackDeviceProperties(
    const void *buf,
    const ::flatbuffers::resolver_function_t *res = nullptr) {
  return std::unique_ptr<hipdnn_flatbuffers_sdk::data_objects::DevicePropertiesT>(GetDeviceProperties(buf)->UnPack(res));
}

inline std::unique_ptr<hipdnn_flatbuffers_sdk::data_objects::DevicePropertiesT> UnPackSizePrefixedDeviceProperties(
    const void *buf,
    const ::flatbuffers::resolver_function_t *res = nullptr) {
  return std::unique_ptr<hipdnn_flatbuffers_sdk::data_objects::DevicePropertiesT>(GetSizePrefixedDeviceProperties(buf)->UnPack(res));
}

}  // namespace data_objects
}  // namespace hipdnn_flatbuffers_sdk

#endif  // FLATBUFFERS_GENERATED_DEVICEPROPERTIES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
