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


#ifndef FLATBUFFERS_GENERATED_RMSNORMBACKWARDATTRIBUTES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
#define FLATBUFFERS_GENERATED_RMSNORMBACKWARDATTRIBUTES_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 == 24 &&
              FLATBUFFERS_VERSION_MINOR == 12 &&
              FLATBUFFERS_VERSION_REVISION == 23,
             "Non-compatible flatbuffers version included");

namespace hipdnn_flatbuffers_sdk {
namespace data_objects {

struct RMSNormBackwardAttributes;
struct RMSNormBackwardAttributesBuilder;
struct RMSNormBackwardAttributesT;

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

struct RMSNormBackwardAttributesT : public ::flatbuffers::NativeTable {
  typedef RMSNormBackwardAttributes TableType;
  int64_t dy_tensor_uid = 0;
  int64_t x_tensor_uid = 0;
  int64_t scale_tensor_uid = 0;
  ::flatbuffers::Optional<int64_t> inv_rms_tensor_uid = ::flatbuffers::nullopt;
  int64_t dx_tensor_uid = 0;
  int64_t dscale_tensor_uid = 0;
  ::flatbuffers::Optional<int64_t> dbias_tensor_uid = ::flatbuffers::nullopt;
};

struct RMSNormBackwardAttributes FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef RMSNormBackwardAttributesT NativeTableType;
  typedef RMSNormBackwardAttributesBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_DY_TENSOR_UID = 4,
    VT_X_TENSOR_UID = 6,
    VT_SCALE_TENSOR_UID = 8,
    VT_INV_RMS_TENSOR_UID = 10,
    VT_DX_TENSOR_UID = 12,
    VT_DSCALE_TENSOR_UID = 14,
    VT_DBIAS_TENSOR_UID = 16
  };
  int64_t dy_tensor_uid() const {
    return GetField<int64_t>(VT_DY_TENSOR_UID, 0);
  }
  bool mutate_dy_tensor_uid(int64_t _dy_tensor_uid = 0) {
    return SetField<int64_t>(VT_DY_TENSOR_UID, _dy_tensor_uid, 0);
  }
  int64_t x_tensor_uid() const {
    return GetField<int64_t>(VT_X_TENSOR_UID, 0);
  }
  bool mutate_x_tensor_uid(int64_t _x_tensor_uid = 0) {
    return SetField<int64_t>(VT_X_TENSOR_UID, _x_tensor_uid, 0);
  }
  int64_t scale_tensor_uid() const {
    return GetField<int64_t>(VT_SCALE_TENSOR_UID, 0);
  }
  bool mutate_scale_tensor_uid(int64_t _scale_tensor_uid = 0) {
    return SetField<int64_t>(VT_SCALE_TENSOR_UID, _scale_tensor_uid, 0);
  }
  ::flatbuffers::Optional<int64_t> inv_rms_tensor_uid() const {
    return GetOptional<int64_t, int64_t>(VT_INV_RMS_TENSOR_UID);
  }
  bool mutate_inv_rms_tensor_uid(int64_t _inv_rms_tensor_uid) {
    return SetField<int64_t>(VT_INV_RMS_TENSOR_UID, _inv_rms_tensor_uid);
  }
  int64_t dx_tensor_uid() const {
    return GetField<int64_t>(VT_DX_TENSOR_UID, 0);
  }
  bool mutate_dx_tensor_uid(int64_t _dx_tensor_uid = 0) {
    return SetField<int64_t>(VT_DX_TENSOR_UID, _dx_tensor_uid, 0);
  }
  int64_t dscale_tensor_uid() const {
    return GetField<int64_t>(VT_DSCALE_TENSOR_UID, 0);
  }
  bool mutate_dscale_tensor_uid(int64_t _dscale_tensor_uid = 0) {
    return SetField<int64_t>(VT_DSCALE_TENSOR_UID, _dscale_tensor_uid, 0);
  }
  ::flatbuffers::Optional<int64_t> dbias_tensor_uid() const {
    return GetOptional<int64_t, int64_t>(VT_DBIAS_TENSOR_UID);
  }
  bool mutate_dbias_tensor_uid(int64_t _dbias_tensor_uid) {
    return SetField<int64_t>(VT_DBIAS_TENSOR_UID, _dbias_tensor_uid);
  }
  bool Verify(::flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<int64_t>(verifier, VT_DY_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_X_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_SCALE_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_INV_RMS_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DX_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DSCALE_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DBIAS_TENSOR_UID, 8) &&
           verifier.EndTable();
  }
  RMSNormBackwardAttributesT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(RMSNormBackwardAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<RMSNormBackwardAttributes> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const RMSNormBackwardAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct RMSNormBackwardAttributesBuilder {
  typedef RMSNormBackwardAttributes Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_dy_tensor_uid(int64_t dy_tensor_uid) {
    fbb_.AddElement<int64_t>(RMSNormBackwardAttributes::VT_DY_TENSOR_UID, dy_tensor_uid, 0);
  }
  void add_x_tensor_uid(int64_t x_tensor_uid) {
    fbb_.AddElement<int64_t>(RMSNormBackwardAttributes::VT_X_TENSOR_UID, x_tensor_uid, 0);
  }
  void add_scale_tensor_uid(int64_t scale_tensor_uid) {
    fbb_.AddElement<int64_t>(RMSNormBackwardAttributes::VT_SCALE_TENSOR_UID, scale_tensor_uid, 0);
  }
  void add_inv_rms_tensor_uid(int64_t inv_rms_tensor_uid) {
    fbb_.AddElement<int64_t>(RMSNormBackwardAttributes::VT_INV_RMS_TENSOR_UID, inv_rms_tensor_uid);
  }
  void add_dx_tensor_uid(int64_t dx_tensor_uid) {
    fbb_.AddElement<int64_t>(RMSNormBackwardAttributes::VT_DX_TENSOR_UID, dx_tensor_uid, 0);
  }
  void add_dscale_tensor_uid(int64_t dscale_tensor_uid) {
    fbb_.AddElement<int64_t>(RMSNormBackwardAttributes::VT_DSCALE_TENSOR_UID, dscale_tensor_uid, 0);
  }
  void add_dbias_tensor_uid(int64_t dbias_tensor_uid) {
    fbb_.AddElement<int64_t>(RMSNormBackwardAttributes::VT_DBIAS_TENSOR_UID, dbias_tensor_uid);
  }
  explicit RMSNormBackwardAttributesBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<RMSNormBackwardAttributes> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<RMSNormBackwardAttributes>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<RMSNormBackwardAttributes> CreateRMSNormBackwardAttributes(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int64_t dy_tensor_uid = 0,
    int64_t x_tensor_uid = 0,
    int64_t scale_tensor_uid = 0,
    ::flatbuffers::Optional<int64_t> inv_rms_tensor_uid = ::flatbuffers::nullopt,
    int64_t dx_tensor_uid = 0,
    int64_t dscale_tensor_uid = 0,
    ::flatbuffers::Optional<int64_t> dbias_tensor_uid = ::flatbuffers::nullopt) {
  RMSNormBackwardAttributesBuilder builder_(_fbb);
  if(dbias_tensor_uid) { builder_.add_dbias_tensor_uid(*dbias_tensor_uid); }
  builder_.add_dscale_tensor_uid(dscale_tensor_uid);
  builder_.add_dx_tensor_uid(dx_tensor_uid);
  if(inv_rms_tensor_uid) { builder_.add_inv_rms_tensor_uid(*inv_rms_tensor_uid); }
  builder_.add_scale_tensor_uid(scale_tensor_uid);
  builder_.add_x_tensor_uid(x_tensor_uid);
  builder_.add_dy_tensor_uid(dy_tensor_uid);
  return builder_.Finish();
}

::flatbuffers::Offset<RMSNormBackwardAttributes> CreateRMSNormBackwardAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const RMSNormBackwardAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);


inline bool operator==(const RMSNormBackwardAttributesT &lhs, const RMSNormBackwardAttributesT &rhs) {
  return
      (lhs.dy_tensor_uid == rhs.dy_tensor_uid) &&
      (lhs.x_tensor_uid == rhs.x_tensor_uid) &&
      (lhs.scale_tensor_uid == rhs.scale_tensor_uid) &&
      (lhs.inv_rms_tensor_uid == rhs.inv_rms_tensor_uid) &&
      (lhs.dx_tensor_uid == rhs.dx_tensor_uid) &&
      (lhs.dscale_tensor_uid == rhs.dscale_tensor_uid) &&
      (lhs.dbias_tensor_uid == rhs.dbias_tensor_uid);
}

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


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

inline void RMSNormBackwardAttributes::UnPackTo(RMSNormBackwardAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = dy_tensor_uid(); _o->dy_tensor_uid = _e; }
  { auto _e = x_tensor_uid(); _o->x_tensor_uid = _e; }
  { auto _e = scale_tensor_uid(); _o->scale_tensor_uid = _e; }
  { auto _e = inv_rms_tensor_uid(); _o->inv_rms_tensor_uid = _e; }
  { auto _e = dx_tensor_uid(); _o->dx_tensor_uid = _e; }
  { auto _e = dscale_tensor_uid(); _o->dscale_tensor_uid = _e; }
  { auto _e = dbias_tensor_uid(); _o->dbias_tensor_uid = _e; }
}

inline ::flatbuffers::Offset<RMSNormBackwardAttributes> RMSNormBackwardAttributes::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const RMSNormBackwardAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return CreateRMSNormBackwardAttributes(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<RMSNormBackwardAttributes> CreateRMSNormBackwardAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const RMSNormBackwardAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const RMSNormBackwardAttributesT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _dy_tensor_uid = _o->dy_tensor_uid;
  auto _x_tensor_uid = _o->x_tensor_uid;
  auto _scale_tensor_uid = _o->scale_tensor_uid;
  auto _inv_rms_tensor_uid = _o->inv_rms_tensor_uid;
  auto _dx_tensor_uid = _o->dx_tensor_uid;
  auto _dscale_tensor_uid = _o->dscale_tensor_uid;
  auto _dbias_tensor_uid = _o->dbias_tensor_uid;
  return hipdnn_flatbuffers_sdk::data_objects::CreateRMSNormBackwardAttributes(
      _fbb,
      _dy_tensor_uid,
      _x_tensor_uid,
      _scale_tensor_uid,
      _inv_rms_tensor_uid,
      _dx_tensor_uid,
      _dscale_tensor_uid,
      _dbias_tensor_uid);
}

}  // namespace data_objects
}  // namespace hipdnn_flatbuffers_sdk

#endif  // FLATBUFFERS_GENERATED_RMSNORMBACKWARDATTRIBUTES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
