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


#ifndef FLATBUFFERS_GENERATED_BLOCKSCALEQUANTIZEATTRIBUTES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
#define FLATBUFFERS_GENERATED_BLOCKSCALEQUANTIZEATTRIBUTES_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 BlockScaleQuantizeAttributes;
struct BlockScaleQuantizeAttributesBuilder;
struct BlockScaleQuantizeAttributesT;

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

struct BlockScaleQuantizeAttributesT : public ::flatbuffers::NativeTable {
  typedef BlockScaleQuantizeAttributes TableType;
  int64_t x_tensor_uid = 0;
  int64_t y_tensor_uid = 0;
  int64_t scale_tensor_uid = 0;
  int32_t block_size = 0;
  ::flatbuffers::Optional<int64_t> axis = ::flatbuffers::nullopt;
  bool transpose = false;
};

struct BlockScaleQuantizeAttributes FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef BlockScaleQuantizeAttributesT NativeTableType;
  typedef BlockScaleQuantizeAttributesBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_X_TENSOR_UID = 4,
    VT_Y_TENSOR_UID = 6,
    VT_SCALE_TENSOR_UID = 8,
    VT_BLOCK_SIZE = 10,
    VT_AXIS = 12,
    VT_TRANSPOSE = 14
  };
  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 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);
  }
  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);
  }
  int32_t block_size() const {
    return GetField<int32_t>(VT_BLOCK_SIZE, 0);
  }
  bool mutate_block_size(int32_t _block_size = 0) {
    return SetField<int32_t>(VT_BLOCK_SIZE, _block_size, 0);
  }
  ::flatbuffers::Optional<int64_t> axis() const {
    return GetOptional<int64_t, int64_t>(VT_AXIS);
  }
  bool mutate_axis(int64_t _axis) {
    return SetField<int64_t>(VT_AXIS, _axis);
  }
  bool transpose() const {
    return GetField<uint8_t>(VT_TRANSPOSE, 0) != 0;
  }
  bool mutate_transpose(bool _transpose = 0) {
    return SetField<uint8_t>(VT_TRANSPOSE, static_cast<uint8_t>(_transpose), 0);
  }
  bool Verify(::flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<int64_t>(verifier, VT_X_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_Y_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_SCALE_TENSOR_UID, 8) &&
           VerifyField<int32_t>(verifier, VT_BLOCK_SIZE, 4) &&
           VerifyField<int64_t>(verifier, VT_AXIS, 8) &&
           VerifyField<uint8_t>(verifier, VT_TRANSPOSE, 1) &&
           verifier.EndTable();
  }
  BlockScaleQuantizeAttributesT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(BlockScaleQuantizeAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<BlockScaleQuantizeAttributes> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const BlockScaleQuantizeAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct BlockScaleQuantizeAttributesBuilder {
  typedef BlockScaleQuantizeAttributes Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_x_tensor_uid(int64_t x_tensor_uid) {
    fbb_.AddElement<int64_t>(BlockScaleQuantizeAttributes::VT_X_TENSOR_UID, x_tensor_uid, 0);
  }
  void add_y_tensor_uid(int64_t y_tensor_uid) {
    fbb_.AddElement<int64_t>(BlockScaleQuantizeAttributes::VT_Y_TENSOR_UID, y_tensor_uid, 0);
  }
  void add_scale_tensor_uid(int64_t scale_tensor_uid) {
    fbb_.AddElement<int64_t>(BlockScaleQuantizeAttributes::VT_SCALE_TENSOR_UID, scale_tensor_uid, 0);
  }
  void add_block_size(int32_t block_size) {
    fbb_.AddElement<int32_t>(BlockScaleQuantizeAttributes::VT_BLOCK_SIZE, block_size, 0);
  }
  void add_axis(int64_t axis) {
    fbb_.AddElement<int64_t>(BlockScaleQuantizeAttributes::VT_AXIS, axis);
  }
  void add_transpose(bool transpose) {
    fbb_.AddElement<uint8_t>(BlockScaleQuantizeAttributes::VT_TRANSPOSE, static_cast<uint8_t>(transpose), 0);
  }
  explicit BlockScaleQuantizeAttributesBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<BlockScaleQuantizeAttributes> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<BlockScaleQuantizeAttributes>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<BlockScaleQuantizeAttributes> CreateBlockScaleQuantizeAttributes(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int64_t x_tensor_uid = 0,
    int64_t y_tensor_uid = 0,
    int64_t scale_tensor_uid = 0,
    int32_t block_size = 0,
    ::flatbuffers::Optional<int64_t> axis = ::flatbuffers::nullopt,
    bool transpose = false) {
  BlockScaleQuantizeAttributesBuilder builder_(_fbb);
  if(axis) { builder_.add_axis(*axis); }
  builder_.add_scale_tensor_uid(scale_tensor_uid);
  builder_.add_y_tensor_uid(y_tensor_uid);
  builder_.add_x_tensor_uid(x_tensor_uid);
  builder_.add_block_size(block_size);
  builder_.add_transpose(transpose);
  return builder_.Finish();
}

::flatbuffers::Offset<BlockScaleQuantizeAttributes> CreateBlockScaleQuantizeAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const BlockScaleQuantizeAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);


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

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


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

inline void BlockScaleQuantizeAttributes::UnPackTo(BlockScaleQuantizeAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = x_tensor_uid(); _o->x_tensor_uid = _e; }
  { auto _e = y_tensor_uid(); _o->y_tensor_uid = _e; }
  { auto _e = scale_tensor_uid(); _o->scale_tensor_uid = _e; }
  { auto _e = block_size(); _o->block_size = _e; }
  { auto _e = axis(); _o->axis = _e; }
  { auto _e = transpose(); _o->transpose = _e; }
}

inline ::flatbuffers::Offset<BlockScaleQuantizeAttributes> BlockScaleQuantizeAttributes::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const BlockScaleQuantizeAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return CreateBlockScaleQuantizeAttributes(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<BlockScaleQuantizeAttributes> CreateBlockScaleQuantizeAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const BlockScaleQuantizeAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const BlockScaleQuantizeAttributesT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _x_tensor_uid = _o->x_tensor_uid;
  auto _y_tensor_uid = _o->y_tensor_uid;
  auto _scale_tensor_uid = _o->scale_tensor_uid;
  auto _block_size = _o->block_size;
  auto _axis = _o->axis;
  auto _transpose = _o->transpose;
  return hipdnn_flatbuffers_sdk::data_objects::CreateBlockScaleQuantizeAttributes(
      _fbb,
      _x_tensor_uid,
      _y_tensor_uid,
      _scale_tensor_uid,
      _block_size,
      _axis,
      _transpose);
}

}  // namespace data_objects
}  // namespace hipdnn_flatbuffers_sdk

#endif  // FLATBUFFERS_GENERATED_BLOCKSCALEQUANTIZEATTRIBUTES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
