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


#ifndef FLATBUFFERS_GENERATED_BLOCKSCALEDEQUANTIZEATTRIBUTES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
#define FLATBUFFERS_GENERATED_BLOCKSCALEDEQUANTIZEATTRIBUTES_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 BlockScaleDequantizeAttributes;
struct BlockScaleDequantizeAttributesBuilder;
struct BlockScaleDequantizeAttributesT;

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

struct BlockScaleDequantizeAttributesT : public ::flatbuffers::NativeTable {
  typedef BlockScaleDequantizeAttributes TableType;
  int64_t x_tensor_uid = 0;
  int64_t scale_tensor_uid = 0;
  int64_t y_tensor_uid = 0;
  std::vector<int32_t> block_size{};
  bool is_negative_scale = false;
};

struct BlockScaleDequantizeAttributes FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef BlockScaleDequantizeAttributesT NativeTableType;
  typedef BlockScaleDequantizeAttributesBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_X_TENSOR_UID = 4,
    VT_SCALE_TENSOR_UID = 6,
    VT_Y_TENSOR_UID = 8,
    VT_BLOCK_SIZE = 10,
    VT_IS_NEGATIVE_SCALE = 12
  };
  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);
  }
  int64_t y_tensor_uid() const {
    return GetField<int64_t>(VT_Y_TENSOR_UID, 0);
  }
  bool mutate_y_tensor_uid(int64_t _y_tensor_uid = 0) {
    return SetField<int64_t>(VT_Y_TENSOR_UID, _y_tensor_uid, 0);
  }
  const ::flatbuffers::Vector<int32_t> *block_size() const {
    return GetPointer<const ::flatbuffers::Vector<int32_t> *>(VT_BLOCK_SIZE);
  }
  ::flatbuffers::Vector<int32_t> *mutable_block_size() {
    return GetPointer<::flatbuffers::Vector<int32_t> *>(VT_BLOCK_SIZE);
  }
  bool is_negative_scale() const {
    return GetField<uint8_t>(VT_IS_NEGATIVE_SCALE, 0) != 0;
  }
  bool mutate_is_negative_scale(bool _is_negative_scale = 0) {
    return SetField<uint8_t>(VT_IS_NEGATIVE_SCALE, static_cast<uint8_t>(_is_negative_scale), 0);
  }
  bool Verify(::flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<int64_t>(verifier, VT_X_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_SCALE_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_Y_TENSOR_UID, 8) &&
           VerifyOffset(verifier, VT_BLOCK_SIZE) &&
           verifier.VerifyVector(block_size()) &&
           VerifyField<uint8_t>(verifier, VT_IS_NEGATIVE_SCALE, 1) &&
           verifier.EndTable();
  }
  BlockScaleDequantizeAttributesT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(BlockScaleDequantizeAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<BlockScaleDequantizeAttributes> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const BlockScaleDequantizeAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct BlockScaleDequantizeAttributesBuilder {
  typedef BlockScaleDequantizeAttributes Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_x_tensor_uid(int64_t x_tensor_uid) {
    fbb_.AddElement<int64_t>(BlockScaleDequantizeAttributes::VT_X_TENSOR_UID, x_tensor_uid, 0);
  }
  void add_scale_tensor_uid(int64_t scale_tensor_uid) {
    fbb_.AddElement<int64_t>(BlockScaleDequantizeAttributes::VT_SCALE_TENSOR_UID, scale_tensor_uid, 0);
  }
  void add_y_tensor_uid(int64_t y_tensor_uid) {
    fbb_.AddElement<int64_t>(BlockScaleDequantizeAttributes::VT_Y_TENSOR_UID, y_tensor_uid, 0);
  }
  void add_block_size(::flatbuffers::Offset<::flatbuffers::Vector<int32_t>> block_size) {
    fbb_.AddOffset(BlockScaleDequantizeAttributes::VT_BLOCK_SIZE, block_size);
  }
  void add_is_negative_scale(bool is_negative_scale) {
    fbb_.AddElement<uint8_t>(BlockScaleDequantizeAttributes::VT_IS_NEGATIVE_SCALE, static_cast<uint8_t>(is_negative_scale), 0);
  }
  explicit BlockScaleDequantizeAttributesBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<BlockScaleDequantizeAttributes> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<BlockScaleDequantizeAttributes>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<BlockScaleDequantizeAttributes> CreateBlockScaleDequantizeAttributes(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int64_t x_tensor_uid = 0,
    int64_t scale_tensor_uid = 0,
    int64_t y_tensor_uid = 0,
    ::flatbuffers::Offset<::flatbuffers::Vector<int32_t>> block_size = 0,
    bool is_negative_scale = false) {
  BlockScaleDequantizeAttributesBuilder builder_(_fbb);
  builder_.add_y_tensor_uid(y_tensor_uid);
  builder_.add_scale_tensor_uid(scale_tensor_uid);
  builder_.add_x_tensor_uid(x_tensor_uid);
  builder_.add_block_size(block_size);
  builder_.add_is_negative_scale(is_negative_scale);
  return builder_.Finish();
}

inline ::flatbuffers::Offset<BlockScaleDequantizeAttributes> CreateBlockScaleDequantizeAttributesDirect(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int64_t x_tensor_uid = 0,
    int64_t scale_tensor_uid = 0,
    int64_t y_tensor_uid = 0,
    const std::vector<int32_t> *block_size = nullptr,
    bool is_negative_scale = false) {
  auto block_size__ = block_size ? _fbb.CreateVector<int32_t>(*block_size) : 0;
  return hipdnn_flatbuffers_sdk::data_objects::CreateBlockScaleDequantizeAttributes(
      _fbb,
      x_tensor_uid,
      scale_tensor_uid,
      y_tensor_uid,
      block_size__,
      is_negative_scale);
}

::flatbuffers::Offset<BlockScaleDequantizeAttributes> CreateBlockScaleDequantizeAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const BlockScaleDequantizeAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);


inline bool operator==(const BlockScaleDequantizeAttributesT &lhs, const BlockScaleDequantizeAttributesT &rhs) {
  return
      (lhs.x_tensor_uid == rhs.x_tensor_uid) &&
      (lhs.scale_tensor_uid == rhs.scale_tensor_uid) &&
      (lhs.y_tensor_uid == rhs.y_tensor_uid) &&
      (lhs.block_size == rhs.block_size) &&
      (lhs.is_negative_scale == rhs.is_negative_scale);
}

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


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

inline void BlockScaleDequantizeAttributes::UnPackTo(BlockScaleDequantizeAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = x_tensor_uid(); _o->x_tensor_uid = _e; }
  { auto _e = scale_tensor_uid(); _o->scale_tensor_uid = _e; }
  { auto _e = y_tensor_uid(); _o->y_tensor_uid = _e; }
  { auto _e = block_size(); if (_e) { _o->block_size.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->block_size[_i] = _e->Get(_i); } } else { _o->block_size.resize(0); } }
  { auto _e = is_negative_scale(); _o->is_negative_scale = _e; }
}

inline ::flatbuffers::Offset<BlockScaleDequantizeAttributes> BlockScaleDequantizeAttributes::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const BlockScaleDequantizeAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return CreateBlockScaleDequantizeAttributes(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<BlockScaleDequantizeAttributes> CreateBlockScaleDequantizeAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const BlockScaleDequantizeAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const BlockScaleDequantizeAttributesT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _x_tensor_uid = _o->x_tensor_uid;
  auto _scale_tensor_uid = _o->scale_tensor_uid;
  auto _y_tensor_uid = _o->y_tensor_uid;
  auto _block_size = _o->block_size.size() ? _fbb.CreateVector(_o->block_size) : 0;
  auto _is_negative_scale = _o->is_negative_scale;
  return hipdnn_flatbuffers_sdk::data_objects::CreateBlockScaleDequantizeAttributes(
      _fbb,
      _x_tensor_uid,
      _scale_tensor_uid,
      _y_tensor_uid,
      _block_size,
      _is_negative_scale);
}

}  // namespace data_objects
}  // namespace hipdnn_flatbuffers_sdk

#endif  // FLATBUFFERS_GENERATED_BLOCKSCALEDEQUANTIZEATTRIBUTES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
