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


#ifndef FLATBUFFERS_GENERATED_CONVOLUTIONFWDATTRIBUTES_HIPDNN_SDK_DATA_OBJECTS_H_
#define FLATBUFFERS_GENERATED_CONVOLUTIONFWDATTRIBUTES_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 ConvolutionFwdAttributes;
struct ConvolutionFwdAttributesBuilder;
struct ConvolutionFwdAttributesT;

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

struct ConvolutionFwdAttributesT : public ::flatbuffers::NativeTable {
  typedef ConvolutionFwdAttributes TableType;
  int64_t x_tensor_uid = 0;
  int64_t w_tensor_uid = 0;
  int64_t y_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 ConvolutionFwdAttributes FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef ConvolutionFwdAttributesT NativeTableType;
  typedef ConvolutionFwdAttributesBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_X_TENSOR_UID = 4,
    VT_W_TENSOR_UID = 6,
    VT_Y_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 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 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<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_X_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_W_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_Y_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();
  }
  ConvolutionFwdAttributesT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(ConvolutionFwdAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<ConvolutionFwdAttributes> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const ConvolutionFwdAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct ConvolutionFwdAttributesBuilder {
  typedef ConvolutionFwdAttributes Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_x_tensor_uid(int64_t x_tensor_uid) {
    fbb_.AddElement<int64_t>(ConvolutionFwdAttributes::VT_X_TENSOR_UID, x_tensor_uid, 0);
  }
  void add_w_tensor_uid(int64_t w_tensor_uid) {
    fbb_.AddElement<int64_t>(ConvolutionFwdAttributes::VT_W_TENSOR_UID, w_tensor_uid, 0);
  }
  void add_y_tensor_uid(int64_t y_tensor_uid) {
    fbb_.AddElement<int64_t>(ConvolutionFwdAttributes::VT_Y_TENSOR_UID, y_tensor_uid, 0);
  }
  void add_pre_padding(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> pre_padding) {
    fbb_.AddOffset(ConvolutionFwdAttributes::VT_PRE_PADDING, pre_padding);
  }
  void add_post_padding(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> post_padding) {
    fbb_.AddOffset(ConvolutionFwdAttributes::VT_POST_PADDING, post_padding);
  }
  void add_stride(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> stride) {
    fbb_.AddOffset(ConvolutionFwdAttributes::VT_STRIDE, stride);
  }
  void add_dilation(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> dilation) {
    fbb_.AddOffset(ConvolutionFwdAttributes::VT_DILATION, dilation);
  }
  void add_conv_mode(hipdnn_sdk::data_objects::ConvMode conv_mode) {
    fbb_.AddElement<int8_t>(ConvolutionFwdAttributes::VT_CONV_MODE, static_cast<int8_t>(conv_mode), 0);
  }
  explicit ConvolutionFwdAttributesBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<ConvolutionFwdAttributes> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<ConvolutionFwdAttributes>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<ConvolutionFwdAttributes> CreateConvolutionFwdAttributes(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int64_t x_tensor_uid = 0,
    int64_t w_tensor_uid = 0,
    int64_t y_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) {
  ConvolutionFwdAttributesBuilder builder_(_fbb);
  builder_.add_y_tensor_uid(y_tensor_uid);
  builder_.add_w_tensor_uid(w_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<ConvolutionFwdAttributes> CreateConvolutionFwdAttributesDirect(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int64_t x_tensor_uid = 0,
    int64_t w_tensor_uid = 0,
    int64_t y_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::CreateConvolutionFwdAttributes(
      _fbb,
      x_tensor_uid,
      w_tensor_uid,
      y_tensor_uid,
      pre_padding__,
      post_padding__,
      stride__,
      dilation__,
      conv_mode);
}

::flatbuffers::Offset<ConvolutionFwdAttributes> CreateConvolutionFwdAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const ConvolutionFwdAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);


inline bool operator==(const ConvolutionFwdAttributesT &lhs, const ConvolutionFwdAttributesT &rhs) {
  return
      (lhs.x_tensor_uid == rhs.x_tensor_uid) &&
      (lhs.w_tensor_uid == rhs.w_tensor_uid) &&
      (lhs.y_tensor_uid == rhs.y_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 ConvolutionFwdAttributesT &lhs, const ConvolutionFwdAttributesT &rhs) {
    return !(lhs == rhs);
}


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

inline void ConvolutionFwdAttributes::UnPackTo(ConvolutionFwdAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = x_tensor_uid(); _o->x_tensor_uid = _e; }
  { auto _e = w_tensor_uid(); _o->w_tensor_uid = _e; }
  { auto _e = y_tensor_uid(); _o->y_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<ConvolutionFwdAttributes> ConvolutionFwdAttributes::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const ConvolutionFwdAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return CreateConvolutionFwdAttributes(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<ConvolutionFwdAttributes> CreateConvolutionFwdAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const ConvolutionFwdAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const ConvolutionFwdAttributesT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _x_tensor_uid = _o->x_tensor_uid;
  auto _w_tensor_uid = _o->w_tensor_uid;
  auto _y_tensor_uid = _o->y_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::CreateConvolutionFwdAttributes(
      _fbb,
      _x_tensor_uid,
      _w_tensor_uid,
      _y_tensor_uid,
      _pre_padding,
      _post_padding,
      _stride,
      _dilation,
      _conv_mode);
}

}  // namespace data_objects
}  // namespace hipdnn_sdk

#endif  // FLATBUFFERS_GENERATED_CONVOLUTIONFWDATTRIBUTES_HIPDNN_SDK_DATA_OBJECTS_H_
