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


#ifndef FLATBUFFERS_GENERATED_CONVOLUTIONWRWATTRIBUTES_HIPDNN_SDK_DATA_OBJECTS_H_
#define FLATBUFFERS_GENERATED_CONVOLUTIONWRWATTRIBUTES_HIPDNN_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 == 12 &&
              FLATBUFFERS_VERSION_REVISION == 19,
             "Non-compatible flatbuffers version included");

#include "convolution_common_generated.h"

namespace hipdnn_sdk {
namespace data_objects {

struct ConvolutionWrwAttributes;
struct ConvolutionWrwAttributesBuilder;
struct ConvolutionWrwAttributesT;

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

struct ConvolutionWrwAttributesT : public ::flatbuffers::NativeTable {
  typedef ConvolutionWrwAttributes TableType;
  int64_t x_tensor_uid = 0;
  int64_t dy_tensor_uid = 0;
  int64_t dw_tensor_uid = 0;
  std::vector<int64_t> pre_padding{};
  std::vector<int64_t> post_padding{};
  std::vector<int64_t> stride{};
  std::vector<int64_t> dilation{};
  hipdnn_sdk::data_objects::ConvMode conv_mode = hipdnn_sdk::data_objects::ConvMode::UNSET;
};

struct ConvolutionWrwAttributes FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef ConvolutionWrwAttributesT NativeTableType;
  typedef ConvolutionWrwAttributesBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_X_TENSOR_UID = 4,
    VT_DY_TENSOR_UID = 6,
    VT_DW_TENSOR_UID = 8,
    VT_PRE_PADDING = 10,
    VT_POST_PADDING = 12,
    VT_STRIDE = 14,
    VT_DILATION = 16,
    VT_CONV_MODE = 18
  };
  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 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 dw_tensor_uid() const {
    return GetField<int64_t>(VT_DW_TENSOR_UID, 0);
  }
  bool mutate_dw_tensor_uid(int64_t _dw_tensor_uid = 0) {
    return SetField<int64_t>(VT_DW_TENSOR_UID, _dw_tensor_uid, 0);
  }
  const ::flatbuffers::Vector<int64_t> *pre_padding() const {
    return GetPointer<const ::flatbuffers::Vector<int64_t> *>(VT_PRE_PADDING);
  }
  ::flatbuffers::Vector<int64_t> *mutable_pre_padding() {
    return GetPointer<::flatbuffers::Vector<int64_t> *>(VT_PRE_PADDING);
  }
  const ::flatbuffers::Vector<int64_t> *post_padding() const {
    return GetPointer<const ::flatbuffers::Vector<int64_t> *>(VT_POST_PADDING);
  }
  ::flatbuffers::Vector<int64_t> *mutable_post_padding() {
    return GetPointer<::flatbuffers::Vector<int64_t> *>(VT_POST_PADDING);
  }
  const ::flatbuffers::Vector<int64_t> *stride() const {
    return GetPointer<const ::flatbuffers::Vector<int64_t> *>(VT_STRIDE);
  }
  ::flatbuffers::Vector<int64_t> *mutable_stride() {
    return GetPointer<::flatbuffers::Vector<int64_t> *>(VT_STRIDE);
  }
  const ::flatbuffers::Vector<int64_t> *dilation() const {
    return GetPointer<const ::flatbuffers::Vector<int64_t> *>(VT_DILATION);
  }
  ::flatbuffers::Vector<int64_t> *mutable_dilation() {
    return GetPointer<::flatbuffers::Vector<int64_t> *>(VT_DILATION);
  }
  hipdnn_sdk::data_objects::ConvMode conv_mode() const {
    return static_cast<hipdnn_sdk::data_objects::ConvMode>(GetField<int8_t>(VT_CONV_MODE, 0));
  }
  bool mutate_conv_mode(hipdnn_sdk::data_objects::ConvMode _conv_mode = static_cast<hipdnn_sdk::data_objects::ConvMode>(0)) {
    return SetField<int8_t>(VT_CONV_MODE, static_cast<int8_t>(_conv_mode), 0);
  }
  template <bool B = false>
  bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<int64_t>(verifier, VT_X_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DY_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DW_TENSOR_UID, 8) &&
           VerifyOffset(verifier, VT_PRE_PADDING) &&
           verifier.VerifyVector(pre_padding()) &&
           VerifyOffset(verifier, VT_POST_PADDING) &&
           verifier.VerifyVector(post_padding()) &&
           VerifyOffset(verifier, VT_STRIDE) &&
           verifier.VerifyVector(stride()) &&
           VerifyOffset(verifier, VT_DILATION) &&
           verifier.VerifyVector(dilation()) &&
           VerifyField<int8_t>(verifier, VT_CONV_MODE, 1) &&
           verifier.EndTable();
  }
  ConvolutionWrwAttributesT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(ConvolutionWrwAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<ConvolutionWrwAttributes> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const ConvolutionWrwAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct ConvolutionWrwAttributesBuilder {
  typedef ConvolutionWrwAttributes Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_x_tensor_uid(int64_t x_tensor_uid) {
    fbb_.AddElement<int64_t>(ConvolutionWrwAttributes::VT_X_TENSOR_UID, x_tensor_uid, 0);
  }
  void add_dy_tensor_uid(int64_t dy_tensor_uid) {
    fbb_.AddElement<int64_t>(ConvolutionWrwAttributes::VT_DY_TENSOR_UID, dy_tensor_uid, 0);
  }
  void add_dw_tensor_uid(int64_t dw_tensor_uid) {
    fbb_.AddElement<int64_t>(ConvolutionWrwAttributes::VT_DW_TENSOR_UID, dw_tensor_uid, 0);
  }
  void add_pre_padding(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> pre_padding) {
    fbb_.AddOffset(ConvolutionWrwAttributes::VT_PRE_PADDING, pre_padding);
  }
  void add_post_padding(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> post_padding) {
    fbb_.AddOffset(ConvolutionWrwAttributes::VT_POST_PADDING, post_padding);
  }
  void add_stride(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> stride) {
    fbb_.AddOffset(ConvolutionWrwAttributes::VT_STRIDE, stride);
  }
  void add_dilation(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> dilation) {
    fbb_.AddOffset(ConvolutionWrwAttributes::VT_DILATION, dilation);
  }
  void add_conv_mode(hipdnn_sdk::data_objects::ConvMode conv_mode) {
    fbb_.AddElement<int8_t>(ConvolutionWrwAttributes::VT_CONV_MODE, static_cast<int8_t>(conv_mode), 0);
  }
  explicit ConvolutionWrwAttributesBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<ConvolutionWrwAttributes> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<ConvolutionWrwAttributes>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<ConvolutionWrwAttributes> CreateConvolutionWrwAttributes(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int64_t x_tensor_uid = 0,
    int64_t dy_tensor_uid = 0,
    int64_t dw_tensor_uid = 0,
    ::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> pre_padding = 0,
    ::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> post_padding = 0,
    ::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> stride = 0,
    ::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> dilation = 0,
    hipdnn_sdk::data_objects::ConvMode conv_mode = hipdnn_sdk::data_objects::ConvMode::UNSET) {
  ConvolutionWrwAttributesBuilder builder_(_fbb);
  builder_.add_dw_tensor_uid(dw_tensor_uid);
  builder_.add_dy_tensor_uid(dy_tensor_uid);
  builder_.add_x_tensor_uid(x_tensor_uid);
  builder_.add_dilation(dilation);
  builder_.add_stride(stride);
  builder_.add_post_padding(post_padding);
  builder_.add_pre_padding(pre_padding);
  builder_.add_conv_mode(conv_mode);
  return builder_.Finish();
}

inline ::flatbuffers::Offset<ConvolutionWrwAttributes> CreateConvolutionWrwAttributesDirect(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int64_t x_tensor_uid = 0,
    int64_t dy_tensor_uid = 0,
    int64_t dw_tensor_uid = 0,
    const std::vector<int64_t> *pre_padding = nullptr,
    const std::vector<int64_t> *post_padding = nullptr,
    const std::vector<int64_t> *stride = nullptr,
    const std::vector<int64_t> *dilation = nullptr,
    hipdnn_sdk::data_objects::ConvMode conv_mode = hipdnn_sdk::data_objects::ConvMode::UNSET) {
  auto pre_padding__ = pre_padding ? _fbb.CreateVector<int64_t>(*pre_padding) : 0;
  auto post_padding__ = post_padding ? _fbb.CreateVector<int64_t>(*post_padding) : 0;
  auto stride__ = stride ? _fbb.CreateVector<int64_t>(*stride) : 0;
  auto dilation__ = dilation ? _fbb.CreateVector<int64_t>(*dilation) : 0;
  return hipdnn_sdk::data_objects::CreateConvolutionWrwAttributes(
      _fbb,
      x_tensor_uid,
      dy_tensor_uid,
      dw_tensor_uid,
      pre_padding__,
      post_padding__,
      stride__,
      dilation__,
      conv_mode);
}

::flatbuffers::Offset<ConvolutionWrwAttributes> CreateConvolutionWrwAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const ConvolutionWrwAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);


inline bool operator==(const ConvolutionWrwAttributesT &lhs, const ConvolutionWrwAttributesT &rhs) {
  return
      (lhs.x_tensor_uid == rhs.x_tensor_uid) &&
      (lhs.dy_tensor_uid == rhs.dy_tensor_uid) &&
      (lhs.dw_tensor_uid == rhs.dw_tensor_uid) &&
      (lhs.pre_padding == rhs.pre_padding) &&
      (lhs.post_padding == rhs.post_padding) &&
      (lhs.stride == rhs.stride) &&
      (lhs.dilation == rhs.dilation) &&
      (lhs.conv_mode == rhs.conv_mode);
}

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


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

inline void ConvolutionWrwAttributes::UnPackTo(ConvolutionWrwAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = x_tensor_uid(); _o->x_tensor_uid = _e; }
  { auto _e = dy_tensor_uid(); _o->dy_tensor_uid = _e; }
  { auto _e = dw_tensor_uid(); _o->dw_tensor_uid = _e; }
  { auto _e = pre_padding(); if (_e) { _o->pre_padding.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pre_padding[_i] = _e->Get(_i); } } else { _o->pre_padding.resize(0); } }
  { auto _e = post_padding(); if (_e) { _o->post_padding.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->post_padding[_i] = _e->Get(_i); } } else { _o->post_padding.resize(0); } }
  { auto _e = stride(); if (_e) { _o->stride.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->stride[_i] = _e->Get(_i); } } else { _o->stride.resize(0); } }
  { auto _e = dilation(); if (_e) { _o->dilation.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dilation[_i] = _e->Get(_i); } } else { _o->dilation.resize(0); } }
  { auto _e = conv_mode(); _o->conv_mode = _e; }
}

inline ::flatbuffers::Offset<ConvolutionWrwAttributes> CreateConvolutionWrwAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const ConvolutionWrwAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return ConvolutionWrwAttributes::Pack(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<ConvolutionWrwAttributes> ConvolutionWrwAttributes::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const ConvolutionWrwAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const ConvolutionWrwAttributesT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _x_tensor_uid = _o->x_tensor_uid;
  auto _dy_tensor_uid = _o->dy_tensor_uid;
  auto _dw_tensor_uid = _o->dw_tensor_uid;
  auto _pre_padding = _o->pre_padding.size() ? _fbb.CreateVector(_o->pre_padding) : 0;
  auto _post_padding = _o->post_padding.size() ? _fbb.CreateVector(_o->post_padding) : 0;
  auto _stride = _o->stride.size() ? _fbb.CreateVector(_o->stride) : 0;
  auto _dilation = _o->dilation.size() ? _fbb.CreateVector(_o->dilation) : 0;
  auto _conv_mode = _o->conv_mode;
  return hipdnn_sdk::data_objects::CreateConvolutionWrwAttributes(
      _fbb,
      _x_tensor_uid,
      _dy_tensor_uid,
      _dw_tensor_uid,
      _pre_padding,
      _post_padding,
      _stride,
      _dilation,
      _conv_mode);
}

}  // namespace data_objects
}  // namespace hipdnn_sdk

#endif  // FLATBUFFERS_GENERATED_CONVOLUTIONWRWATTRIBUTES_HIPDNN_SDK_DATA_OBJECTS_H_
