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


#ifndef FLATBUFFERS_GENERATED_CONVOLUTIONBWDATTRIBUTES_HIPDNN_SDK_DATA_OBJECTS_H_
#define FLATBUFFERS_GENERATED_CONVOLUTIONBWDATTRIBUTES_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 == 9 &&
              FLATBUFFERS_VERSION_REVISION == 23,
             "Non-compatible flatbuffers version included");

#include "convolution_common_generated.h"

namespace hipdnn_sdk {
namespace data_objects {

struct ConvolutionBwdAttributes;
struct ConvolutionBwdAttributesBuilder;
struct ConvolutionBwdAttributesT;

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

struct ConvolutionBwdAttributesT : public ::flatbuffers::NativeTable {
  typedef ConvolutionBwdAttributes TableType;
  int64_t dy_tensor_uid = 0;
  int64_t w_tensor_uid = 0;
  int64_t dx_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 ConvolutionBwdAttributes FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef ConvolutionBwdAttributesT NativeTableType;
  typedef ConvolutionBwdAttributesBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_DY_TENSOR_UID = 4,
    VT_W_TENSOR_UID = 6,
    VT_DX_TENSOR_UID = 8,
    VT_PRE_PADDING = 10,
    VT_POST_PADDING = 12,
    VT_STRIDE = 14,
    VT_DILATION = 16,
    VT_CONV_MODE = 18
  };
  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 w_tensor_uid() const {
    return GetField<int64_t>(VT_W_TENSOR_UID, 0);
  }
  bool mutate_w_tensor_uid(int64_t _w_tensor_uid = 0) {
    return SetField<int64_t>(VT_W_TENSOR_UID, _w_tensor_uid, 0);
  }
  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);
  }
  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);
  }
  bool Verify(::flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<int64_t>(verifier, VT_DY_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_W_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DX_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();
  }
  ConvolutionBwdAttributesT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(ConvolutionBwdAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<ConvolutionBwdAttributes> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const ConvolutionBwdAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct ConvolutionBwdAttributesBuilder {
  typedef ConvolutionBwdAttributes Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_dy_tensor_uid(int64_t dy_tensor_uid) {
    fbb_.AddElement<int64_t>(ConvolutionBwdAttributes::VT_DY_TENSOR_UID, dy_tensor_uid, 0);
  }
  void add_w_tensor_uid(int64_t w_tensor_uid) {
    fbb_.AddElement<int64_t>(ConvolutionBwdAttributes::VT_W_TENSOR_UID, w_tensor_uid, 0);
  }
  void add_dx_tensor_uid(int64_t dx_tensor_uid) {
    fbb_.AddElement<int64_t>(ConvolutionBwdAttributes::VT_DX_TENSOR_UID, dx_tensor_uid, 0);
  }
  void add_pre_padding(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> pre_padding) {
    fbb_.AddOffset(ConvolutionBwdAttributes::VT_PRE_PADDING, pre_padding);
  }
  void add_post_padding(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> post_padding) {
    fbb_.AddOffset(ConvolutionBwdAttributes::VT_POST_PADDING, post_padding);
  }
  void add_stride(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> stride) {
    fbb_.AddOffset(ConvolutionBwdAttributes::VT_STRIDE, stride);
  }
  void add_dilation(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> dilation) {
    fbb_.AddOffset(ConvolutionBwdAttributes::VT_DILATION, dilation);
  }
  void add_conv_mode(hipdnn_sdk::data_objects::ConvMode conv_mode) {
    fbb_.AddElement<int8_t>(ConvolutionBwdAttributes::VT_CONV_MODE, static_cast<int8_t>(conv_mode), 0);
  }
  explicit ConvolutionBwdAttributesBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<ConvolutionBwdAttributes> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<ConvolutionBwdAttributes>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<ConvolutionBwdAttributes> CreateConvolutionBwdAttributes(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int64_t dy_tensor_uid = 0,
    int64_t w_tensor_uid = 0,
    int64_t dx_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) {
  ConvolutionBwdAttributesBuilder builder_(_fbb);
  builder_.add_dx_tensor_uid(dx_tensor_uid);
  builder_.add_w_tensor_uid(w_tensor_uid);
  builder_.add_dy_tensor_uid(dy_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<ConvolutionBwdAttributes> CreateConvolutionBwdAttributesDirect(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int64_t dy_tensor_uid = 0,
    int64_t w_tensor_uid = 0,
    int64_t dx_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::CreateConvolutionBwdAttributes(
      _fbb,
      dy_tensor_uid,
      w_tensor_uid,
      dx_tensor_uid,
      pre_padding__,
      post_padding__,
      stride__,
      dilation__,
      conv_mode);
}

::flatbuffers::Offset<ConvolutionBwdAttributes> CreateConvolutionBwdAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const ConvolutionBwdAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);


inline bool operator==(const ConvolutionBwdAttributesT &lhs, const ConvolutionBwdAttributesT &rhs) {
  return
      (lhs.dy_tensor_uid == rhs.dy_tensor_uid) &&
      (lhs.w_tensor_uid == rhs.w_tensor_uid) &&
      (lhs.dx_tensor_uid == rhs.dx_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 ConvolutionBwdAttributesT &lhs, const ConvolutionBwdAttributesT &rhs) {
    return !(lhs == rhs);
}


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

inline void ConvolutionBwdAttributes::UnPackTo(ConvolutionBwdAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = dy_tensor_uid(); _o->dy_tensor_uid = _e; }
  { auto _e = w_tensor_uid(); _o->w_tensor_uid = _e; }
  { auto _e = dx_tensor_uid(); _o->dx_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<ConvolutionBwdAttributes> ConvolutionBwdAttributes::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const ConvolutionBwdAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return CreateConvolutionBwdAttributes(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<ConvolutionBwdAttributes> CreateConvolutionBwdAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const ConvolutionBwdAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const ConvolutionBwdAttributesT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _dy_tensor_uid = _o->dy_tensor_uid;
  auto _w_tensor_uid = _o->w_tensor_uid;
  auto _dx_tensor_uid = _o->dx_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::CreateConvolutionBwdAttributes(
      _fbb,
      _dy_tensor_uid,
      _w_tensor_uid,
      _dx_tensor_uid,
      _pre_padding,
      _post_padding,
      _stride,
      _dilation,
      _conv_mode);
}

}  // namespace data_objects
}  // namespace hipdnn_sdk

#endif  // FLATBUFFERS_GENERATED_CONVOLUTIONBWDATTRIBUTES_HIPDNN_SDK_DATA_OBJECTS_H_
