提交 333ff13f 编写于 作者: R Ruilong Liu 提交者: GitHub

Merge pull request #168 from codeWorm2015/develop

fix #167 change test model file path
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
# Compiled Static libraries # Compiled Static libraries
*.lai *.lai
*.la *.la
*.a
*.lib *.lib
# Executables # Executables
...@@ -52,3 +51,6 @@ paddle-mobile.cbp ...@@ -52,3 +51,6 @@ paddle-mobile.cbp
.idea .idea
cmake-build-debug/
exclude: 'third-party'
repos: repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks.git - repo: https://github.com/Lucas-C/pre-commit-hooks.git
sha: v1.0.1 sha: v1.0.1
......
...@@ -17,15 +17,14 @@ SOFTWARE. ...@@ -17,15 +17,14 @@ SOFTWARE.
==============================================================================*/ ==============================================================================*/
#pragma once; #pragma once;
#include "framework/attribute.h"
#include <map> #include <map>
#include <string> #include <string>
#include "framework/attribute.h"
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
template <typename Dtype> template <typename Dtype> class OperatorBase;
class OperatorBase;
class OpDesc; class OpDesc;
class BlockDesc; class BlockDesc;
class InferShapeContext; class InferShapeContext;
...@@ -34,20 +33,20 @@ class InferShapeContext; ...@@ -34,20 +33,20 @@ class InferShapeContext;
using VariableNameMap = std::map<std::string, std::vector<std::string>>; using VariableNameMap = std::map<std::string, std::vector<std::string>>;
template <typename Dtype> template <typename Dtype>
using OpCreator = std::function<framework::OperatorBase<Dtype>*( using OpCreator = std::function<framework::OperatorBase<Dtype> *(
const std::string& /*type*/, const VariableNameMap& /*inputs*/, const std::string & /*type*/, const VariableNameMap & /*inputs*/,
const VariableNameMap& /*outputs*/, const VariableNameMap & /*outputs*/,
const framework::AttributeMap& /*attrs*/)>; const framework::AttributeMap & /*attrs*/)>;
using GradOpMakerFN = using GradOpMakerFN =
std::function<std::vector<std::unique_ptr<framework::OpDesc>>( std::function<std::vector<std::unique_ptr<framework::OpDesc>>(
const framework::OpDesc&, const framework::OpDesc &,
const std::unordered_set<std::string>& /*no_grad_set*/, const std::unordered_set<std::string> & /*no_grad_set*/,
std::unordered_map<std::string, std::string>* /*grad_to_var*/, std::unordered_map<std::string, std::string> * /*grad_to_var*/,
const std::vector<framework::BlockDesc*>& grad_block)>; const std::vector<framework::BlockDesc *> &grad_block)>;
using InferVarTypeFN = std::function<void(const framework::OpDesc& /*op_desc*/, using InferVarTypeFN = std::function<void(const framework::OpDesc & /*op_desc*/,
framework::BlockDesc* /*block*/)>; framework::BlockDesc * /*block*/)>;
using InferShapeFN = std::function<void(framework::InferShapeContext*)>; using InferShapeFN = std::function<void(framework::InferShapeContext *)>;
}; };
...@@ -24,8 +24,7 @@ enum class Precision : int { FP32 = 0 }; ...@@ -24,8 +24,7 @@ enum class Precision : int { FP32 = 0 };
//! device type //! device type
enum DeviceTypeEnum { kINVALID = -1, kCPU = 0, kFPGA = 1, kGPU_MALI = 2 }; enum DeviceTypeEnum { kINVALID = -1, kCPU = 0, kFPGA = 1, kGPU_MALI = 2 };
template <DeviceTypeEnum T> template <DeviceTypeEnum T> struct DeviceType {};
struct DeviceType {};
typedef DeviceType<kCPU> CPU; typedef DeviceType<kCPU> CPU;
typedef DeviceType<kFPGA> FPGA; typedef DeviceType<kFPGA> FPGA;
......
...@@ -21,13 +21,9 @@ SOFTWARE. ...@@ -21,13 +21,9 @@ SOFTWARE.
#pragma once #pragma once
namespace paddle_mobile { namespace paddle_mobile {
template <int ID, typename Type> template <int ID, typename Type> struct IDToType { typedef Type type_t; };
struct IDToType {
typedef Type type_t;
};
template <typename F, typename... Ts> template <typename F, typename... Ts> struct VariantHelper {
struct VariantHelper {
static const size_t size = sizeof(F) > VariantHelper<Ts...>::size static const size_t size = sizeof(F) > VariantHelper<Ts...>::size
? sizeof(F) ? sizeof(F)
: VariantHelper<Ts...>::size; : VariantHelper<Ts...>::size;
...@@ -41,8 +37,7 @@ struct VariantHelper { ...@@ -41,8 +37,7 @@ struct VariantHelper {
} }
}; };
template <typename F> template <typename F> struct VariantHelper<F> {
struct VariantHelper<F> {
static const size_t size = sizeof(F); static const size_t size = sizeof(F);
inline static void Destroy(size_t id, void *data) { inline static void Destroy(size_t id, void *data) {
if (id == typeid(F).hash_code()) { if (id == typeid(F).hash_code()) {
...@@ -53,9 +48,8 @@ struct VariantHelper<F> { ...@@ -53,9 +48,8 @@ struct VariantHelper<F> {
} }
}; };
template <size_t size> template <size_t size> class RawData {
class RawData { public:
public:
char data[size]; char data[size];
RawData() {} RawData() {}
RawData(const RawData &raw_data) { strcpy(data, raw_data.data); } RawData(const RawData &raw_data) { strcpy(data, raw_data.data); }
...@@ -64,8 +58,7 @@ class RawData { ...@@ -64,8 +58,7 @@ class RawData {
// } // }
}; };
template <typename... Ts> template <typename... Ts> struct Variant {
struct Variant {
Variant(const Variant &variant) { Variant(const Variant &variant) {
// std::cout << " 赋值构造函数 " << std::endl; // std::cout << " 赋值构造函数 " << std::endl;
type_id = variant.type_id; type_id = variant.type_id;
...@@ -77,15 +70,13 @@ struct Variant { ...@@ -77,15 +70,13 @@ struct Variant {
// helper::Destroy(type_id, &data); // helper::Destroy(type_id, &data);
} }
template <typename T, typename... Args> template <typename T, typename... Args> void Set(Args &&... args) {
void Set(Args &&... args) {
helper::Destroy(type_id, &data); helper::Destroy(type_id, &data);
new (&data) T(std::forward<Args>(args)...); new (&data) T(std::forward<Args>(args)...);
type_id = typeid(T).hash_code(); type_id = typeid(T).hash_code();
} }
template <typename T> template <typename T> T &Get() const {
T &Get() const {
if (type_id == typeid(T).hash_code()) { if (type_id == typeid(T).hash_code()) {
return *const_cast<T *>(reinterpret_cast<const T *>(&data)); return *const_cast<T *>(reinterpret_cast<const T *>(&data));
} else { } else {
...@@ -96,16 +87,13 @@ struct Variant { ...@@ -96,16 +87,13 @@ struct Variant {
size_t TypeId() const { return type_id; } size_t TypeId() const { return type_id; }
private: private:
static inline size_t invalid_type() { return typeid(void).hash_code(); } static inline size_t invalid_type() { return typeid(void).hash_code(); }
typedef VariantHelper<Ts...> helper; typedef VariantHelper<Ts...> helper;
size_t type_id; size_t type_id;
RawData<helper::size> data; RawData<helper::size> data;
}; };
template <typename T> template <typename T> struct Vistor { typedef T type_t; };
struct Vistor {
typedef T type_t;
};
} // namespace paddle_mobile } // namespace paddle_mobile
...@@ -27,8 +27,8 @@ namespace framework { ...@@ -27,8 +27,8 @@ namespace framework {
class BlockDesc; class BlockDesc;
class Attribute { class Attribute {
public: public:
static Attribute GetAttrValue(const proto::OpDesc::Attr& attr_desc) { static Attribute GetAttrValue(const proto::OpDesc::Attr &attr_desc) {
// std::cout << "begin get attr value" << std::endl; // std::cout << "begin get attr value" << std::endl;
Attribute attr; Attribute attr;
switch (attr_desc.type()) { switch (attr_desc.type()) {
...@@ -93,20 +93,16 @@ class Attribute { ...@@ -93,20 +93,16 @@ class Attribute {
} }
Attribute() {} Attribute() {}
template <typename T, typename... Args> template <typename T, typename... Args> Attribute &Set(Args &&... args) {
Attribute& Set(Args&&... args) {
variant_.Set<T>(args...); variant_.Set<T>(args...);
return *this; return *this;
} }
template <typename T> template <typename T> T &Get() const { return variant_.Get<T>(); }
T& Get() const {
return variant_.Get<T>();
}
private: private:
Variant<int, float, std::string, std::vector<int>, std::vector<float>, Variant<int, float, std::string, std::vector<int>, std::vector<float>,
std::vector<std::string>, bool, std::vector<bool>, BlockDesc*, std::vector<std::string>, bool, std::vector<bool>, BlockDesc *,
int64_t> int64_t>
variant_; variant_;
}; };
...@@ -114,19 +110,18 @@ class Attribute { ...@@ -114,19 +110,18 @@ class Attribute {
using AttributeMap = std::unordered_map<std::string, Attribute>; using AttributeMap = std::unordered_map<std::string, Attribute>;
class AttrReader { class AttrReader {
public: public:
explicit AttrReader(const AttributeMap& attrs) : attrs_(attrs) {} explicit AttrReader(const AttributeMap &attrs) : attrs_(attrs) {}
template <typename T> template <typename T> inline T Get(const std::string &name) const {
inline T Get(const std::string& name) const {
// PADDLE_ENFORCE(attrs_.count(name) != 0, "%s should be in // PADDLE_ENFORCE(attrs_.count(name) != 0, "%s should be in
// AttributeMap", // AttributeMap",
// name); // name);
return ((Attribute)attrs_.at(name)).Get<T>(); return ((Attribute)attrs_.at(name)).Get<T>();
} }
private: private:
const AttributeMap& attrs_; const AttributeMap &attrs_;
}; };
} // namespace framework } // namespace framework
......
...@@ -27,7 +27,7 @@ namespace paddle_mobile { ...@@ -27,7 +27,7 @@ namespace paddle_mobile {
namespace framework { namespace framework {
class BlockDesc : PaddleMobileObject { class BlockDesc : PaddleMobileObject {
public: public:
BlockDesc(const proto::BlockDesc &desc); BlockDesc(const proto::BlockDesc &desc);
const int &ID() const { return desc_.idx(); } const int &ID() const { return desc_.idx(); }
...@@ -45,7 +45,7 @@ class BlockDesc : PaddleMobileObject { ...@@ -45,7 +45,7 @@ class BlockDesc : PaddleMobileObject {
std::vector<std::shared_ptr<VarDesc>> Vars() const; std::vector<std::shared_ptr<VarDesc>> Vars() const;
std::vector<std::shared_ptr<OpDesc>> Ops() const; std::vector<std::shared_ptr<OpDesc>> Ops() const;
private: private:
proto::BlockDesc desc_; proto::BlockDesc desc_;
std::vector<std::shared_ptr<OpDesc>> ops_; std::vector<std::shared_ptr<OpDesc>> ops_;
std::unordered_map<std::string, std::shared_ptr<VarDesc>> vars_; std::unordered_map<std::string, std::shared_ptr<VarDesc>> vars_;
...@@ -56,8 +56,7 @@ class BlockDesc : PaddleMobileObject { ...@@ -56,8 +56,7 @@ class BlockDesc : PaddleMobileObject {
namespace std { namespace std {
template <> template <> struct hash<paddle_mobile::framework::BlockDesc> {
struct hash<paddle_mobile::framework::BlockDesc> {
typedef paddle_mobile::framework::BlockDesc argument_type; typedef paddle_mobile::framework::BlockDesc argument_type;
typedef std::size_t result_type; typedef std::size_t result_type;
result_type operator()(argument_type const &s) const noexcept { result_type operator()(argument_type const &s) const noexcept {
......
...@@ -27,7 +27,7 @@ enum class DataLayout { ...@@ -27,7 +27,7 @@ enum class DataLayout {
kAnyLayout = 2, kAnyLayout = 2,
}; };
inline DataLayout StringToDataLayout(const std::string& str) { inline DataLayout StringToDataLayout(const std::string &str) {
std::string s(str); std::string s(str);
for (size_t i = 0; i < s.size(); ++i) { for (size_t i = 0; i < s.size(); ++i) {
s[i] = toupper(s[i]); s[i] = toupper(s[i]);
...@@ -44,7 +44,7 @@ inline DataLayout StringToDataLayout(const std::string& str) { ...@@ -44,7 +44,7 @@ inline DataLayout StringToDataLayout(const std::string& str) {
} }
} }
inline std::string DataLayoutToString(const DataLayout& data_layout) { inline std::string DataLayoutToString(const DataLayout &data_layout) {
switch (data_layout) { switch (data_layout) {
case DataLayout::kNHWC: case DataLayout::kNHWC:
return "NHWC"; return "NHWC";
...@@ -58,7 +58,7 @@ inline std::string DataLayoutToString(const DataLayout& data_layout) { ...@@ -58,7 +58,7 @@ inline std::string DataLayoutToString(const DataLayout& data_layout) {
} }
} }
inline std::ostream& operator<<(std::ostream& out, const DataLayout& l) { inline std::ostream &operator<<(std::ostream &out, const DataLayout &l) {
out << DataLayoutToString(l); out << DataLayoutToString(l);
return out; return out;
} }
......
...@@ -23,14 +23,14 @@ SOFTWARE. ...@@ -23,14 +23,14 @@ SOFTWARE.
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
static void PassTensorData(Tensor* from, Tensor* to) { static void PassTensorData(Tensor *from, Tensor *to) {
to->ShareDataWith(*from); to->ShareDataWith(*from);
*from = Tensor(); *from = Tensor();
} }
void DataTransform(const OpKernelType& expected_kernel_type, void DataTransform(const OpKernelType &expected_kernel_type,
const OpKernelType& kernel_type_for_var, const OpKernelType &kernel_type_for_var,
const Tensor& input_tensor, Tensor* output_tensor) { const Tensor &input_tensor, Tensor *output_tensor) {
bool transformed = false; bool transformed = false;
Tensor in; Tensor in;
in.ShareDataWith(input_tensor); in.ShareDataWith(input_tensor);
...@@ -64,8 +64,8 @@ void DataTransform(const OpKernelType& expected_kernel_type, ...@@ -64,8 +64,8 @@ void DataTransform(const OpKernelType& expected_kernel_type,
output_tensor->ShareDataWith(in); output_tensor->ShareDataWith(in);
} }
void CopyVariableWithTensor(const Variable& in_var, const Tensor& tensor, void CopyVariableWithTensor(const Variable &in_var, const Tensor &tensor,
Variable& out_var) { Variable &out_var) {
// if (in_var.IsType<LoDTensor>()) { // if (in_var.IsType<LoDTensor>()) {
// auto& in_lod_tensor = in_var.Get<LoDTensor>(); // auto& in_lod_tensor = in_var.Get<LoDTensor>();
// auto* tran_lod_tensor = out_var.GetMutable<LoDTensor>(); // auto* tran_lod_tensor = out_var.GetMutable<LoDTensor>();
......
...@@ -30,12 +30,12 @@ SOFTWARE. ...@@ -30,12 +30,12 @@ SOFTWARE.
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
void DataTransform(const OpKernelType& expected_kernel_type, void DataTransform(const OpKernelType &expected_kernel_type,
const OpKernelType& kernel_type_for_var, const OpKernelType &kernel_type_for_var,
const Tensor& input_tensor, Tensor* out); const Tensor &input_tensor, Tensor *out);
void CopyVariableWithTensor(const Variable& in_var, const Tensor& tensor, void CopyVariableWithTensor(const Variable &in_var, const Tensor &tensor,
Variable& out_var); Variable &out_var);
} // namespace framework } // namespace framework
} // namespace paddle_mobile } // namespace paddle_mobile
...@@ -19,17 +19,13 @@ namespace framework { ...@@ -19,17 +19,13 @@ namespace framework {
/// @cond HIDDEN /// @cond HIDDEN
template <int i> template <int i> Dim<i> make_dim(const int64_t *d) {
Dim<i> make_dim(const int64_t* d) {
return Dim<i>(*d, make_dim<i - 1>(d + 1)); return Dim<i>(*d, make_dim<i - 1>(d + 1));
} }
template <> template <> Dim<0> make_dim<0>(const int64_t *d) { return Dim<0>(*d); }
Dim<0> make_dim<0>(const int64_t* d) {
return Dim<0>(*d);
}
void make_ddim(DDim& ddim, const int64_t* dims, int n) { void make_ddim(DDim &ddim, const int64_t *dims, int n) {
switch (n) { switch (n) {
case 0: case 0:
ddim = make_dim<0>(dims); ddim = make_dim<0>(dims);
...@@ -76,13 +72,13 @@ DDim make_ddim(std::initializer_list<int64_t> dims) { ...@@ -76,13 +72,13 @@ DDim make_ddim(std::initializer_list<int64_t> dims) {
return result; return result;
} }
DDim make_ddim(const std::vector<int64_t>& dims) { DDim make_ddim(const std::vector<int64_t> &dims) {
DDim result(make_dim(0)); DDim result(make_dim(0));
make_ddim(result, &dims[0], dims.size()); make_ddim(result, &dims[0], dims.size());
return result; return result;
} }
DDim make_ddim(const std::vector<int>& dims) { DDim make_ddim(const std::vector<int> &dims) {
std::vector<int64_t> res(dims.size()); std::vector<int64_t> res(dims.size());
std::transform(dims.begin(), dims.end(), res.begin(), std::transform(dims.begin(), dims.end(), res.begin(),
[](int d) { return static_cast<int64_t>(d); }); [](int d) { return static_cast<int64_t>(d); });
...@@ -91,35 +87,31 @@ DDim make_ddim(const std::vector<int>& dims) { ...@@ -91,35 +87,31 @@ DDim make_ddim(const std::vector<int>& dims) {
/// @cond HIDDEN /// @cond HIDDEN
// XXX For some reason, putting this in an anonymous namespace causes errors // XXX For some reason, putting this in an anonymous namespace causes errors
struct DynamicMutableIndexer : Vistor<int64_t&> { struct DynamicMutableIndexer : Vistor<int64_t &> {
public: public:
explicit DynamicMutableIndexer(int idx) : idx_(idx) {} explicit DynamicMutableIndexer(int idx) : idx_(idx) {}
template <int D> template <int D> int64_t &operator()(Dim<D> &dim) const { return dim[idx_]; }
int64_t& operator()(Dim<D>& dim) const {
return dim[idx_];
}
private: private:
int idx_; int idx_;
}; };
struct DynamicConstIndexer : public Vistor<int64_t> { struct DynamicConstIndexer : public Vistor<int64_t> {
public: public:
explicit DynamicConstIndexer(int idx) : idx_(idx) {} explicit DynamicConstIndexer(int idx) : idx_(idx) {}
template <int D> template <int D> int64_t operator()(const Dim<D> &dim) const {
int64_t operator()(const Dim<D>& dim) const {
return dim[idx_]; return dim[idx_];
} }
private: private:
int idx_; int idx_;
}; };
/// @endcond /// @endcond
int64_t& DDim::operator[](int idx) { int64_t &DDim::operator[](int idx) {
return DDim::ApplyVistor(DynamicMutableIndexer(idx), *this); return DDim::ApplyVistor(DynamicMutableIndexer(idx), *this);
} }
...@@ -178,27 +170,26 @@ DDim DDim::operator*(DDim d) const { ...@@ -178,27 +170,26 @@ DDim DDim::operator*(DDim d) const {
return make_ddim(v3); return make_ddim(v3);
} }
int64_t get(const DDim& ddim, int idx) { return ddim[idx]; } int64_t get(const DDim &ddim, int idx) { return ddim[idx]; }
void set(DDim& ddim, int idx, int value) { ddim[idx] = value; } void set(DDim &ddim, int idx, int value) { ddim[idx] = value; }
/// @cond HIDDEN /// @cond HIDDEN
struct VectorizeVisitor : Vistor<void> { struct VectorizeVisitor : Vistor<void> {
std::vector<int64_t>& vector; std::vector<int64_t> &vector;
explicit VectorizeVisitor(std::vector<int64_t>& v) : vector(v) {} explicit VectorizeVisitor(std::vector<int64_t> &v) : vector(v) {}
template <typename T> template <typename T> void operator()(const T &t) {
void operator()(const T& t) {
vector.push_back(t.head); vector.push_back(t.head);
this->operator()(t.tail); this->operator()(t.tail);
} }
void operator()(const Dim<0>& t) {} void operator()(const Dim<0> &t) {}
}; };
/// @endcond /// @endcond
std::vector<int64_t> vectorize(const DDim& ddim) { std::vector<int64_t> vectorize(const DDim &ddim) {
std::vector<int64_t> result; std::vector<int64_t> result;
VectorizeVisitor visitor(result); VectorizeVisitor visitor(result);
DDim::ApplyVistor(visitor, ddim); DDim::ApplyVistor(visitor, ddim);
...@@ -207,30 +198,29 @@ std::vector<int64_t> vectorize(const DDim& ddim) { ...@@ -207,30 +198,29 @@ std::vector<int64_t> vectorize(const DDim& ddim) {
// NOTE: framework::vectorize converts to type int64_t // NOTE: framework::vectorize converts to type int64_t
// which does not fit cudnn inputs. // which does not fit cudnn inputs.
std::vector<int> vectorize2int(const DDim& ddim) { std::vector<int> vectorize2int(const DDim &ddim) {
std::vector<int64_t> temp = vectorize(ddim); std::vector<int64_t> temp = vectorize(ddim);
std::vector<int> result(temp.begin(), temp.end()); std::vector<int> result(temp.begin(), temp.end());
return result; return result;
} }
struct ProductVisitor : Vistor<int64_t> { struct ProductVisitor : Vistor<int64_t> {
template <int D> template <int D> int64_t operator()(const Dim<D> &dim) {
int64_t operator()(const Dim<D>& dim) {
return product(dim); return product(dim);
} }
}; };
int64_t product(const DDim& ddim) { int64_t product(const DDim &ddim) {
ProductVisitor visitor; ProductVisitor visitor;
return DDim::ApplyVistor(visitor, ddim); return DDim::ApplyVistor(visitor, ddim);
} }
struct SliceVectorizeVisitor : Vistor<void> { struct SliceVectorizeVisitor : Vistor<void> {
std::vector<int64_t>& vector; std::vector<int64_t> &vector;
int begin; int begin;
int end; int end;
SliceVectorizeVisitor(std::vector<int64_t>& v, int b, int e) SliceVectorizeVisitor(std::vector<int64_t> &v, int b, int e)
: vector(v), begin(b), end(e) { : vector(v), begin(b), end(e) {
// PADDLE_ENFORCE(begin < end, // PADDLE_ENFORCE(begin < end,
// "Begin index must be less than end index in ddim // "Begin index must be less than end index in ddim
...@@ -239,8 +229,7 @@ struct SliceVectorizeVisitor : Vistor<void> { ...@@ -239,8 +229,7 @@ struct SliceVectorizeVisitor : Vistor<void> {
// "Begin index can't be less than zero in ddim slice."); // "Begin index can't be less than zero in ddim slice.");
} }
template <int S> template <int S> void operator()(const Dim<S> &dim) {
void operator()(const Dim<S>& dim) {
if (begin == 0) { if (begin == 0) {
vector.push_back(dim.head); vector.push_back(dim.head);
} else { } else {
...@@ -252,12 +241,12 @@ struct SliceVectorizeVisitor : Vistor<void> { ...@@ -252,12 +241,12 @@ struct SliceVectorizeVisitor : Vistor<void> {
} }
} }
void operator()(const Dim<0>& dim) { void operator()(const Dim<0> &dim) {
// PADDLE_ENFORCE(end == 0, "End index in ddim slice is out of bound."); // PADDLE_ENFORCE(end == 0, "End index in ddim slice is out of bound.");
} }
}; };
DDim slice_ddim(const DDim& ddim, int begin, int end) { DDim slice_ddim(const DDim &ddim, int begin, int end) {
std::vector<int64_t> vec; std::vector<int64_t> vec;
vec.reserve(end - begin); vec.reserve(end - begin);
SliceVectorizeVisitor visitor(vec, begin, end); SliceVectorizeVisitor visitor(vec, begin, end);
...@@ -270,15 +259,12 @@ DDim slice_ddim(const DDim& ddim, int begin, int end) { ...@@ -270,15 +259,12 @@ DDim slice_ddim(const DDim& ddim, int begin, int end) {
/// \cond HIDDEN /// \cond HIDDEN
struct ArityVisitor : Vistor<int> { struct ArityVisitor : Vistor<int> {
template <int D> template <int D> int operator()(Dim<D>) const { return D; }
int operator()(Dim<D>) const {
return D;
}
}; };
/// \endcond /// \endcond
int arity(const DDim& d) { int arity(const DDim &d) {
ArityVisitor arityVisitor = ArityVisitor(); ArityVisitor arityVisitor = ArityVisitor();
return DDim::ApplyVistor(arityVisitor, d); return DDim::ApplyVistor(arityVisitor, d);
// return arityVisitor(d.var.Get<Dim<4>>()); // return arityVisitor(d.var.Get<Dim<4>>());
...@@ -288,19 +274,18 @@ int arity(const DDim& d) { ...@@ -288,19 +274,18 @@ int arity(const DDim& d) {
/// \endcond /// \endcond
struct OSVistor : Vistor<std::ostream&> { struct OSVistor : Vistor<std::ostream &> {
OSVistor(std::ostream& os) : os_(os) {} OSVistor(std::ostream &os) : os_(os) {}
template <int D> template <int D> std::ostream &operator()(Dim<D> dim) const {
std::ostream& operator()(Dim<D> dim) const {
return os_ << dim; return os_ << dim;
} }
private: private:
std::ostream& os_; std::ostream &os_;
}; };
std::ostream& operator<<(std::ostream& os, const DDim& ddim) { std::ostream &operator<<(std::ostream &os, const DDim &ddim) {
auto vistor = OSVistor(os); auto vistor = OSVistor(os);
DDim::ApplyVistor(vistor, ddim); DDim::ApplyVistor(vistor, ddim);
return os; return os;
...@@ -310,15 +295,15 @@ DDim::DDim(std::initializer_list<int64_t> init_list) { ...@@ -310,15 +295,15 @@ DDim::DDim(std::initializer_list<int64_t> init_list) {
*this = make_ddim(init_list); *this = make_ddim(init_list);
} }
DDim flatten_to_2d(const DDim& src, int num_col_dims) { DDim flatten_to_2d(const DDim &src, int num_col_dims) {
int rank = src.size(); int rank = src.size();
return make_ddim({product(slice_ddim(src, 0, num_col_dims)), return make_ddim({product(slice_ddim(src, 0, num_col_dims)),
product(slice_ddim(src, num_col_dims, rank))}); product(slice_ddim(src, num_col_dims, rank))});
} }
DDim flatten_to_1d(const DDim& src) { return make_ddim({product(src)}); } DDim flatten_to_1d(const DDim &src) { return make_ddim({product(src)}); }
DDim stride(const DDim& ddim) { DDim stride(const DDim &ddim) {
std::vector<int64_t> strides(ddim.size()); std::vector<int64_t> strides(ddim.size());
strides[ddim.size() - 1] = 1; strides[ddim.size() - 1] = 1;
for (int i = ddim.size() - 2; i >= 0; --i) { for (int i = ddim.size() - 2; i >= 0; --i) {
...@@ -327,7 +312,7 @@ DDim stride(const DDim& ddim) { ...@@ -327,7 +312,7 @@ DDim stride(const DDim& ddim) {
return framework::make_ddim(strides); return framework::make_ddim(strides);
} }
DDim stride_numel(const framework::DDim& ddim) { DDim stride_numel(const framework::DDim &ddim) {
std::vector<int64_t> strides(ddim.size()); std::vector<int64_t> strides(ddim.size());
strides[ddim.size() - 1] = ddim[ddim.size() - 1]; strides[ddim.size() - 1] = ddim[ddim.size() - 1];
for (int i = ddim.size() - 2; i >= 0; --i) { for (int i = ddim.size() - 2; i >= 0; --i) {
......
...@@ -14,12 +14,12 @@ limitations under the License. */ ...@@ -14,12 +14,12 @@ limitations under the License. */
#pragma once #pragma once
#include "common/variant.h"
#include "dim.h"
#include <assert.h> #include <assert.h>
#include <initializer_list> #include <initializer_list>
#include <stdexcept> #include <stdexcept>
#include <vector> #include <vector>
#include "common/variant.h"
#include "dim.h"
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
...@@ -66,15 +66,11 @@ struct DDim { ...@@ -66,15 +66,11 @@ struct DDim {
DDim() { var.Set<Dim<1>>(Dim<1>()); } DDim() { var.Set<Dim<1>>(Dim<1>()); }
template <int D> template <int D> explicit DDim(const Dim<D> &in) { var.Set<Dim<D>>(in); }
explicit DDim(const Dim<D> &in) {
var.Set<Dim<D>>(in);
}
/*implicit*/ DDim(std::initializer_list<int64_t> init_list); /*implicit*/ DDim(std::initializer_list<int64_t> init_list);
template <int D> template <int D> DDim &operator=(const Dim<D> &in) {
DDim &operator=(const Dim<D> &in) {
var.Set<Dim<D>>(in); var.Set<Dim<D>>(in);
return *this; return *this;
} }
......
...@@ -24,8 +24,7 @@ namespace paddle_mobile { ...@@ -24,8 +24,7 @@ namespace paddle_mobile {
namespace framework { namespace framework {
// Statically sized, statically indexed dimension // Statically sized, statically indexed dimension
template <int i> template <int i> struct Dim {
struct Dim {
static constexpr int dimensions = i; static constexpr int dimensions = i;
template <typename... Args> template <typename... Args>
...@@ -35,7 +34,7 @@ struct Dim { ...@@ -35,7 +34,7 @@ struct Dim {
} }
HOSTDEVICE HOSTDEVICE
Dim(int64_t _head, const Dim<i - 1>& _tail) : head(_head), tail(_tail) {} Dim(int64_t _head, const Dim<i - 1> &_tail) : head(_head), tail(_tail) {}
HOSTDEVICE HOSTDEVICE
Dim() : head(0), tail() {} Dim() : head(0), tail() {}
...@@ -43,7 +42,7 @@ struct Dim { ...@@ -43,7 +42,7 @@ struct Dim {
/** Construct a Dim from a linear index and size. Uses Fortran order /** Construct a Dim from a linear index and size. Uses Fortran order
* indexing. */ * indexing. */
HOSTDEVICE HOSTDEVICE
Dim(int64_t idx, const Dim<i>& size) Dim(int64_t idx, const Dim<i> &size)
: head(idx % size.head), tail(idx / size.head, size.tail) {} : head(idx % size.head), tail(idx / size.head, size.tail) {}
/** Construct a Dim with each dimension set to the given index */ /** Construct a Dim with each dimension set to the given index */
...@@ -51,15 +50,15 @@ struct Dim { ...@@ -51,15 +50,15 @@ struct Dim {
Dim(int64_t idx) : head(idx), tail(idx) {} Dim(int64_t idx) : head(idx), tail(idx) {}
HOSTDEVICE HOSTDEVICE
bool operator==(const Dim<i>& o) const { bool operator==(const Dim<i> &o) const {
return (head == o.head) && (tail == o.tail); return (head == o.head) && (tail == o.tail);
} }
HOSTDEVICE HOSTDEVICE
bool operator!=(const Dim<i>& o) const { return !(*this == o); } bool operator!=(const Dim<i> &o) const { return !(*this == o); }
HOSTDEVICE HOSTDEVICE
int64_t& operator[](int idx); int64_t &operator[](int idx);
HOSTDEVICE HOSTDEVICE
int64_t operator[](int idx) const; int64_t operator[](int idx) const;
...@@ -70,8 +69,7 @@ struct Dim { ...@@ -70,8 +69,7 @@ struct Dim {
}; };
// Base case specialization // Base case specialization
template <> template <> struct Dim<0> {
struct Dim<0> {
static constexpr int dimensions = 0; static constexpr int dimensions = 0;
HOSTDEVICE HOSTDEVICE
...@@ -81,7 +79,7 @@ struct Dim<0> { ...@@ -81,7 +79,7 @@ struct Dim<0> {
Dim() {} Dim() {}
HOSTDEVICE HOSTDEVICE
Dim(int idx, const Dim<0>& size) { Dim(int idx, const Dim<0> &size) {
#ifndef __CUDA_ARCH__ #ifndef __CUDA_ARCH__
if (idx > 0) { if (idx > 0) {
throw std::invalid_argument("Index out of range."); throw std::invalid_argument("Index out of range.");
...@@ -92,13 +90,13 @@ struct Dim<0> { ...@@ -92,13 +90,13 @@ struct Dim<0> {
} }
HOSTDEVICE HOSTDEVICE
bool operator==(const Dim<0>& o) const { return true; } bool operator==(const Dim<0> &o) const { return true; }
HOSTDEVICE HOSTDEVICE
bool operator!=(const Dim<0>& o) const { return false; } bool operator!=(const Dim<0> &o) const { return false; }
HOSTDEVICE HOSTDEVICE
int64_t& operator[](int idx); int64_t &operator[](int idx);
HOSTDEVICE HOSTDEVICE
int64_t operator[](int idx) const; int64_t operator[](int idx) const;
}; };
...@@ -106,37 +104,28 @@ struct Dim<0> { ...@@ -106,37 +104,28 @@ struct Dim<0> {
namespace { namespace {
// Helper for accessing Dim classes // Helper for accessing Dim classes
template <int i> template <int i> struct DimGetter {
struct DimGetter {
// Return a copy if Dim is const // Return a copy if Dim is const
template <typename D> template <typename D> HOSTDEVICE static int64_t impl(const D &d) {
HOSTDEVICE static int64_t impl(const D& d) {
return DimGetter<i - 1>::impl(d.tail); return DimGetter<i - 1>::impl(d.tail);
} }
// Return a reference if Dim is mutable // Return a reference if Dim is mutable
template <typename D> template <typename D> HOSTDEVICE static int64_t &impl(D &d) {
HOSTDEVICE static int64_t& impl(D& d) {
return DimGetter<i - 1>::impl(d.tail); return DimGetter<i - 1>::impl(d.tail);
} }
}; };
// Eureka! We found the element! // Eureka! We found the element!
template <> template <> struct DimGetter<0> {
struct DimGetter<0> {
// Return a copy if Dim is const // Return a copy if Dim is const
template <typename D> template <typename D> HOSTDEVICE static int64_t impl(const D &d) {
HOSTDEVICE static int64_t impl(const D& d) {
return d.head; return d.head;
} }
// Return a reference if Dim is mutable // Return a reference if Dim is mutable
template <typename D> template <typename D> HOSTDEVICE static int64_t &impl(D &d) { return d.head; }
HOSTDEVICE static int64_t& impl(D& d) {
return d.head;
}
}; };
template <int D> template <int D> HOSTDEVICE int64_t &indexer(Dim<D> &dim, int idx) {
HOSTDEVICE int64_t& indexer(Dim<D>& dim, int idx) {
#ifndef __CUDA_ARCH__ #ifndef __CUDA_ARCH__
if (idx < 0) { if (idx < 0) {
throw std::invalid_argument("Tried to access a negative dimension"); throw std::invalid_argument("Tried to access a negative dimension");
...@@ -150,8 +139,7 @@ HOSTDEVICE int64_t& indexer(Dim<D>& dim, int idx) { ...@@ -150,8 +139,7 @@ HOSTDEVICE int64_t& indexer(Dim<D>& dim, int idx) {
return indexer(dim.tail, idx - 1); return indexer(dim.tail, idx - 1);
} }
template <> template <> HOSTDEVICE int64_t &indexer<0>(Dim<0> &dim, int idx) {
HOSTDEVICE int64_t& indexer<0>(Dim<0>& dim, int idx) {
#ifndef __CUDA_ARCH__ #ifndef __CUDA_ARCH__
throw std::invalid_argument("Invalid index"); throw std::invalid_argument("Invalid index");
#else #else
...@@ -167,8 +155,7 @@ HOSTDEVICE int64_t& indexer<0>(Dim<0>& dim, int idx) { ...@@ -167,8 +155,7 @@ HOSTDEVICE int64_t& indexer<0>(Dim<0>& dim, int idx) {
#endif #endif
} }
template <int D> template <int D> HOSTDEVICE int64_t indexer(const Dim<D> &dim, int idx) {
HOSTDEVICE int64_t indexer(const Dim<D>& dim, int idx) {
#ifndef __CUDA_ARCH__ #ifndef __CUDA_ARCH__
if (idx < 0) { if (idx < 0) {
throw std::invalid_argument("Tried to access a negative dimension"); throw std::invalid_argument("Tried to access a negative dimension");
...@@ -182,8 +169,7 @@ HOSTDEVICE int64_t indexer(const Dim<D>& dim, int idx) { ...@@ -182,8 +169,7 @@ HOSTDEVICE int64_t indexer(const Dim<D>& dim, int idx) {
return indexer(dim.tail, idx - 1); return indexer(dim.tail, idx - 1);
} }
template <> template <> HOSTDEVICE int64_t indexer<0>(const Dim<0> &dim, int idx) {
HOSTDEVICE int64_t indexer<0>(const Dim<0>& dim, int idx) {
#ifndef __CUDA_ARCH__ #ifndef __CUDA_ARCH__
throw std::invalid_argument("Invalid index"); throw std::invalid_argument("Invalid index");
#else #else
...@@ -201,27 +187,23 @@ HOSTDEVICE int64_t indexer<0>(const Dim<0>& dim, int idx) { ...@@ -201,27 +187,23 @@ HOSTDEVICE int64_t indexer<0>(const Dim<0>& dim, int idx) {
} // namespace } // namespace
// Static access to constant Dim // Static access to constant Dim
template <int i, int l> template <int i, int l> HOSTDEVICE int64_t get(const Dim<l> &d) {
HOSTDEVICE int64_t get(const Dim<l>& d) {
return DimGetter<i>::impl(d); return DimGetter<i>::impl(d);
} }
// Static access to mutable Dim // Static access to mutable Dim
template <int i, int l> template <int i, int l> HOSTDEVICE int64_t &get(Dim<l> &d) {
HOSTDEVICE int64_t& get(Dim<l>& d) {
return DimGetter<i>::impl(d); return DimGetter<i>::impl(d);
} }
// Dynamic access to constant Dim // Dynamic access to constant Dim
template <int l> template <int l> HOSTDEVICE int64_t Dim<l>::operator[](int i) const {
HOSTDEVICE int64_t Dim<l>::operator[](int i) const {
// std::cout << "l: " << l << std::endl; // std::cout << "l: " << l << std::endl;
return indexer(*this, i); return indexer(*this, i);
} }
// Dynamic access to mutable Dim // Dynamic access to mutable Dim
template <int l> template <int l> HOSTDEVICE int64_t &Dim<l>::operator[](int i) {
HOSTDEVICE int64_t& Dim<l>::operator[](int i) {
return indexer(*this, i); return indexer(*this, i);
} }
...@@ -231,54 +213,52 @@ inline HOSTDEVICE int64_t Dim<0>::operator[](int i) const { ...@@ -231,54 +213,52 @@ inline HOSTDEVICE int64_t Dim<0>::operator[](int i) const {
} }
// Dynamic access to mutable Dim // Dynamic access to mutable Dim
inline HOSTDEVICE int64_t& Dim<0>::operator[](int i) { inline HOSTDEVICE int64_t &Dim<0>::operator[](int i) {
return indexer(*this, i); return indexer(*this, i);
} }
// Dynamic access to constant Dim // Dynamic access to constant Dim
// without std::enable_if will try to instantiate this on get<0>(d) // without std::enable_if will try to instantiate this on get<0>(d)
template <int l> template <int l>
HOSTDEVICE typename std::enable_if<(l > 0), int64_t>::type get(const Dim<l>& d, HOSTDEVICE typename std::enable_if<(l > 0), int64_t>::type get(const Dim<l> &d,
int i) { int i) {
return d[i]; return d[i];
} }
// Dynamic access to mutable Dim // Dynamic access to mutable Dim
template <int l> template <int l>
HOSTDEVICE typename std::enable_if<(l > 0), int64_t&>::type get(Dim<l>& d, HOSTDEVICE typename std::enable_if<(l > 0), int64_t &>::type get(Dim<l> &d,
int i) { int i) {
return d[i]; return d[i];
} }
// Dot product of two dims // Dot product of two dims
template <int i> template <int i>
HOSTDEVICE int64_t linearize(const Dim<i>& a, const Dim<i>& b) { HOSTDEVICE int64_t linearize(const Dim<i> &a, const Dim<i> &b) {
return a.head * b.head + linearize(a.tail, b.tail); return a.head * b.head + linearize(a.tail, b.tail);
} }
// Base case dot product of two Dims // Base case dot product of two Dims
// Notice it is inline because it is no longer a template // Notice it is inline because it is no longer a template
template <> template <>
HOSTDEVICE inline int64_t linearize(const Dim<0>& a, const Dim<0>& b) { HOSTDEVICE inline int64_t linearize(const Dim<0> &a, const Dim<0> &b) {
return 0; return 0;
} }
// Product of a Dim // Product of a Dim
template <int i> template <int i> HOSTDEVICE int64_t product(const Dim<i> &a, int prod = 1) {
HOSTDEVICE int64_t product(const Dim<i>& a, int prod = 1) {
return prod * a.head * product(a.tail); return prod * a.head * product(a.tail);
} }
// Base case product of a Dim // Base case product of a Dim
// Notice it is inline because it is no longer a template // Notice it is inline because it is no longer a template
template <> template <> HOSTDEVICE inline int64_t product(const Dim<0> &a, int prod) {
HOSTDEVICE inline int64_t product(const Dim<0>& a, int prod) {
return prod; return prod;
} }
// Is 0 <= idx_i < size_i for all i? // Is 0 <= idx_i < size_i for all i?
template <int i> template <int i>
HOSTDEVICE bool contained(const Dim<i>& idx, const Dim<i>& size) { HOSTDEVICE bool contained(const Dim<i> &idx, const Dim<i> &size) {
return ((0 <= idx.head) && (idx.head < size.head) && return ((0 <= idx.head) && (idx.head < size.head) &&
contained(idx.tail, size.tail)); contained(idx.tail, size.tail));
} }
...@@ -286,7 +266,7 @@ HOSTDEVICE bool contained(const Dim<i>& idx, const Dim<i>& size) { ...@@ -286,7 +266,7 @@ HOSTDEVICE bool contained(const Dim<i>& idx, const Dim<i>& size) {
// Base case of is 0 <= idx_i < size_i ? // Base case of is 0 <= idx_i < size_i ?
// Notice it is inline because it is no longer a template // Notice it is inline because it is no longer a template
template <> template <>
HOSTDEVICE inline bool contained(const Dim<0>& idx, const Dim<0>& size) { HOSTDEVICE inline bool contained(const Dim<0> &idx, const Dim<0> &size) {
return true; return true;
} }
...@@ -294,15 +274,14 @@ HOSTDEVICE inline bool contained(const Dim<0>& idx, const Dim<0>& size) { ...@@ -294,15 +274,14 @@ HOSTDEVICE inline bool contained(const Dim<0>& idx, const Dim<0>& size) {
* \brief Compute exclusive prefix-multiply of a Dim. * \brief Compute exclusive prefix-multiply of a Dim.
*/ */
template <int i> template <int i>
HOSTDEVICE Dim<i> ex_prefix_mul(const Dim<i>& src, int mul = 1) { HOSTDEVICE Dim<i> ex_prefix_mul(const Dim<i> &src, int mul = 1) {
return Dim<i>(mul, ex_prefix_mul(src.tail, mul * src.head)); return Dim<i>(mul, ex_prefix_mul(src.tail, mul * src.head));
} }
///\cond HIDDEN ///\cond HIDDEN
// Base case of ex_prefix_mul // Base case of ex_prefix_mul
// Notice it is inline because it is no longer a template // Notice it is inline because it is no longer a template
template <> template <> HOSTDEVICE inline Dim<0> ex_prefix_mul(const Dim<0> &src, int mul) {
HOSTDEVICE inline Dim<0> ex_prefix_mul(const Dim<0>& src, int mul) {
return Dim<0>(); return Dim<0>();
} }
///\endcond ///\endcond
...@@ -310,38 +289,36 @@ HOSTDEVICE inline Dim<0> ex_prefix_mul(const Dim<0>& src, int mul) { ...@@ -310,38 +289,36 @@ HOSTDEVICE inline Dim<0> ex_prefix_mul(const Dim<0>& src, int mul) {
/** /**
* Add two dimensions together * Add two dimensions together
*/ */
template <int i> template <int i> HOSTDEVICE Dim<i> dim_plus(const Dim<i> &a, const Dim<i> &b) {
HOSTDEVICE Dim<i> dim_plus(const Dim<i>& a, const Dim<i>& b) {
return Dim<i>(a.head + b.head, dim_plus(a.tail, b.tail)); return Dim<i>(a.head + b.head, dim_plus(a.tail, b.tail));
} }
// Base case // Base case
template <> template <>
HOSTDEVICE inline Dim<0> dim_plus(const Dim<0>& a, const Dim<0>& b) { HOSTDEVICE inline Dim<0> dim_plus(const Dim<0> &a, const Dim<0> &b) {
return Dim<0>(); return Dim<0>();
} }
template <int i> template <int i>
HOSTDEVICE Dim<i> operator+(const Dim<i>& lhs, const Dim<i>& rhs) { HOSTDEVICE Dim<i> operator+(const Dim<i> &lhs, const Dim<i> &rhs) {
return dim_plus(lhs, rhs); return dim_plus(lhs, rhs);
} }
/** /**
* Multiply two dimensions together * Multiply two dimensions together
*/ */
template <int i> template <int i> HOSTDEVICE Dim<i> dim_mult(const Dim<i> &a, const Dim<i> &b) {
HOSTDEVICE Dim<i> dim_mult(const Dim<i>& a, const Dim<i>& b) {
return Dim<i>(a.head * b.head, dim_mult(a.tail, b.tail)); return Dim<i>(a.head * b.head, dim_mult(a.tail, b.tail));
} }
// Base case // Base case
template <> template <>
HOSTDEVICE inline Dim<0> dim_mult(const Dim<0>& a, const Dim<0>& b) { HOSTDEVICE inline Dim<0> dim_mult(const Dim<0> &a, const Dim<0> &b) {
return Dim<0>(); return Dim<0>();
} }
template <int i> template <int i>
HOSTDEVICE Dim<i> operator*(const Dim<i>& lhs, const Dim<i>& rhs) { HOSTDEVICE Dim<i> operator*(const Dim<i> &lhs, const Dim<i> &rhs) {
return dim_mult(lhs, rhs); return dim_mult(lhs, rhs);
} }
...@@ -356,7 +333,7 @@ HOSTDEVICE Dim<i> operator*(const Dim<i>& lhs, const Dim<i>& rhs) { ...@@ -356,7 +333,7 @@ HOSTDEVICE Dim<i> operator*(const Dim<i>& lhs, const Dim<i>& rhs) {
*/ */
template <int i> template <int i>
HOSTDEVICE Dim<i> normalize_strides(const Dim<i>& size, const Dim<i>& stride) { HOSTDEVICE Dim<i> normalize_strides(const Dim<i> &size, const Dim<i> &stride) {
int norm_stride = size.head == 1 ? 0 : stride.head; int norm_stride = size.head == 1 ? 0 : stride.head;
return Dim<i>(norm_stride, normalize_strides(size.tail, stride.tail)); return Dim<i>(norm_stride, normalize_strides(size.tail, stride.tail));
} }
...@@ -364,8 +341,8 @@ HOSTDEVICE Dim<i> normalize_strides(const Dim<i>& size, const Dim<i>& stride) { ...@@ -364,8 +341,8 @@ HOSTDEVICE Dim<i> normalize_strides(const Dim<i>& size, const Dim<i>& stride) {
///\cond HIDDEN ///\cond HIDDEN
template <> template <>
HOSTDEVICE inline Dim<0> normalize_strides(const Dim<0>& size, HOSTDEVICE inline Dim<0> normalize_strides(const Dim<0> &size,
const Dim<0>& stride) { const Dim<0> &stride) {
return Dim<0>(); return Dim<0>();
} }
...@@ -386,8 +363,8 @@ HOSTDEVICE Dim<sizeof...(Args)> make_dim(Args... idxes) { ...@@ -386,8 +363,8 @@ HOSTDEVICE Dim<sizeof...(Args)> make_dim(Args... idxes) {
// Allows us to output a Dim // Allows us to output a Dim
// XXX For some reason, overloading fails to resolve this correctly // XXX For some reason, overloading fails to resolve this correctly
template <int i> template <int i>
typename std::enable_if<(i > 1), std::ostream&>::type operator<<( typename std::enable_if<(i > 1), std::ostream &>::type
std::ostream& os, const Dim<i>& d) { operator<<(std::ostream &os, const Dim<i> &d) {
os << d.head << ", " << d.tail; os << d.head << ", " << d.tail;
return os; return os;
} }
...@@ -395,18 +372,17 @@ typename std::enable_if<(i > 1), std::ostream&>::type operator<<( ...@@ -395,18 +372,17 @@ typename std::enable_if<(i > 1), std::ostream&>::type operator<<(
// Base case that allows us to output a Dim // Base case that allows us to output a Dim
// XXX I wish this could be an overload instead of a template // XXX I wish this could be an overload instead of a template
template <int i> template <int i>
typename std::enable_if<(i == 1), std::ostream&>::type operator<<( typename std::enable_if<(i == 1), std::ostream &>::type
std::ostream& os, const Dim<i>& d) { operator<<(std::ostream &os, const Dim<i> &d) {
os << d.head; os << d.head;
return os; return os;
} }
inline std::ostream& operator<<(std::ostream& os, const Dim<0>& d) { inline std::ostream &operator<<(std::ostream &os, const Dim<0> &d) {
return os; return os;
} }
template <int i> template <int i> HOST std::string Dim<i>::to_string() const {
HOST std::string Dim<i>::to_string() const {
std::stringstream stream; std::stringstream stream;
stream << *this; stream << *this;
......
...@@ -34,13 +34,12 @@ SOFTWARE. ...@@ -34,13 +34,12 @@ SOFTWARE.
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
template <typename Dtype> template <typename Dtype> class Executor {
class Executor { public:
public:
Executor(const Program<Dtype> p); Executor(const Program<Dtype> p);
std::shared_ptr<Tensor> predict(Tensor &t); std::shared_ptr<Tensor> predict(Tensor &t);
private: private:
const framework::Program<Dtype> program_; const framework::Program<Dtype> program_;
std::shared_ptr<ProgramDesc> to_predict_program_; std::shared_ptr<ProgramDesc> to_predict_program_;
void predict(const Tensor &t, int block_id); void predict(const Tensor &t, int block_id);
......
...@@ -18,73 +18,73 @@ namespace paddle_mobile { ...@@ -18,73 +18,73 @@ namespace paddle_mobile {
namespace framework { namespace framework {
namespace proto { namespace proto {
class OpDesc_AttrDefaultTypeInternal { class OpDesc_AttrDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<OpDesc_Attr> _instance; ::google::protobuf::internal::ExplicitlyConstructed<OpDesc_Attr> _instance;
} _OpDesc_Attr_default_instance_; } _OpDesc_Attr_default_instance_;
class OpDesc_VarDefaultTypeInternal { class OpDesc_VarDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<OpDesc_Var> _instance; ::google::protobuf::internal::ExplicitlyConstructed<OpDesc_Var> _instance;
} _OpDesc_Var_default_instance_; } _OpDesc_Var_default_instance_;
class OpDescDefaultTypeInternal { class OpDescDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<OpDesc> _instance; ::google::protobuf::internal::ExplicitlyConstructed<OpDesc> _instance;
} _OpDesc_default_instance_; } _OpDesc_default_instance_;
class OpProto_VarDefaultTypeInternal { class OpProto_VarDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<OpProto_Var> _instance; ::google::protobuf::internal::ExplicitlyConstructed<OpProto_Var> _instance;
} _OpProto_Var_default_instance_; } _OpProto_Var_default_instance_;
class OpProto_AttrDefaultTypeInternal { class OpProto_AttrDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<OpProto_Attr> _instance; ::google::protobuf::internal::ExplicitlyConstructed<OpProto_Attr> _instance;
} _OpProto_Attr_default_instance_; } _OpProto_Attr_default_instance_;
class OpProtoDefaultTypeInternal { class OpProtoDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<OpProto> _instance; ::google::protobuf::internal::ExplicitlyConstructed<OpProto> _instance;
} _OpProto_default_instance_; } _OpProto_default_instance_;
class VarType_TensorDescDefaultTypeInternal { class VarType_TensorDescDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<VarType_TensorDesc> ::google::protobuf::internal::ExplicitlyConstructed<VarType_TensorDesc>
_instance; _instance;
} _VarType_TensorDesc_default_instance_; } _VarType_TensorDesc_default_instance_;
class VarType_LoDTensorDescDefaultTypeInternal { class VarType_LoDTensorDescDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<VarType_LoDTensorDesc> ::google::protobuf::internal::ExplicitlyConstructed<VarType_LoDTensorDesc>
_instance; _instance;
} _VarType_LoDTensorDesc_default_instance_; } _VarType_LoDTensorDesc_default_instance_;
class VarType_LoDTensorArrayDescDefaultTypeInternal { class VarType_LoDTensorArrayDescDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed< ::google::protobuf::internal::ExplicitlyConstructed<
VarType_LoDTensorArrayDesc> VarType_LoDTensorArrayDesc>
_instance; _instance;
} _VarType_LoDTensorArrayDesc_default_instance_; } _VarType_LoDTensorArrayDesc_default_instance_;
class VarType_ReaderDescDefaultTypeInternal { class VarType_ReaderDescDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<VarType_ReaderDesc> ::google::protobuf::internal::ExplicitlyConstructed<VarType_ReaderDesc>
_instance; _instance;
} _VarType_ReaderDesc_default_instance_; } _VarType_ReaderDesc_default_instance_;
class VarType_ChannelDescDefaultTypeInternal { class VarType_ChannelDescDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<VarType_ChannelDesc> ::google::protobuf::internal::ExplicitlyConstructed<VarType_ChannelDesc>
_instance; _instance;
} _VarType_ChannelDesc_default_instance_; } _VarType_ChannelDesc_default_instance_;
class VarType_TupleDefaultTypeInternal { class VarType_TupleDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<VarType_Tuple> _instance; ::google::protobuf::internal::ExplicitlyConstructed<VarType_Tuple> _instance;
} _VarType_Tuple_default_instance_; } _VarType_Tuple_default_instance_;
class VarTypeDefaultTypeInternal { class VarTypeDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<VarType> _instance; ::google::protobuf::internal::ExplicitlyConstructed<VarType> _instance;
} _VarType_default_instance_; } _VarType_default_instance_;
class VarDescDefaultTypeInternal { class VarDescDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<VarDesc> _instance; ::google::protobuf::internal::ExplicitlyConstructed<VarDesc> _instance;
} _VarDesc_default_instance_; } _VarDesc_default_instance_;
class BlockDescDefaultTypeInternal { class BlockDescDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<BlockDesc> _instance; ::google::protobuf::internal::ExplicitlyConstructed<BlockDesc> _instance;
} _BlockDesc_default_instance_; } _BlockDesc_default_instance_;
class ProgramDescDefaultTypeInternal { class ProgramDescDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<ProgramDesc> _instance; ::google::protobuf::internal::ExplicitlyConstructed<ProgramDesc> _instance;
} _ProgramDesc_default_instance_; } _ProgramDesc_default_instance_;
...@@ -173,41 +173,41 @@ void TableStruct::InitDefaultsImpl() { ...@@ -173,41 +173,41 @@ void TableStruct::InitDefaultsImpl() {
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_ProgramDesc_default_instance_); &_ProgramDesc_default_instance_);
_VarType_LoDTensorDesc_default_instance_._instance.get_mutable()->tensor_ = _VarType_LoDTensorDesc_default_instance_._instance.get_mutable()->tensor_ =
const_cast<::paddle_mobile::framework::proto::VarType_TensorDesc*>( const_cast<::paddle_mobile::framework::proto::VarType_TensorDesc *>(
::paddle_mobile::framework::proto::VarType_TensorDesc:: ::paddle_mobile::framework::proto::VarType_TensorDesc::
internal_default_instance()); internal_default_instance());
_VarType_LoDTensorArrayDesc_default_instance_._instance.get_mutable() _VarType_LoDTensorArrayDesc_default_instance_._instance.get_mutable()
->tensor_ = ->tensor_ =
const_cast<::paddle_mobile::framework::proto::VarType_TensorDesc*>( const_cast<::paddle_mobile::framework::proto::VarType_TensorDesc *>(
::paddle_mobile::framework::proto::VarType_TensorDesc:: ::paddle_mobile::framework::proto::VarType_TensorDesc::
internal_default_instance()); internal_default_instance());
_VarType_default_instance_._instance.get_mutable()->selected_rows_ = _VarType_default_instance_._instance.get_mutable()->selected_rows_ =
const_cast<::paddle_mobile::framework::proto::VarType_TensorDesc*>( const_cast<::paddle_mobile::framework::proto::VarType_TensorDesc *>(
::paddle_mobile::framework::proto::VarType_TensorDesc:: ::paddle_mobile::framework::proto::VarType_TensorDesc::
internal_default_instance()); internal_default_instance());
_VarType_default_instance_._instance.get_mutable()->lod_tensor_ = _VarType_default_instance_._instance.get_mutable()->lod_tensor_ =
const_cast<::paddle_mobile::framework::proto::VarType_LoDTensorDesc*>( const_cast<::paddle_mobile::framework::proto::VarType_LoDTensorDesc *>(
::paddle_mobile::framework::proto::VarType_LoDTensorDesc:: ::paddle_mobile::framework::proto::VarType_LoDTensorDesc::
internal_default_instance()); internal_default_instance());
_VarType_default_instance_._instance.get_mutable()->tensor_array_ = _VarType_default_instance_._instance.get_mutable()->tensor_array_ =
const_cast< const_cast<
::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc*>( ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *>(
::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc:: ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc::
internal_default_instance()); internal_default_instance());
_VarType_default_instance_._instance.get_mutable()->reader_ = _VarType_default_instance_._instance.get_mutable()->reader_ =
const_cast<::paddle_mobile::framework::proto::VarType_ReaderDesc*>( const_cast<::paddle_mobile::framework::proto::VarType_ReaderDesc *>(
::paddle_mobile::framework::proto::VarType_ReaderDesc:: ::paddle_mobile::framework::proto::VarType_ReaderDesc::
internal_default_instance()); internal_default_instance());
_VarType_default_instance_._instance.get_mutable()->channel_ = _VarType_default_instance_._instance.get_mutable()->channel_ =
const_cast<::paddle_mobile::framework::proto::VarType_ChannelDesc*>( const_cast<::paddle_mobile::framework::proto::VarType_ChannelDesc *>(
::paddle_mobile::framework::proto::VarType_ChannelDesc:: ::paddle_mobile::framework::proto::VarType_ChannelDesc::
internal_default_instance()); internal_default_instance());
_VarType_default_instance_._instance.get_mutable()->tuple_ = _VarType_default_instance_._instance.get_mutable()->tuple_ =
const_cast<::paddle_mobile::framework::proto::VarType_Tuple*>( const_cast<::paddle_mobile::framework::proto::VarType_Tuple *>(
::paddle_mobile::framework::proto::VarType_Tuple:: ::paddle_mobile::framework::proto::VarType_Tuple::
internal_default_instance()); internal_default_instance());
_VarDesc_default_instance_._instance.get_mutable() _VarDesc_default_instance_._instance.get_mutable()
->type_ = const_cast<::paddle_mobile::framework::proto::VarType*>( ->type_ = const_cast<::paddle_mobile::framework::proto::VarType *>(
::paddle_mobile::framework::proto::VarType::internal_default_instance()); ::paddle_mobile::framework::proto::VarType::internal_default_instance());
} }
...@@ -320,15 +320,10 @@ OpDesc_Attr::OpDesc_Attr() ...@@ -320,15 +320,10 @@ OpDesc_Attr::OpDesc_Attr()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc.Attr) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc.Attr)
} }
OpDesc_Attr::OpDesc_Attr(const OpDesc_Attr& from) OpDesc_Attr::OpDesc_Attr(const OpDesc_Attr &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0), ints_(from.ints_),
_has_bits_(from._has_bits_), floats_(from.floats_), strings_(from.strings_), bools_(from.bools_) {
_cached_size_(0),
ints_(from.ints_),
floats_(from.floats_),
strings_(from.strings_),
bools_(from.bools_) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault( name_.UnsafeSetDefault(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
...@@ -344,8 +339,8 @@ OpDesc_Attr::OpDesc_Attr(const OpDesc_Attr& from) ...@@ -344,8 +339,8 @@ OpDesc_Attr::OpDesc_Attr(const OpDesc_Attr& from)
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_); &::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_);
} }
::memcpy(&type_, &from.type_, ::memcpy(&type_, &from.type_,
static_cast<size_t>(reinterpret_cast<char*>(&block_idx_) - static_cast<size_t>(reinterpret_cast<char *>(&block_idx_) -
reinterpret_cast<char*>(&type_)) + reinterpret_cast<char *>(&type_)) +
sizeof(block_idx_)); sizeof(block_idx_));
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.OpDesc.Attr) // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.OpDesc.Attr)
} }
...@@ -356,8 +351,9 @@ void OpDesc_Attr::SharedCtor() { ...@@ -356,8 +351,9 @@ void OpDesc_Attr::SharedCtor() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
s_.UnsafeSetDefault( s_.UnsafeSetDefault(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&type_, 0, static_cast<size_t>(reinterpret_cast<char*>(&block_idx_) - ::memset(&type_, 0,
reinterpret_cast<char*>(&type_)) + static_cast<size_t>(reinterpret_cast<char *>(&block_idx_) -
reinterpret_cast<char *>(&type_)) +
sizeof(block_idx_)); sizeof(block_idx_));
} }
...@@ -378,13 +374,13 @@ void OpDesc_Attr::SetCachedSize(int size) const { ...@@ -378,13 +374,13 @@ void OpDesc_Attr::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const OpDesc_Attr& OpDesc_Attr::default_instance() { const OpDesc_Attr &OpDesc_Attr::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
OpDesc_Attr* OpDesc_Attr::New(::google::protobuf::Arena* arena) const { OpDesc_Attr *OpDesc_Attr::New(::google::protobuf::Arena *arena) const {
OpDesc_Attr* n = new OpDesc_Attr; OpDesc_Attr *n = new OpDesc_Attr;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -416,8 +412,8 @@ void OpDesc_Attr::Clear() { ...@@ -416,8 +412,8 @@ void OpDesc_Attr::Clear() {
} }
if (cached_has_bits & 252u) { if (cached_has_bits & 252u) {
::memset(&type_, 0, ::memset(&type_, 0,
static_cast<size_t>(reinterpret_cast<char*>(&block_idx_) - static_cast<size_t>(reinterpret_cast<char *>(&block_idx_) -
reinterpret_cast<char*>(&type_)) + reinterpret_cast<char *>(&type_)) +
sizeof(block_idx_)); sizeof(block_idx_));
} }
_has_bits_.Clear(); _has_bits_.Clear();
...@@ -425,9 +421,10 @@ void OpDesc_Attr::Clear() { ...@@ -425,9 +421,10 @@ void OpDesc_Attr::Clear() {
} }
bool OpDesc_Attr::MergePartialFromCodedStream( bool OpDesc_Attr::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -441,7 +438,8 @@ bool OpDesc_Attr::MergePartialFromCodedStream( ...@@ -441,7 +438,8 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required string name = 1; // required string name = 1;
...@@ -465,8 +463,8 @@ bool OpDesc_Attr::MergePartialFromCodedStream( ...@@ -465,8 +463,8 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value))); input, &value)));
if (::paddle_mobile::framework::proto::AttrType_IsValid(value)) { if (::paddle_mobile::framework::proto::AttrType_IsValid(value)) {
set_type(static_cast<::paddle_mobile::framework::proto::AttrType>( set_type(
value)); static_cast<::paddle_mobile::framework::proto::AttrType>(value));
} else { } else {
unknown_fields_stream.WriteVarint32(16u); unknown_fields_stream.WriteVarint32(16u);
unknown_fields_stream.WriteVarint32( unknown_fields_stream.WriteVarint32(
...@@ -524,16 +522,13 @@ bool OpDesc_Attr::MergePartialFromCodedStream( ...@@ -524,16 +522,13 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(48u /* 48 & 0xFF */)) { static_cast<::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
DO_(( DO_((
::google::protobuf::internal::WireFormatLite:: ::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
ReadRepeatedPrimitive<
::google::protobuf::int32, ::google::protobuf::int32,
::google::protobuf::internal::WireFormatLite::TYPE_INT32>( ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1, 48u, input, this->mutable_ints()))); 1, 48u, input, this->mutable_ints())));
} else if (static_cast<::google::protobuf::uint8>(tag) == } else if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>( static_cast<::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
50u /* 50 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::
DO_((
::google::protobuf::internal::WireFormatLite::
ReadPackedPrimitiveNoInline< ReadPackedPrimitiveNoInline<
::google::protobuf::int32, ::google::protobuf::int32,
::google::protobuf::internal::WireFormatLite::TYPE_INT32>( ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
...@@ -549,16 +544,13 @@ bool OpDesc_Attr::MergePartialFromCodedStream( ...@@ -549,16 +544,13 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(61u /* 61 & 0xFF */)) { static_cast<::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
DO_(( DO_((
::google::protobuf::internal::WireFormatLite:: ::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
ReadRepeatedPrimitive<
float, float,
::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
1, 61u, input, this->mutable_floats()))); 1, 61u, input, this->mutable_floats())));
} else if (static_cast<::google::protobuf::uint8>(tag) == } else if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>( static_cast<::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
58u /* 58 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::
DO_((
::google::protobuf::internal::WireFormatLite::
ReadPackedPrimitiveNoInline< ReadPackedPrimitiveNoInline<
float, float,
::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
...@@ -599,14 +591,12 @@ bool OpDesc_Attr::MergePartialFromCodedStream( ...@@ -599,14 +591,12 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
case 11: { case 11: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(88u /* 88 & 0xFF */)) { static_cast<::google::protobuf::uint8>(88u /* 88 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite:: DO_((
ReadRepeatedPrimitive< ::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
bool, bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
1, 88u, input, this->mutable_bools()))); 1, 88u, input, this->mutable_bools())));
} else if (static_cast<::google::protobuf::uint8>(tag) == } else if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>( static_cast<::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
90u /* 90 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite:: DO_((::google::protobuf::internal::WireFormatLite::
ReadPackedPrimitiveNoInline< ReadPackedPrimitiveNoInline<
bool, bool,
...@@ -669,7 +659,7 @@ failure: ...@@ -669,7 +659,7 @@ failure:
} }
void OpDesc_Attr::SerializeWithCachedSizes( void OpDesc_Attr::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.OpDesc.Attr) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.OpDesc.Attr)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -868,11 +858,11 @@ size_t OpDesc_Attr::ByteSizeLong() const { ...@@ -868,11 +858,11 @@ size_t OpDesc_Attr::ByteSizeLong() const {
} }
void OpDesc_Attr::CheckTypeAndMergeFrom( void OpDesc_Attr::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const OpDesc_Attr*>(&from)); MergeFrom(*::google::protobuf::down_cast<const OpDesc_Attr *>(&from));
} }
void OpDesc_Attr::MergeFrom(const OpDesc_Attr& from) { void OpDesc_Attr::MergeFrom(const OpDesc_Attr &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpDesc.Attr) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpDesc.Attr)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -919,23 +909,26 @@ void OpDesc_Attr::MergeFrom(const OpDesc_Attr& from) { ...@@ -919,23 +909,26 @@ void OpDesc_Attr::MergeFrom(const OpDesc_Attr& from) {
} }
} }
void OpDesc_Attr::CopyFrom(const OpDesc_Attr& from) { void OpDesc_Attr::CopyFrom(const OpDesc_Attr &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpDesc.Attr) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpDesc.Attr)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool OpDesc_Attr::IsInitialized() const { bool OpDesc_Attr::IsInitialized() const {
if ((_has_bits_[0] & 0x00000005) != 0x00000005) return false; if ((_has_bits_[0] & 0x00000005) != 0x00000005)
return false;
return true; return true;
} }
void OpDesc_Attr::Swap(OpDesc_Attr* other) { void OpDesc_Attr::Swap(OpDesc_Attr *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void OpDesc_Attr::InternalSwap(OpDesc_Attr* other) { void OpDesc_Attr::InternalSwap(OpDesc_Attr *other) {
using std::swap; using std::swap;
ints_.InternalSwap(&other->ints_); ints_.InternalSwap(&other->ints_);
floats_.InternalSwap(&other->floats_); floats_.InternalSwap(&other->floats_);
...@@ -972,50 +965,50 @@ void OpDesc_Attr::clear_name() { ...@@ -972,50 +965,50 @@ void OpDesc_Attr::clear_name() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name(); clear_has_name();
} }
const ::std::string& OpDesc_Attr::name() const { const ::std::string &OpDesc_Attr::name() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.name)
return name_.GetNoArena(); return name_.GetNoArena();
} }
void OpDesc_Attr::set_name(const ::std::string& value) { void OpDesc_Attr::set_name(const ::std::string &value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.name)
} }
#if LANG_CXX11 #if LANG_CXX11
void OpDesc_Attr::set_name(::std::string&& value) { void OpDesc_Attr::set_name(::std::string &&value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Attr.name)
} }
#endif #endif
void OpDesc_Attr::set_name(const char* value) { void OpDesc_Attr::set_name(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Attr.name)
} }
void OpDesc_Attr::set_name(const char* value, size_t size) { void OpDesc_Attr::set_name(const char *value, size_t size) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.name)
} }
::std::string* OpDesc_Attr::mutable_name() { ::std::string *OpDesc_Attr::mutable_name() {
set_has_name(); set_has_name();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.name)
return name_.MutableNoArena( return name_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
::std::string* OpDesc_Attr::release_name() { ::std::string *OpDesc_Attr::release_name() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.Attr.name)
clear_has_name(); clear_has_name();
return name_.ReleaseNoArena( return name_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
void OpDesc_Attr::set_allocated_name(::std::string* name) { void OpDesc_Attr::set_allocated_name(::std::string *name) {
if (name != NULL) { if (name != NULL) {
set_has_name(); set_has_name();
} else { } else {
...@@ -1092,50 +1085,50 @@ void OpDesc_Attr::clear_s() { ...@@ -1092,50 +1085,50 @@ void OpDesc_Attr::clear_s() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_s(); clear_has_s();
} }
const ::std::string& OpDesc_Attr::s() const { const ::std::string &OpDesc_Attr::s() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.s)
return s_.GetNoArena(); return s_.GetNoArena();
} }
void OpDesc_Attr::set_s(const ::std::string& value) { void OpDesc_Attr::set_s(const ::std::string &value) {
set_has_s(); set_has_s();
s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.s)
} }
#if LANG_CXX11 #if LANG_CXX11
void OpDesc_Attr::set_s(::std::string&& value) { void OpDesc_Attr::set_s(::std::string &&value) {
set_has_s(); set_has_s();
s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Attr.s)
} }
#endif #endif
void OpDesc_Attr::set_s(const char* value) { void OpDesc_Attr::set_s(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_s(); set_has_s();
s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Attr.s)
} }
void OpDesc_Attr::set_s(const char* value, size_t size) { void OpDesc_Attr::set_s(const char *value, size_t size) {
set_has_s(); set_has_s();
s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.s)
} }
::std::string* OpDesc_Attr::mutable_s() { ::std::string *OpDesc_Attr::mutable_s() {
set_has_s(); set_has_s();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.s)
return s_.MutableNoArena( return s_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
::std::string* OpDesc_Attr::release_s() { ::std::string *OpDesc_Attr::release_s() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.Attr.s)
clear_has_s(); clear_has_s();
return s_.ReleaseNoArena( return s_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
void OpDesc_Attr::set_allocated_s(::std::string* s) { void OpDesc_Attr::set_allocated_s(::std::string *s) {
if (s != NULL) { if (s != NULL) {
set_has_s(); set_has_s();
} else { } else {
...@@ -1161,12 +1154,12 @@ void OpDesc_Attr::add_ints(::google::protobuf::int32 value) { ...@@ -1161,12 +1154,12 @@ void OpDesc_Attr::add_ints(::google::protobuf::int32 value) {
ints_.Add(value); ints_.Add(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.ints) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.ints)
} }
const ::google::protobuf::RepeatedField<::google::protobuf::int32>& const ::google::protobuf::RepeatedField<::google::protobuf::int32> &
OpDesc_Attr::ints() const { OpDesc_Attr::ints() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.ints) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.ints)
return ints_; return ints_;
} }
::google::protobuf::RepeatedField<::google::protobuf::int32>* ::google::protobuf::RepeatedField<::google::protobuf::int32> *
OpDesc_Attr::mutable_ints() { OpDesc_Attr::mutable_ints() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.ints) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.ints)
return &ints_; return &ints_;
...@@ -1187,11 +1180,11 @@ void OpDesc_Attr::add_floats(float value) { ...@@ -1187,11 +1180,11 @@ void OpDesc_Attr::add_floats(float value) {
floats_.Add(value); floats_.Add(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.floats) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.floats)
} }
const ::google::protobuf::RepeatedField<float>& OpDesc_Attr::floats() const { const ::google::protobuf::RepeatedField<float> &OpDesc_Attr::floats() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.floats) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.floats)
return floats_; return floats_;
} }
::google::protobuf::RepeatedField<float>* OpDesc_Attr::mutable_floats() { ::google::protobuf::RepeatedField<float> *OpDesc_Attr::mutable_floats() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.floats) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.floats)
return &floats_; return &floats_;
} }
...@@ -1199,62 +1192,62 @@ const ::google::protobuf::RepeatedField<float>& OpDesc_Attr::floats() const { ...@@ -1199,62 +1192,62 @@ const ::google::protobuf::RepeatedField<float>& OpDesc_Attr::floats() const {
// repeated string strings = 8; // repeated string strings = 8;
int OpDesc_Attr::strings_size() const { return strings_.size(); } int OpDesc_Attr::strings_size() const { return strings_.size(); }
void OpDesc_Attr::clear_strings() { strings_.Clear(); } void OpDesc_Attr::clear_strings() { strings_.Clear(); }
const ::std::string& OpDesc_Attr::strings(int index) const { const ::std::string &OpDesc_Attr::strings(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return strings_.Get(index); return strings_.Get(index);
} }
::std::string* OpDesc_Attr::mutable_strings(int index) { ::std::string *OpDesc_Attr::mutable_strings(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return strings_.Mutable(index); return strings_.Mutable(index);
} }
void OpDesc_Attr::set_strings(int index, const ::std::string& value) { void OpDesc_Attr::set_strings(int index, const ::std::string &value) {
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.strings)
strings_.Mutable(index)->assign(value); strings_.Mutable(index)->assign(value);
} }
#if LANG_CXX11 #if LANG_CXX11
void OpDesc_Attr::set_strings(int index, ::std::string&& value) { void OpDesc_Attr::set_strings(int index, ::std::string &&value) {
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.strings)
strings_.Mutable(index)->assign(std::move(value)); strings_.Mutable(index)->assign(std::move(value));
} }
#endif #endif
void OpDesc_Attr::set_strings(int index, const char* value) { void OpDesc_Attr::set_strings(int index, const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
strings_.Mutable(index)->assign(value); strings_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Attr.strings)
} }
void OpDesc_Attr::set_strings(int index, const char* value, size_t size) { void OpDesc_Attr::set_strings(int index, const char *value, size_t size) {
strings_.Mutable(index)->assign(reinterpret_cast<const char*>(value), size); strings_.Mutable(index)->assign(reinterpret_cast<const char *>(value), size);
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.strings)
} }
::std::string* OpDesc_Attr::add_strings() { ::std::string *OpDesc_Attr::add_strings() {
// @@protoc_insertion_point(field_add_mutable:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_add_mutable:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return strings_.Add(); return strings_.Add();
} }
void OpDesc_Attr::add_strings(const ::std::string& value) { void OpDesc_Attr::add_strings(const ::std::string &value) {
strings_.Add()->assign(value); strings_.Add()->assign(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.strings)
} }
#if LANG_CXX11 #if LANG_CXX11
void OpDesc_Attr::add_strings(::std::string&& value) { void OpDesc_Attr::add_strings(::std::string &&value) {
strings_.Add(std::move(value)); strings_.Add(std::move(value));
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.strings)
} }
#endif #endif
void OpDesc_Attr::add_strings(const char* value) { void OpDesc_Attr::add_strings(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
strings_.Add()->assign(value); strings_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_add_char:paddle_mobile.framework.proto.OpDesc.Attr.strings)
} }
void OpDesc_Attr::add_strings(const char* value, size_t size) { void OpDesc_Attr::add_strings(const char *value, size_t size) {
strings_.Add()->assign(reinterpret_cast<const char*>(value), size); strings_.Add()->assign(reinterpret_cast<const char *>(value), size);
// @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Attr.strings)
} }
const ::google::protobuf::RepeatedPtrField<::std::string>& const ::google::protobuf::RepeatedPtrField<::std::string> &
OpDesc_Attr::strings() const { OpDesc_Attr::strings() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return strings_; return strings_;
} }
::google::protobuf::RepeatedPtrField<::std::string>* ::google::protobuf::RepeatedPtrField<::std::string> *
OpDesc_Attr::mutable_strings() { OpDesc_Attr::mutable_strings() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return &strings_; return &strings_;
...@@ -1293,11 +1286,11 @@ void OpDesc_Attr::add_bools(bool value) { ...@@ -1293,11 +1286,11 @@ void OpDesc_Attr::add_bools(bool value) {
bools_.Add(value); bools_.Add(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.bools) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.bools)
} }
const ::google::protobuf::RepeatedField<bool>& OpDesc_Attr::bools() const { const ::google::protobuf::RepeatedField<bool> &OpDesc_Attr::bools() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.bools) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.bools)
return bools_; return bools_;
} }
::google::protobuf::RepeatedField<bool>* OpDesc_Attr::mutable_bools() { ::google::protobuf::RepeatedField<bool> *OpDesc_Attr::mutable_bools() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.bools) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.bools)
return &bools_; return &bools_;
} }
...@@ -1357,11 +1350,9 @@ OpDesc_Var::OpDesc_Var() ...@@ -1357,11 +1350,9 @@ OpDesc_Var::OpDesc_Var()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc.Var) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc.Var)
} }
OpDesc_Var::OpDesc_Var(const OpDesc_Var& from) OpDesc_Var::OpDesc_Var(const OpDesc_Var &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0),
_has_bits_(from._has_bits_),
_cached_size_(0),
arguments_(from.arguments_) { arguments_(from.arguments_) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
parameter_.UnsafeSetDefault( parameter_.UnsafeSetDefault(
...@@ -1395,13 +1386,13 @@ void OpDesc_Var::SetCachedSize(int size) const { ...@@ -1395,13 +1386,13 @@ void OpDesc_Var::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const OpDesc_Var& OpDesc_Var::default_instance() { const OpDesc_Var &OpDesc_Var::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
OpDesc_Var* OpDesc_Var::New(::google::protobuf::Arena* arena) const { OpDesc_Var *OpDesc_Var::New(::google::protobuf::Arena *arena) const {
OpDesc_Var* n = new OpDesc_Var; OpDesc_Var *n = new OpDesc_Var;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -1425,9 +1416,10 @@ void OpDesc_Var::Clear() { ...@@ -1425,9 +1416,10 @@ void OpDesc_Var::Clear() {
} }
bool OpDesc_Var::MergePartialFromCodedStream( bool OpDesc_Var::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -1441,7 +1433,8 @@ bool OpDesc_Var::MergePartialFromCodedStream( ...@@ -1441,7 +1433,8 @@ bool OpDesc_Var::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required string parameter = 1; // required string parameter = 1;
...@@ -1489,7 +1482,7 @@ failure: ...@@ -1489,7 +1482,7 @@ failure:
} }
void OpDesc_Var::SerializeWithCachedSizes( void OpDesc_Var::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.OpDesc.Var) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.OpDesc.Var)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -1540,11 +1533,11 @@ size_t OpDesc_Var::ByteSizeLong() const { ...@@ -1540,11 +1533,11 @@ size_t OpDesc_Var::ByteSizeLong() const {
} }
void OpDesc_Var::CheckTypeAndMergeFrom( void OpDesc_Var::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const OpDesc_Var*>(&from)); MergeFrom(*::google::protobuf::down_cast<const OpDesc_Var *>(&from));
} }
void OpDesc_Var::MergeFrom(const OpDesc_Var& from) { void OpDesc_Var::MergeFrom(const OpDesc_Var &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpDesc.Var) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpDesc.Var)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -1560,23 +1553,26 @@ void OpDesc_Var::MergeFrom(const OpDesc_Var& from) { ...@@ -1560,23 +1553,26 @@ void OpDesc_Var::MergeFrom(const OpDesc_Var& from) {
} }
} }
void OpDesc_Var::CopyFrom(const OpDesc_Var& from) { void OpDesc_Var::CopyFrom(const OpDesc_Var &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpDesc.Var) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpDesc.Var)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool OpDesc_Var::IsInitialized() const { bool OpDesc_Var::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; if ((_has_bits_[0] & 0x00000001) != 0x00000001)
return false;
return true; return true;
} }
void OpDesc_Var::Swap(OpDesc_Var* other) { void OpDesc_Var::Swap(OpDesc_Var *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void OpDesc_Var::InternalSwap(OpDesc_Var* other) { void OpDesc_Var::InternalSwap(OpDesc_Var *other) {
using std::swap; using std::swap;
arguments_.InternalSwap(&other->arguments_); arguments_.InternalSwap(&other->arguments_);
parameter_.Swap(&other->parameter_); parameter_.Swap(&other->parameter_);
...@@ -1603,18 +1599,18 @@ void OpDesc_Var::clear_parameter() { ...@@ -1603,18 +1599,18 @@ void OpDesc_Var::clear_parameter() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_parameter(); clear_has_parameter();
} }
const ::std::string& OpDesc_Var::parameter() const { const ::std::string &OpDesc_Var::parameter() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Var.parameter)
return parameter_.GetNoArena(); return parameter_.GetNoArena();
} }
void OpDesc_Var::set_parameter(const ::std::string& value) { void OpDesc_Var::set_parameter(const ::std::string &value) {
set_has_parameter(); set_has_parameter();
parameter_.SetNoArena( parameter_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.parameter)
} }
#if LANG_CXX11 #if LANG_CXX11
void OpDesc_Var::set_parameter(::std::string&& value) { void OpDesc_Var::set_parameter(::std::string &&value) {
set_has_parameter(); set_has_parameter();
parameter_.SetNoArena( parameter_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
...@@ -1622,7 +1618,7 @@ void OpDesc_Var::set_parameter(::std::string&& value) { ...@@ -1622,7 +1618,7 @@ void OpDesc_Var::set_parameter(::std::string&& value) {
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Var.parameter)
} }
#endif #endif
void OpDesc_Var::set_parameter(const char* value) { void OpDesc_Var::set_parameter(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_parameter(); set_has_parameter();
parameter_.SetNoArena( parameter_.SetNoArena(
...@@ -1630,26 +1626,26 @@ void OpDesc_Var::set_parameter(const char* value) { ...@@ -1630,26 +1626,26 @@ void OpDesc_Var::set_parameter(const char* value) {
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Var.parameter)
} }
void OpDesc_Var::set_parameter(const char* value, size_t size) { void OpDesc_Var::set_parameter(const char *value, size_t size) {
set_has_parameter(); set_has_parameter();
parameter_.SetNoArena( parameter_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Var.parameter)
} }
::std::string* OpDesc_Var::mutable_parameter() { ::std::string *OpDesc_Var::mutable_parameter() {
set_has_parameter(); set_has_parameter();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Var.parameter)
return parameter_.MutableNoArena( return parameter_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
::std::string* OpDesc_Var::release_parameter() { ::std::string *OpDesc_Var::release_parameter() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.Var.parameter)
clear_has_parameter(); clear_has_parameter();
return parameter_.ReleaseNoArena( return parameter_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
void OpDesc_Var::set_allocated_parameter(::std::string* parameter) { void OpDesc_Var::set_allocated_parameter(::std::string *parameter) {
if (parameter != NULL) { if (parameter != NULL) {
set_has_parameter(); set_has_parameter();
} else { } else {
...@@ -1663,62 +1659,63 @@ void OpDesc_Var::set_allocated_parameter(::std::string* parameter) { ...@@ -1663,62 +1659,63 @@ void OpDesc_Var::set_allocated_parameter(::std::string* parameter) {
// repeated string arguments = 2; // repeated string arguments = 2;
int OpDesc_Var::arguments_size() const { return arguments_.size(); } int OpDesc_Var::arguments_size() const { return arguments_.size(); }
void OpDesc_Var::clear_arguments() { arguments_.Clear(); } void OpDesc_Var::clear_arguments() { arguments_.Clear(); }
const ::std::string& OpDesc_Var::arguments(int index) const { const ::std::string &OpDesc_Var::arguments(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return arguments_.Get(index); return arguments_.Get(index);
} }
::std::string* OpDesc_Var::mutable_arguments(int index) { ::std::string *OpDesc_Var::mutable_arguments(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return arguments_.Mutable(index); return arguments_.Mutable(index);
} }
void OpDesc_Var::set_arguments(int index, const ::std::string& value) { void OpDesc_Var::set_arguments(int index, const ::std::string &value) {
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.arguments)
arguments_.Mutable(index)->assign(value); arguments_.Mutable(index)->assign(value);
} }
#if LANG_CXX11 #if LANG_CXX11
void OpDesc_Var::set_arguments(int index, ::std::string&& value) { void OpDesc_Var::set_arguments(int index, ::std::string &&value) {
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.arguments)
arguments_.Mutable(index)->assign(std::move(value)); arguments_.Mutable(index)->assign(std::move(value));
} }
#endif #endif
void OpDesc_Var::set_arguments(int index, const char* value) { void OpDesc_Var::set_arguments(int index, const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
arguments_.Mutable(index)->assign(value); arguments_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Var.arguments)
} }
void OpDesc_Var::set_arguments(int index, const char* value, size_t size) { void OpDesc_Var::set_arguments(int index, const char *value, size_t size) {
arguments_.Mutable(index)->assign(reinterpret_cast<const char*>(value), size); arguments_.Mutable(index)->assign(reinterpret_cast<const char *>(value),
size);
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Var.arguments)
} }
::std::string* OpDesc_Var::add_arguments() { ::std::string *OpDesc_Var::add_arguments() {
// @@protoc_insertion_point(field_add_mutable:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_add_mutable:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return arguments_.Add(); return arguments_.Add();
} }
void OpDesc_Var::add_arguments(const ::std::string& value) { void OpDesc_Var::add_arguments(const ::std::string &value) {
arguments_.Add()->assign(value); arguments_.Add()->assign(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Var.arguments)
} }
#if LANG_CXX11 #if LANG_CXX11
void OpDesc_Var::add_arguments(::std::string&& value) { void OpDesc_Var::add_arguments(::std::string &&value) {
arguments_.Add(std::move(value)); arguments_.Add(std::move(value));
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Var.arguments)
} }
#endif #endif
void OpDesc_Var::add_arguments(const char* value) { void OpDesc_Var::add_arguments(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
arguments_.Add()->assign(value); arguments_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_add_char:paddle_mobile.framework.proto.OpDesc.Var.arguments)
} }
void OpDesc_Var::add_arguments(const char* value, size_t size) { void OpDesc_Var::add_arguments(const char *value, size_t size) {
arguments_.Add()->assign(reinterpret_cast<const char*>(value), size); arguments_.Add()->assign(reinterpret_cast<const char *>(value), size);
// @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Var.arguments)
} }
const ::google::protobuf::RepeatedPtrField<::std::string>& const ::google::protobuf::RepeatedPtrField<::std::string> &
OpDesc_Var::arguments() const { OpDesc_Var::arguments() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return arguments_; return arguments_;
} }
::google::protobuf::RepeatedPtrField<::std::string>* ::google::protobuf::RepeatedPtrField<::std::string> *
OpDesc_Var::mutable_arguments() { OpDesc_Var::mutable_arguments() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return &arguments_; return &arguments_;
...@@ -1744,14 +1741,10 @@ OpDesc::OpDesc() ...@@ -1744,14 +1741,10 @@ OpDesc::OpDesc()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc)
} }
OpDesc::OpDesc(const OpDesc& from) OpDesc::OpDesc(const OpDesc &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0), inputs_(from.inputs_),
_has_bits_(from._has_bits_), outputs_(from.outputs_), attrs_(from.attrs_) {
_cached_size_(0),
inputs_(from.inputs_),
outputs_(from.outputs_),
attrs_(from.attrs_) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
type_.UnsafeSetDefault( type_.UnsafeSetDefault(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
...@@ -1786,13 +1779,13 @@ void OpDesc::SetCachedSize(int size) const { ...@@ -1786,13 +1779,13 @@ void OpDesc::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const OpDesc& OpDesc::default_instance() { const OpDesc &OpDesc::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
OpDesc* OpDesc::New(::google::protobuf::Arena* arena) const { OpDesc *OpDesc::New(::google::protobuf::Arena *arena) const {
OpDesc* n = new OpDesc; OpDesc *n = new OpDesc;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -1819,9 +1812,10 @@ void OpDesc::Clear() { ...@@ -1819,9 +1812,10 @@ void OpDesc::Clear() {
} }
bool OpDesc::MergePartialFromCodedStream( bool OpDesc::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -1835,15 +1829,16 @@ bool OpDesc::MergePartialFromCodedStream( ...@@ -1835,15 +1829,16 @@ bool OpDesc::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1; // repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1;
case 1: { case 1: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, add_inputs())); input, add_inputs()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -1854,8 +1849,8 @@ bool OpDesc::MergePartialFromCodedStream( ...@@ -1854,8 +1849,8 @@ bool OpDesc::MergePartialFromCodedStream(
case 2: { case 2: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, add_outputs())); input, add_outputs()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -1878,8 +1873,8 @@ bool OpDesc::MergePartialFromCodedStream( ...@@ -1878,8 +1873,8 @@ bool OpDesc::MergePartialFromCodedStream(
case 4: { case 4: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, add_attrs())); input, add_attrs()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -1921,7 +1916,7 @@ failure: ...@@ -1921,7 +1916,7 @@ failure:
} }
void OpDesc::SerializeWithCachedSizes( void OpDesc::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.OpDesc) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.OpDesc)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -2023,11 +2018,11 @@ size_t OpDesc::ByteSizeLong() const { ...@@ -2023,11 +2018,11 @@ size_t OpDesc::ByteSizeLong() const {
} }
void OpDesc::CheckTypeAndMergeFrom( void OpDesc::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const OpDesc*>(&from)); MergeFrom(*::google::protobuf::down_cast<const OpDesc *>(&from));
} }
void OpDesc::MergeFrom(const OpDesc& from) { void OpDesc::MergeFrom(const OpDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpDesc) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpDesc)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -2052,15 +2047,17 @@ void OpDesc::MergeFrom(const OpDesc& from) { ...@@ -2052,15 +2047,17 @@ void OpDesc::MergeFrom(const OpDesc& from) {
} }
} }
void OpDesc::CopyFrom(const OpDesc& from) { void OpDesc::CopyFrom(const OpDesc &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpDesc) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpDesc)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool OpDesc::IsInitialized() const { bool OpDesc::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; if ((_has_bits_[0] & 0x00000001) != 0x00000001)
return false;
if (!::google::protobuf::internal::AllAreInitialized(this->inputs())) if (!::google::protobuf::internal::AllAreInitialized(this->inputs()))
return false; return false;
if (!::google::protobuf::internal::AllAreInitialized(this->outputs())) if (!::google::protobuf::internal::AllAreInitialized(this->outputs()))
...@@ -2070,11 +2067,12 @@ bool OpDesc::IsInitialized() const { ...@@ -2070,11 +2067,12 @@ bool OpDesc::IsInitialized() const {
return true; return true;
} }
void OpDesc::Swap(OpDesc* other) { void OpDesc::Swap(OpDesc *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void OpDesc::InternalSwap(OpDesc* other) { void OpDesc::InternalSwap(OpDesc *other) {
using std::swap; using std::swap;
inputs_.InternalSwap(&other->inputs_); inputs_.InternalSwap(&other->inputs_);
outputs_.InternalSwap(&other->outputs_); outputs_.InternalSwap(&other->outputs_);
...@@ -2102,50 +2100,50 @@ void OpDesc::clear_type() { ...@@ -2102,50 +2100,50 @@ void OpDesc::clear_type() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_type(); clear_has_type();
} }
const ::std::string& OpDesc::type() const { const ::std::string &OpDesc::type() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.type)
return type_.GetNoArena(); return type_.GetNoArena();
} }
void OpDesc::set_type(const ::std::string& value) { void OpDesc::set_type(const ::std::string &value) {
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.type)
} }
#if LANG_CXX11 #if LANG_CXX11
void OpDesc::set_type(::std::string&& value) { void OpDesc::set_type(::std::string &&value) {
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.type)
} }
#endif #endif
void OpDesc::set_type(const char* value) { void OpDesc::set_type(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.type)
} }
void OpDesc::set_type(const char* value, size_t size) { void OpDesc::set_type(const char *value, size_t size) {
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.type)
} }
::std::string* OpDesc::mutable_type() { ::std::string *OpDesc::mutable_type() {
set_has_type(); set_has_type();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.type)
return type_.MutableNoArena( return type_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
::std::string* OpDesc::release_type() { ::std::string *OpDesc::release_type() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.type)
clear_has_type(); clear_has_type();
return type_.ReleaseNoArena( return type_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
void OpDesc::set_allocated_type(::std::string* type) { void OpDesc::set_allocated_type(::std::string *type) {
if (type != NULL) { if (type != NULL) {
set_has_type(); set_has_type();
} else { } else {
...@@ -2159,28 +2157,28 @@ void OpDesc::set_allocated_type(::std::string* type) { ...@@ -2159,28 +2157,28 @@ void OpDesc::set_allocated_type(::std::string* type) {
// repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1; // repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1;
int OpDesc::inputs_size() const { return inputs_.size(); } int OpDesc::inputs_size() const { return inputs_.size(); }
void OpDesc::clear_inputs() { inputs_.Clear(); } void OpDesc::clear_inputs() { inputs_.Clear(); }
const ::paddle_mobile::framework::proto::OpDesc_Var& OpDesc::inputs( const ::paddle_mobile::framework::proto::OpDesc_Var &
int index) const { OpDesc::inputs(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.inputs) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.inputs)
return inputs_.Get(index); return inputs_.Get(index);
} }
::paddle_mobile::framework::proto::OpDesc_Var* OpDesc::mutable_inputs( ::paddle_mobile::framework::proto::OpDesc_Var *
int index) { OpDesc::mutable_inputs(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.inputs) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.inputs)
return inputs_.Mutable(index); return inputs_.Mutable(index);
} }
::paddle_mobile::framework::proto::OpDesc_Var* OpDesc::add_inputs() { ::paddle_mobile::framework::proto::OpDesc_Var *OpDesc::add_inputs() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.inputs) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.inputs)
return inputs_.Add(); return inputs_.Add();
} }
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Var>* ::paddle_mobile::framework::proto::OpDesc_Var> *
OpDesc::mutable_inputs() { OpDesc::mutable_inputs() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.inputs) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.inputs)
return &inputs_; return &inputs_;
} }
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Var>& ::paddle_mobile::framework::proto::OpDesc_Var> &
OpDesc::inputs() const { OpDesc::inputs() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.inputs) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.inputs)
return inputs_; return inputs_;
...@@ -2189,28 +2187,28 @@ OpDesc::inputs() const { ...@@ -2189,28 +2187,28 @@ OpDesc::inputs() const {
// repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2; // repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2;
int OpDesc::outputs_size() const { return outputs_.size(); } int OpDesc::outputs_size() const { return outputs_.size(); }
void OpDesc::clear_outputs() { outputs_.Clear(); } void OpDesc::clear_outputs() { outputs_.Clear(); }
const ::paddle_mobile::framework::proto::OpDesc_Var& OpDesc::outputs( const ::paddle_mobile::framework::proto::OpDesc_Var &
int index) const { OpDesc::outputs(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.outputs) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.outputs)
return outputs_.Get(index); return outputs_.Get(index);
} }
::paddle_mobile::framework::proto::OpDesc_Var* OpDesc::mutable_outputs( ::paddle_mobile::framework::proto::OpDesc_Var *
int index) { OpDesc::mutable_outputs(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.outputs) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.outputs)
return outputs_.Mutable(index); return outputs_.Mutable(index);
} }
::paddle_mobile::framework::proto::OpDesc_Var* OpDesc::add_outputs() { ::paddle_mobile::framework::proto::OpDesc_Var *OpDesc::add_outputs() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.outputs) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.outputs)
return outputs_.Add(); return outputs_.Add();
} }
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Var>* ::paddle_mobile::framework::proto::OpDesc_Var> *
OpDesc::mutable_outputs() { OpDesc::mutable_outputs() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.outputs) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.outputs)
return &outputs_; return &outputs_;
} }
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Var>& ::paddle_mobile::framework::proto::OpDesc_Var> &
OpDesc::outputs() const { OpDesc::outputs() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.outputs) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.outputs)
return outputs_; return outputs_;
...@@ -2219,28 +2217,28 @@ OpDesc::outputs() const { ...@@ -2219,28 +2217,28 @@ OpDesc::outputs() const {
// repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4; // repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4;
int OpDesc::attrs_size() const { return attrs_.size(); } int OpDesc::attrs_size() const { return attrs_.size(); }
void OpDesc::clear_attrs() { attrs_.Clear(); } void OpDesc::clear_attrs() { attrs_.Clear(); }
const ::paddle_mobile::framework::proto::OpDesc_Attr& OpDesc::attrs( const ::paddle_mobile::framework::proto::OpDesc_Attr &
int index) const { OpDesc::attrs(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.attrs) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.attrs)
return attrs_.Get(index); return attrs_.Get(index);
} }
::paddle_mobile::framework::proto::OpDesc_Attr* OpDesc::mutable_attrs( ::paddle_mobile::framework::proto::OpDesc_Attr *
int index) { OpDesc::mutable_attrs(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.attrs) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.attrs)
return attrs_.Mutable(index); return attrs_.Mutable(index);
} }
::paddle_mobile::framework::proto::OpDesc_Attr* OpDesc::add_attrs() { ::paddle_mobile::framework::proto::OpDesc_Attr *OpDesc::add_attrs() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.attrs) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.attrs)
return attrs_.Add(); return attrs_.Add();
} }
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Attr>* ::paddle_mobile::framework::proto::OpDesc_Attr> *
OpDesc::mutable_attrs() { OpDesc::mutable_attrs() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.attrs) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.attrs)
return &attrs_; return &attrs_;
} }
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Attr>& ::paddle_mobile::framework::proto::OpDesc_Attr> &
OpDesc::attrs() const { OpDesc::attrs() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.attrs) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.attrs)
return attrs_; return attrs_;
...@@ -2286,11 +2284,9 @@ OpProto_Var::OpProto_Var() ...@@ -2286,11 +2284,9 @@ OpProto_Var::OpProto_Var()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto.Var) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto.Var)
} }
OpProto_Var::OpProto_Var(const OpProto_Var& from) OpProto_Var::OpProto_Var(const OpProto_Var &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0) {
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault( name_.UnsafeSetDefault(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
...@@ -2307,8 +2303,8 @@ OpProto_Var::OpProto_Var(const OpProto_Var& from) ...@@ -2307,8 +2303,8 @@ OpProto_Var::OpProto_Var(const OpProto_Var& from)
from.comment_); from.comment_);
} }
::memcpy(&duplicable_, &from.duplicable_, ::memcpy(&duplicable_, &from.duplicable_,
static_cast<size_t>(reinterpret_cast<char*>(&dispensable_) - static_cast<size_t>(reinterpret_cast<char *>(&dispensable_) -
reinterpret_cast<char*>(&duplicable_)) + reinterpret_cast<char *>(&duplicable_)) +
sizeof(dispensable_)); sizeof(dispensable_));
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.OpProto.Var) // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.OpProto.Var)
} }
...@@ -2320,8 +2316,8 @@ void OpProto_Var::SharedCtor() { ...@@ -2320,8 +2316,8 @@ void OpProto_Var::SharedCtor() {
comment_.UnsafeSetDefault( comment_.UnsafeSetDefault(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&duplicable_, 0, ::memset(&duplicable_, 0,
static_cast<size_t>(reinterpret_cast<char*>(&dispensable_) - static_cast<size_t>(reinterpret_cast<char *>(&dispensable_) -
reinterpret_cast<char*>(&duplicable_)) + reinterpret_cast<char *>(&duplicable_)) +
sizeof(dispensable_)); sizeof(dispensable_));
} }
...@@ -2342,13 +2338,13 @@ void OpProto_Var::SetCachedSize(int size) const { ...@@ -2342,13 +2338,13 @@ void OpProto_Var::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const OpProto_Var& OpProto_Var::default_instance() { const OpProto_Var &OpProto_Var::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
OpProto_Var* OpProto_Var::New(::google::protobuf::Arena* arena) const { OpProto_Var *OpProto_Var::New(::google::protobuf::Arena *arena) const {
OpProto_Var* n = new OpProto_Var; OpProto_Var *n = new OpProto_Var;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -2376,8 +2372,8 @@ void OpProto_Var::Clear() { ...@@ -2376,8 +2372,8 @@ void OpProto_Var::Clear() {
} }
if (cached_has_bits & 28u) { if (cached_has_bits & 28u) {
::memset(&duplicable_, 0, ::memset(&duplicable_, 0,
static_cast<size_t>(reinterpret_cast<char*>(&dispensable_) - static_cast<size_t>(reinterpret_cast<char *>(&dispensable_) -
reinterpret_cast<char*>(&duplicable_)) + reinterpret_cast<char *>(&duplicable_)) +
sizeof(dispensable_)); sizeof(dispensable_));
} }
_has_bits_.Clear(); _has_bits_.Clear();
...@@ -2385,9 +2381,10 @@ void OpProto_Var::Clear() { ...@@ -2385,9 +2381,10 @@ void OpProto_Var::Clear() {
} }
bool OpProto_Var::MergePartialFromCodedStream( bool OpProto_Var::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -2401,7 +2398,8 @@ bool OpProto_Var::MergePartialFromCodedStream( ...@@ -2401,7 +2398,8 @@ bool OpProto_Var::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required string name = 1; // required string name = 1;
...@@ -2491,7 +2489,7 @@ failure: ...@@ -2491,7 +2489,7 @@ failure:
} }
void OpProto_Var::SerializeWithCachedSizes( void OpProto_Var::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.OpProto.Var) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.OpProto.Var)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -2594,11 +2592,11 @@ size_t OpProto_Var::ByteSizeLong() const { ...@@ -2594,11 +2592,11 @@ size_t OpProto_Var::ByteSizeLong() const {
} }
void OpProto_Var::CheckTypeAndMergeFrom( void OpProto_Var::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const OpProto_Var*>(&from)); MergeFrom(*::google::protobuf::down_cast<const OpProto_Var *>(&from));
} }
void OpProto_Var::MergeFrom(const OpProto_Var& from) { void OpProto_Var::MergeFrom(const OpProto_Var &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpProto.Var) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpProto.Var)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -2632,23 +2630,26 @@ void OpProto_Var::MergeFrom(const OpProto_Var& from) { ...@@ -2632,23 +2630,26 @@ void OpProto_Var::MergeFrom(const OpProto_Var& from) {
} }
} }
void OpProto_Var::CopyFrom(const OpProto_Var& from) { void OpProto_Var::CopyFrom(const OpProto_Var &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpProto.Var) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpProto.Var)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool OpProto_Var::IsInitialized() const { bool OpProto_Var::IsInitialized() const {
if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; if ((_has_bits_[0] & 0x00000003) != 0x00000003)
return false;
return true; return true;
} }
void OpProto_Var::Swap(OpProto_Var* other) { void OpProto_Var::Swap(OpProto_Var *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void OpProto_Var::InternalSwap(OpProto_Var* other) { void OpProto_Var::InternalSwap(OpProto_Var *other) {
using std::swap; using std::swap;
name_.Swap(&other->name_); name_.Swap(&other->name_);
comment_.Swap(&other->comment_); comment_.Swap(&other->comment_);
...@@ -2678,50 +2679,50 @@ void OpProto_Var::clear_name() { ...@@ -2678,50 +2679,50 @@ void OpProto_Var::clear_name() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name(); clear_has_name();
} }
const ::std::string& OpProto_Var::name() const { const ::std::string &OpProto_Var::name() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Var.name)
return name_.GetNoArena(); return name_.GetNoArena();
} }
void OpProto_Var::set_name(const ::std::string& value) { void OpProto_Var::set_name(const ::std::string &value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Var.name)
} }
#if LANG_CXX11 #if LANG_CXX11
void OpProto_Var::set_name(::std::string&& value) { void OpProto_Var::set_name(::std::string &&value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Var.name)
} }
#endif #endif
void OpProto_Var::set_name(const char* value) { void OpProto_Var::set_name(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Var.name)
} }
void OpProto_Var::set_name(const char* value, size_t size) { void OpProto_Var::set_name(const char *value, size_t size) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Var.name)
} }
::std::string* OpProto_Var::mutable_name() { ::std::string *OpProto_Var::mutable_name() {
set_has_name(); set_has_name();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Var.name)
return name_.MutableNoArena( return name_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
::std::string* OpProto_Var::release_name() { ::std::string *OpProto_Var::release_name() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Var.name)
clear_has_name(); clear_has_name();
return name_.ReleaseNoArena( return name_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
void OpProto_Var::set_allocated_name(::std::string* name) { void OpProto_Var::set_allocated_name(::std::string *name) {
if (name != NULL) { if (name != NULL) {
set_has_name(); set_has_name();
} else { } else {
...@@ -2743,18 +2744,18 @@ void OpProto_Var::clear_comment() { ...@@ -2743,18 +2744,18 @@ void OpProto_Var::clear_comment() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_comment(); clear_has_comment();
} }
const ::std::string& OpProto_Var::comment() const { const ::std::string &OpProto_Var::comment() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Var.comment)
return comment_.GetNoArena(); return comment_.GetNoArena();
} }
void OpProto_Var::set_comment(const ::std::string& value) { void OpProto_Var::set_comment(const ::std::string &value) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Var.comment)
} }
#if LANG_CXX11 #if LANG_CXX11
void OpProto_Var::set_comment(::std::string&& value) { void OpProto_Var::set_comment(::std::string &&value) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
...@@ -2762,7 +2763,7 @@ void OpProto_Var::set_comment(::std::string&& value) { ...@@ -2762,7 +2763,7 @@ void OpProto_Var::set_comment(::std::string&& value) {
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Var.comment)
} }
#endif #endif
void OpProto_Var::set_comment(const char* value) { void OpProto_Var::set_comment(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
...@@ -2770,26 +2771,26 @@ void OpProto_Var::set_comment(const char* value) { ...@@ -2770,26 +2771,26 @@ void OpProto_Var::set_comment(const char* value) {
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Var.comment)
} }
void OpProto_Var::set_comment(const char* value, size_t size) { void OpProto_Var::set_comment(const char *value, size_t size) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Var.comment)
} }
::std::string* OpProto_Var::mutable_comment() { ::std::string *OpProto_Var::mutable_comment() {
set_has_comment(); set_has_comment();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Var.comment)
return comment_.MutableNoArena( return comment_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
::std::string* OpProto_Var::release_comment() { ::std::string *OpProto_Var::release_comment() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Var.comment)
clear_has_comment(); clear_has_comment();
return comment_.ReleaseNoArena( return comment_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
void OpProto_Var::set_allocated_comment(::std::string* comment) { void OpProto_Var::set_allocated_comment(::std::string *comment) {
if (comment != NULL) { if (comment != NULL) {
set_has_comment(); set_has_comment();
} else { } else {
...@@ -2879,11 +2880,9 @@ OpProto_Attr::OpProto_Attr() ...@@ -2879,11 +2880,9 @@ OpProto_Attr::OpProto_Attr()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto.Attr) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto.Attr)
} }
OpProto_Attr::OpProto_Attr(const OpProto_Attr& from) OpProto_Attr::OpProto_Attr(const OpProto_Attr &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0) {
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault( name_.UnsafeSetDefault(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
...@@ -2900,8 +2899,8 @@ OpProto_Attr::OpProto_Attr(const OpProto_Attr& from) ...@@ -2900,8 +2899,8 @@ OpProto_Attr::OpProto_Attr(const OpProto_Attr& from)
from.comment_); from.comment_);
} }
::memcpy(&type_, &from.type_, ::memcpy(&type_, &from.type_,
static_cast<size_t>(reinterpret_cast<char*>(&generated_) - static_cast<size_t>(reinterpret_cast<char *>(&generated_) -
reinterpret_cast<char*>(&type_)) + reinterpret_cast<char *>(&type_)) +
sizeof(generated_)); sizeof(generated_));
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.OpProto.Attr) // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.OpProto.Attr)
} }
...@@ -2912,8 +2911,9 @@ void OpProto_Attr::SharedCtor() { ...@@ -2912,8 +2911,9 @@ void OpProto_Attr::SharedCtor() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
comment_.UnsafeSetDefault( comment_.UnsafeSetDefault(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&type_, 0, static_cast<size_t>(reinterpret_cast<char*>(&generated_) - ::memset(&type_, 0,
reinterpret_cast<char*>(&type_)) + static_cast<size_t>(reinterpret_cast<char *>(&generated_) -
reinterpret_cast<char *>(&type_)) +
sizeof(generated_)); sizeof(generated_));
} }
...@@ -2934,13 +2934,13 @@ void OpProto_Attr::SetCachedSize(int size) const { ...@@ -2934,13 +2934,13 @@ void OpProto_Attr::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const OpProto_Attr& OpProto_Attr::default_instance() { const OpProto_Attr &OpProto_Attr::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
OpProto_Attr* OpProto_Attr::New(::google::protobuf::Arena* arena) const { OpProto_Attr *OpProto_Attr::New(::google::protobuf::Arena *arena) const {
OpProto_Attr* n = new OpProto_Attr; OpProto_Attr *n = new OpProto_Attr;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -2968,8 +2968,8 @@ void OpProto_Attr::Clear() { ...@@ -2968,8 +2968,8 @@ void OpProto_Attr::Clear() {
} }
if (cached_has_bits & 12u) { if (cached_has_bits & 12u) {
::memset(&type_, 0, ::memset(&type_, 0,
static_cast<size_t>(reinterpret_cast<char*>(&generated_) - static_cast<size_t>(reinterpret_cast<char *>(&generated_) -
reinterpret_cast<char*>(&type_)) + reinterpret_cast<char *>(&type_)) +
sizeof(generated_)); sizeof(generated_));
} }
_has_bits_.Clear(); _has_bits_.Clear();
...@@ -2977,9 +2977,10 @@ void OpProto_Attr::Clear() { ...@@ -2977,9 +2977,10 @@ void OpProto_Attr::Clear() {
} }
bool OpProto_Attr::MergePartialFromCodedStream( bool OpProto_Attr::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -2993,7 +2994,8 @@ bool OpProto_Attr::MergePartialFromCodedStream( ...@@ -2993,7 +2994,8 @@ bool OpProto_Attr::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required string name = 1; // required string name = 1;
...@@ -3017,8 +3019,8 @@ bool OpProto_Attr::MergePartialFromCodedStream( ...@@ -3017,8 +3019,8 @@ bool OpProto_Attr::MergePartialFromCodedStream(
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value))); input, &value)));
if (::paddle_mobile::framework::proto::AttrType_IsValid(value)) { if (::paddle_mobile::framework::proto::AttrType_IsValid(value)) {
set_type(static_cast<::paddle_mobile::framework::proto::AttrType>( set_type(
value)); static_cast<::paddle_mobile::framework::proto::AttrType>(value));
} else { } else {
unknown_fields_stream.WriteVarint32(16u); unknown_fields_stream.WriteVarint32(16u);
unknown_fields_stream.WriteVarint32( unknown_fields_stream.WriteVarint32(
...@@ -3077,7 +3079,7 @@ failure: ...@@ -3077,7 +3079,7 @@ failure:
} }
void OpProto_Attr::SerializeWithCachedSizes( void OpProto_Attr::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.OpProto.Attr) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.OpProto.Attr)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -3173,11 +3175,11 @@ size_t OpProto_Attr::ByteSizeLong() const { ...@@ -3173,11 +3175,11 @@ size_t OpProto_Attr::ByteSizeLong() const {
} }
void OpProto_Attr::CheckTypeAndMergeFrom( void OpProto_Attr::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const OpProto_Attr*>(&from)); MergeFrom(*::google::protobuf::down_cast<const OpProto_Attr *>(&from));
} }
void OpProto_Attr::MergeFrom(const OpProto_Attr& from) { void OpProto_Attr::MergeFrom(const OpProto_Attr &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpProto.Attr) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpProto.Attr)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -3208,23 +3210,26 @@ void OpProto_Attr::MergeFrom(const OpProto_Attr& from) { ...@@ -3208,23 +3210,26 @@ void OpProto_Attr::MergeFrom(const OpProto_Attr& from) {
} }
} }
void OpProto_Attr::CopyFrom(const OpProto_Attr& from) { void OpProto_Attr::CopyFrom(const OpProto_Attr &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpProto.Attr) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpProto.Attr)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool OpProto_Attr::IsInitialized() const { bool OpProto_Attr::IsInitialized() const {
if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; if ((_has_bits_[0] & 0x00000007) != 0x00000007)
return false;
return true; return true;
} }
void OpProto_Attr::Swap(OpProto_Attr* other) { void OpProto_Attr::Swap(OpProto_Attr *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void OpProto_Attr::InternalSwap(OpProto_Attr* other) { void OpProto_Attr::InternalSwap(OpProto_Attr *other) {
using std::swap; using std::swap;
name_.Swap(&other->name_); name_.Swap(&other->name_);
comment_.Swap(&other->comment_); comment_.Swap(&other->comment_);
...@@ -3253,50 +3258,50 @@ void OpProto_Attr::clear_name() { ...@@ -3253,50 +3258,50 @@ void OpProto_Attr::clear_name() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name(); clear_has_name();
} }
const ::std::string& OpProto_Attr::name() const { const ::std::string &OpProto_Attr::name() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Attr.name)
return name_.GetNoArena(); return name_.GetNoArena();
} }
void OpProto_Attr::set_name(const ::std::string& value) { void OpProto_Attr::set_name(const ::std::string &value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Attr.name)
} }
#if LANG_CXX11 #if LANG_CXX11
void OpProto_Attr::set_name(::std::string&& value) { void OpProto_Attr::set_name(::std::string &&value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Attr.name)
} }
#endif #endif
void OpProto_Attr::set_name(const char* value) { void OpProto_Attr::set_name(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Attr.name)
} }
void OpProto_Attr::set_name(const char* value, size_t size) { void OpProto_Attr::set_name(const char *value, size_t size) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Attr.name)
} }
::std::string* OpProto_Attr::mutable_name() { ::std::string *OpProto_Attr::mutable_name() {
set_has_name(); set_has_name();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Attr.name)
return name_.MutableNoArena( return name_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
::std::string* OpProto_Attr::release_name() { ::std::string *OpProto_Attr::release_name() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Attr.name)
clear_has_name(); clear_has_name();
return name_.ReleaseNoArena( return name_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
void OpProto_Attr::set_allocated_name(::std::string* name) { void OpProto_Attr::set_allocated_name(::std::string *name) {
if (name != NULL) { if (name != NULL) {
set_has_name(); set_has_name();
} else { } else {
...@@ -3339,18 +3344,18 @@ void OpProto_Attr::clear_comment() { ...@@ -3339,18 +3344,18 @@ void OpProto_Attr::clear_comment() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_comment(); clear_has_comment();
} }
const ::std::string& OpProto_Attr::comment() const { const ::std::string &OpProto_Attr::comment() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Attr.comment)
return comment_.GetNoArena(); return comment_.GetNoArena();
} }
void OpProto_Attr::set_comment(const ::std::string& value) { void OpProto_Attr::set_comment(const ::std::string &value) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Attr.comment)
} }
#if LANG_CXX11 #if LANG_CXX11
void OpProto_Attr::set_comment(::std::string&& value) { void OpProto_Attr::set_comment(::std::string &&value) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
...@@ -3358,7 +3363,7 @@ void OpProto_Attr::set_comment(::std::string&& value) { ...@@ -3358,7 +3363,7 @@ void OpProto_Attr::set_comment(::std::string&& value) {
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Attr.comment)
} }
#endif #endif
void OpProto_Attr::set_comment(const char* value) { void OpProto_Attr::set_comment(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
...@@ -3366,26 +3371,26 @@ void OpProto_Attr::set_comment(const char* value) { ...@@ -3366,26 +3371,26 @@ void OpProto_Attr::set_comment(const char* value) {
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Attr.comment)
} }
void OpProto_Attr::set_comment(const char* value, size_t size) { void OpProto_Attr::set_comment(const char *value, size_t size) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Attr.comment)
} }
::std::string* OpProto_Attr::mutable_comment() { ::std::string *OpProto_Attr::mutable_comment() {
set_has_comment(); set_has_comment();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Attr.comment)
return comment_.MutableNoArena( return comment_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
::std::string* OpProto_Attr::release_comment() { ::std::string *OpProto_Attr::release_comment() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Attr.comment)
clear_has_comment(); clear_has_comment();
return comment_.ReleaseNoArena( return comment_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
void OpProto_Attr::set_allocated_comment(::std::string* comment) { void OpProto_Attr::set_allocated_comment(::std::string *comment) {
if (comment != NULL) { if (comment != NULL) {
set_has_comment(); set_has_comment();
} else { } else {
...@@ -3436,14 +3441,10 @@ OpProto::OpProto() ...@@ -3436,14 +3441,10 @@ OpProto::OpProto()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto)
} }
OpProto::OpProto(const OpProto& from) OpProto::OpProto(const OpProto &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0), inputs_(from.inputs_),
_has_bits_(from._has_bits_), outputs_(from.outputs_), attrs_(from.attrs_) {
_cached_size_(0),
inputs_(from.inputs_),
outputs_(from.outputs_),
attrs_(from.attrs_) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
type_.UnsafeSetDefault( type_.UnsafeSetDefault(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
...@@ -3487,13 +3488,13 @@ void OpProto::SetCachedSize(int size) const { ...@@ -3487,13 +3488,13 @@ void OpProto::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const OpProto& OpProto::default_instance() { const OpProto &OpProto::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
OpProto* OpProto::New(::google::protobuf::Arena* arena) const { OpProto *OpProto::New(::google::protobuf::Arena *arena) const {
OpProto* n = new OpProto; OpProto *n = new OpProto;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -3527,9 +3528,10 @@ void OpProto::Clear() { ...@@ -3527,9 +3528,10 @@ void OpProto::Clear() {
} }
bool OpProto::MergePartialFromCodedStream( bool OpProto::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -3543,7 +3545,8 @@ bool OpProto::MergePartialFromCodedStream( ...@@ -3543,7 +3545,8 @@ bool OpProto::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required string type = 1; // required string type = 1;
...@@ -3562,8 +3565,8 @@ bool OpProto::MergePartialFromCodedStream( ...@@ -3562,8 +3565,8 @@ bool OpProto::MergePartialFromCodedStream(
case 2: { case 2: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, add_inputs())); input, add_inputs()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -3574,8 +3577,8 @@ bool OpProto::MergePartialFromCodedStream( ...@@ -3574,8 +3577,8 @@ bool OpProto::MergePartialFromCodedStream(
case 3: { case 3: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, add_outputs())); input, add_outputs()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -3586,8 +3589,8 @@ bool OpProto::MergePartialFromCodedStream( ...@@ -3586,8 +3589,8 @@ bool OpProto::MergePartialFromCodedStream(
case 4: { case 4: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, add_attrs())); input, add_attrs()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -3627,7 +3630,7 @@ failure: ...@@ -3627,7 +3630,7 @@ failure:
} }
void OpProto::SerializeWithCachedSizes( void OpProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.OpProto) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.OpProto)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -3750,11 +3753,11 @@ size_t OpProto::ByteSizeLong() const { ...@@ -3750,11 +3753,11 @@ size_t OpProto::ByteSizeLong() const {
} }
void OpProto::CheckTypeAndMergeFrom( void OpProto::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const OpProto*>(&from)); MergeFrom(*::google::protobuf::down_cast<const OpProto *>(&from));
} }
void OpProto::MergeFrom(const OpProto& from) { void OpProto::MergeFrom(const OpProto &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpProto) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpProto)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -3781,15 +3784,17 @@ void OpProto::MergeFrom(const OpProto& from) { ...@@ -3781,15 +3784,17 @@ void OpProto::MergeFrom(const OpProto& from) {
} }
} }
void OpProto::CopyFrom(const OpProto& from) { void OpProto::CopyFrom(const OpProto &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpProto) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpProto)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool OpProto::IsInitialized() const { bool OpProto::IsInitialized() const {
if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; if ((_has_bits_[0] & 0x00000003) != 0x00000003)
return false;
if (!::google::protobuf::internal::AllAreInitialized(this->inputs())) if (!::google::protobuf::internal::AllAreInitialized(this->inputs()))
return false; return false;
if (!::google::protobuf::internal::AllAreInitialized(this->outputs())) if (!::google::protobuf::internal::AllAreInitialized(this->outputs()))
...@@ -3799,11 +3804,12 @@ bool OpProto::IsInitialized() const { ...@@ -3799,11 +3804,12 @@ bool OpProto::IsInitialized() const {
return true; return true;
} }
void OpProto::Swap(OpProto* other) { void OpProto::Swap(OpProto *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void OpProto::InternalSwap(OpProto* other) { void OpProto::InternalSwap(OpProto *other) {
using std::swap; using std::swap;
inputs_.InternalSwap(&other->inputs_); inputs_.InternalSwap(&other->inputs_);
outputs_.InternalSwap(&other->outputs_); outputs_.InternalSwap(&other->outputs_);
...@@ -3831,50 +3837,50 @@ void OpProto::clear_type() { ...@@ -3831,50 +3837,50 @@ void OpProto::clear_type() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_type(); clear_has_type();
} }
const ::std::string& OpProto::type() const { const ::std::string &OpProto::type() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.type)
return type_.GetNoArena(); return type_.GetNoArena();
} }
void OpProto::set_type(const ::std::string& value) { void OpProto::set_type(const ::std::string &value) {
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.type)
} }
#if LANG_CXX11 #if LANG_CXX11
void OpProto::set_type(::std::string&& value) { void OpProto::set_type(::std::string &&value) {
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.type)
} }
#endif #endif
void OpProto::set_type(const char* value) { void OpProto::set_type(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.type)
} }
void OpProto::set_type(const char* value, size_t size) { void OpProto::set_type(const char *value, size_t size) {
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.type)
} }
::std::string* OpProto::mutable_type() { ::std::string *OpProto::mutable_type() {
set_has_type(); set_has_type();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.type)
return type_.MutableNoArena( return type_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
::std::string* OpProto::release_type() { ::std::string *OpProto::release_type() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.type)
clear_has_type(); clear_has_type();
return type_.ReleaseNoArena( return type_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
void OpProto::set_allocated_type(::std::string* type) { void OpProto::set_allocated_type(::std::string *type) {
if (type != NULL) { if (type != NULL) {
set_has_type(); set_has_type();
} else { } else {
...@@ -3888,28 +3894,28 @@ void OpProto::set_allocated_type(::std::string* type) { ...@@ -3888,28 +3894,28 @@ void OpProto::set_allocated_type(::std::string* type) {
// repeated .paddle_mobile.framework.proto.OpProto.Var inputs = 2; // repeated .paddle_mobile.framework.proto.OpProto.Var inputs = 2;
int OpProto::inputs_size() const { return inputs_.size(); } int OpProto::inputs_size() const { return inputs_.size(); }
void OpProto::clear_inputs() { inputs_.Clear(); } void OpProto::clear_inputs() { inputs_.Clear(); }
const ::paddle_mobile::framework::proto::OpProto_Var& OpProto::inputs( const ::paddle_mobile::framework::proto::OpProto_Var &
int index) const { OpProto::inputs(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.inputs) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.inputs)
return inputs_.Get(index); return inputs_.Get(index);
} }
::paddle_mobile::framework::proto::OpProto_Var* OpProto::mutable_inputs( ::paddle_mobile::framework::proto::OpProto_Var *
int index) { OpProto::mutable_inputs(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.inputs) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.inputs)
return inputs_.Mutable(index); return inputs_.Mutable(index);
} }
::paddle_mobile::framework::proto::OpProto_Var* OpProto::add_inputs() { ::paddle_mobile::framework::proto::OpProto_Var *OpProto::add_inputs() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpProto.inputs) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpProto.inputs)
return inputs_.Add(); return inputs_.Add();
} }
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Var>* ::paddle_mobile::framework::proto::OpProto_Var> *
OpProto::mutable_inputs() { OpProto::mutable_inputs() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.inputs) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.inputs)
return &inputs_; return &inputs_;
} }
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Var>& ::paddle_mobile::framework::proto::OpProto_Var> &
OpProto::inputs() const { OpProto::inputs() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.inputs) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.inputs)
return inputs_; return inputs_;
...@@ -3918,28 +3924,28 @@ OpProto::inputs() const { ...@@ -3918,28 +3924,28 @@ OpProto::inputs() const {
// repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3; // repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3;
int OpProto::outputs_size() const { return outputs_.size(); } int OpProto::outputs_size() const { return outputs_.size(); }
void OpProto::clear_outputs() { outputs_.Clear(); } void OpProto::clear_outputs() { outputs_.Clear(); }
const ::paddle_mobile::framework::proto::OpProto_Var& OpProto::outputs( const ::paddle_mobile::framework::proto::OpProto_Var &
int index) const { OpProto::outputs(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.outputs) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.outputs)
return outputs_.Get(index); return outputs_.Get(index);
} }
::paddle_mobile::framework::proto::OpProto_Var* OpProto::mutable_outputs( ::paddle_mobile::framework::proto::OpProto_Var *
int index) { OpProto::mutable_outputs(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.outputs) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.outputs)
return outputs_.Mutable(index); return outputs_.Mutable(index);
} }
::paddle_mobile::framework::proto::OpProto_Var* OpProto::add_outputs() { ::paddle_mobile::framework::proto::OpProto_Var *OpProto::add_outputs() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpProto.outputs) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpProto.outputs)
return outputs_.Add(); return outputs_.Add();
} }
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Var>* ::paddle_mobile::framework::proto::OpProto_Var> *
OpProto::mutable_outputs() { OpProto::mutable_outputs() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.outputs) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.outputs)
return &outputs_; return &outputs_;
} }
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Var>& ::paddle_mobile::framework::proto::OpProto_Var> &
OpProto::outputs() const { OpProto::outputs() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.outputs) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.outputs)
return outputs_; return outputs_;
...@@ -3948,28 +3954,28 @@ OpProto::outputs() const { ...@@ -3948,28 +3954,28 @@ OpProto::outputs() const {
// repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4; // repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4;
int OpProto::attrs_size() const { return attrs_.size(); } int OpProto::attrs_size() const { return attrs_.size(); }
void OpProto::clear_attrs() { attrs_.Clear(); } void OpProto::clear_attrs() { attrs_.Clear(); }
const ::paddle_mobile::framework::proto::OpProto_Attr& OpProto::attrs( const ::paddle_mobile::framework::proto::OpProto_Attr &
int index) const { OpProto::attrs(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.attrs) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.attrs)
return attrs_.Get(index); return attrs_.Get(index);
} }
::paddle_mobile::framework::proto::OpProto_Attr* OpProto::mutable_attrs( ::paddle_mobile::framework::proto::OpProto_Attr *
int index) { OpProto::mutable_attrs(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.attrs) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.attrs)
return attrs_.Mutable(index); return attrs_.Mutable(index);
} }
::paddle_mobile::framework::proto::OpProto_Attr* OpProto::add_attrs() { ::paddle_mobile::framework::proto::OpProto_Attr *OpProto::add_attrs() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpProto.attrs) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpProto.attrs)
return attrs_.Add(); return attrs_.Add();
} }
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Attr>* ::paddle_mobile::framework::proto::OpProto_Attr> *
OpProto::mutable_attrs() { OpProto::mutable_attrs() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.attrs) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.attrs)
return &attrs_; return &attrs_;
} }
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Attr>& ::paddle_mobile::framework::proto::OpProto_Attr> &
OpProto::attrs() const { OpProto::attrs() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.attrs) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.attrs)
return attrs_; return attrs_;
...@@ -3984,18 +3990,18 @@ void OpProto::clear_comment() { ...@@ -3984,18 +3990,18 @@ void OpProto::clear_comment() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_comment(); clear_has_comment();
} }
const ::std::string& OpProto::comment() const { const ::std::string &OpProto::comment() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.comment)
return comment_.GetNoArena(); return comment_.GetNoArena();
} }
void OpProto::set_comment(const ::std::string& value) { void OpProto::set_comment(const ::std::string &value) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.comment)
} }
#if LANG_CXX11 #if LANG_CXX11
void OpProto::set_comment(::std::string&& value) { void OpProto::set_comment(::std::string &&value) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
...@@ -4003,7 +4009,7 @@ void OpProto::set_comment(::std::string&& value) { ...@@ -4003,7 +4009,7 @@ void OpProto::set_comment(::std::string&& value) {
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.comment)
} }
#endif #endif
void OpProto::set_comment(const char* value) { void OpProto::set_comment(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
...@@ -4011,26 +4017,26 @@ void OpProto::set_comment(const char* value) { ...@@ -4011,26 +4017,26 @@ void OpProto::set_comment(const char* value) {
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.comment)
} }
void OpProto::set_comment(const char* value, size_t size) { void OpProto::set_comment(const char *value, size_t size) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.comment)
} }
::std::string* OpProto::mutable_comment() { ::std::string *OpProto::mutable_comment() {
set_has_comment(); set_has_comment();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.comment)
return comment_.MutableNoArena( return comment_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
::std::string* OpProto::release_comment() { ::std::string *OpProto::release_comment() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.comment)
clear_has_comment(); clear_has_comment();
return comment_.ReleaseNoArena( return comment_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
void OpProto::set_allocated_comment(::std::string* comment) { void OpProto::set_allocated_comment(::std::string *comment) {
if (comment != NULL) { if (comment != NULL) {
set_has_comment(); set_has_comment();
} else { } else {
...@@ -4058,12 +4064,9 @@ VarType_TensorDesc::VarType_TensorDesc() ...@@ -4058,12 +4064,9 @@ VarType_TensorDesc::VarType_TensorDesc()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.TensorDesc) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.TensorDesc)
} }
VarType_TensorDesc::VarType_TensorDesc(const VarType_TensorDesc& from) VarType_TensorDesc::VarType_TensorDesc(const VarType_TensorDesc &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0), dims_(from.dims_) {
_has_bits_(from._has_bits_),
_cached_size_(0),
dims_(from.dims_) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
data_type_ = from.data_type_; data_type_ = from.data_type_;
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.TensorDesc) // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.TensorDesc)
...@@ -4086,14 +4089,14 @@ void VarType_TensorDesc::SetCachedSize(int size) const { ...@@ -4086,14 +4089,14 @@ void VarType_TensorDesc::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const VarType_TensorDesc& VarType_TensorDesc::default_instance() { const VarType_TensorDesc &VarType_TensorDesc::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
VarType_TensorDesc* VarType_TensorDesc::New( VarType_TensorDesc *
::google::protobuf::Arena* arena) const { VarType_TensorDesc::New(::google::protobuf::Arena *arena) const {
VarType_TensorDesc* n = new VarType_TensorDesc; VarType_TensorDesc *n = new VarType_TensorDesc;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -4113,9 +4116,10 @@ void VarType_TensorDesc::Clear() { ...@@ -4113,9 +4116,10 @@ void VarType_TensorDesc::Clear() {
} }
bool VarType_TensorDesc::MergePartialFromCodedStream( bool VarType_TensorDesc::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -4129,7 +4133,8 @@ bool VarType_TensorDesc::MergePartialFromCodedStream( ...@@ -4129,7 +4133,8 @@ bool VarType_TensorDesc::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .paddle_mobile.framework.proto.VarType.Type data_type = 1; // required .paddle_mobile.framework.proto.VarType.Type data_type = 1;
...@@ -4160,16 +4165,13 @@ bool VarType_TensorDesc::MergePartialFromCodedStream( ...@@ -4160,16 +4165,13 @@ bool VarType_TensorDesc::MergePartialFromCodedStream(
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
DO_(( DO_((
::google::protobuf::internal::WireFormatLite:: ::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
ReadRepeatedPrimitive<
::google::protobuf::int64, ::google::protobuf::int64,
::google::protobuf::internal::WireFormatLite::TYPE_INT64>( ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1, 16u, input, this->mutable_dims()))); 1, 16u, input, this->mutable_dims())));
} else if (static_cast<::google::protobuf::uint8>(tag) == } else if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>( static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
18u /* 18 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::
DO_((
::google::protobuf::internal::WireFormatLite::
ReadPackedPrimitiveNoInline< ReadPackedPrimitiveNoInline<
::google::protobuf::int64, ::google::protobuf::int64,
::google::protobuf::internal::WireFormatLite::TYPE_INT64>( ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
...@@ -4201,7 +4203,7 @@ failure: ...@@ -4201,7 +4203,7 @@ failure:
} }
void VarType_TensorDesc::SerializeWithCachedSizes( void VarType_TensorDesc::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType.TensorDesc) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType.TensorDesc)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -4253,11 +4255,11 @@ size_t VarType_TensorDesc::ByteSizeLong() const { ...@@ -4253,11 +4255,11 @@ size_t VarType_TensorDesc::ByteSizeLong() const {
} }
void VarType_TensorDesc::CheckTypeAndMergeFrom( void VarType_TensorDesc::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const VarType_TensorDesc*>(&from)); MergeFrom(*::google::protobuf::down_cast<const VarType_TensorDesc *>(&from));
} }
void VarType_TensorDesc::MergeFrom(const VarType_TensorDesc& from) { void VarType_TensorDesc::MergeFrom(const VarType_TensorDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.TensorDesc) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.TensorDesc)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -4270,23 +4272,26 @@ void VarType_TensorDesc::MergeFrom(const VarType_TensorDesc& from) { ...@@ -4270,23 +4272,26 @@ void VarType_TensorDesc::MergeFrom(const VarType_TensorDesc& from) {
} }
} }
void VarType_TensorDesc::CopyFrom(const VarType_TensorDesc& from) { void VarType_TensorDesc::CopyFrom(const VarType_TensorDesc &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.TensorDesc) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.TensorDesc)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool VarType_TensorDesc::IsInitialized() const { bool VarType_TensorDesc::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; if ((_has_bits_[0] & 0x00000001) != 0x00000001)
return false;
return true; return true;
} }
void VarType_TensorDesc::Swap(VarType_TensorDesc* other) { void VarType_TensorDesc::Swap(VarType_TensorDesc *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void VarType_TensorDesc::InternalSwap(VarType_TensorDesc* other) { void VarType_TensorDesc::InternalSwap(VarType_TensorDesc *other) {
using std::swap; using std::swap;
dims_.InternalSwap(&other->dims_); dims_.InternalSwap(&other->dims_);
swap(data_type_, other->data_type_); swap(data_type_, other->data_type_);
...@@ -4314,8 +4319,8 @@ void VarType_TensorDesc::clear_data_type() { ...@@ -4314,8 +4319,8 @@ void VarType_TensorDesc::clear_data_type() {
data_type_ = 0; data_type_ = 0;
clear_has_data_type(); clear_has_data_type();
} }
::paddle_mobile::framework::proto::VarType_Type VarType_TensorDesc::data_type() ::paddle_mobile::framework::proto::VarType_Type
const { VarType_TensorDesc::data_type() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.TensorDesc.data_type) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.TensorDesc.data_type)
return static_cast<::paddle_mobile::framework::proto::VarType_Type>( return static_cast<::paddle_mobile::framework::proto::VarType_Type>(
data_type_); data_type_);
...@@ -4343,12 +4348,12 @@ void VarType_TensorDesc::add_dims(::google::protobuf::int64 value) { ...@@ -4343,12 +4348,12 @@ void VarType_TensorDesc::add_dims(::google::protobuf::int64 value) {
dims_.Add(value); dims_.Add(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.TensorDesc.dims) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
} }
const ::google::protobuf::RepeatedField<::google::protobuf::int64>& const ::google::protobuf::RepeatedField<::google::protobuf::int64> &
VarType_TensorDesc::dims() const { VarType_TensorDesc::dims() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
return dims_; return dims_;
} }
::google::protobuf::RepeatedField<::google::protobuf::int64>* ::google::protobuf::RepeatedField<::google::protobuf::int64> *
VarType_TensorDesc::mutable_dims() { VarType_TensorDesc::mutable_dims() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
return &dims_; return &dims_;
...@@ -4371,11 +4376,9 @@ VarType_LoDTensorDesc::VarType_LoDTensorDesc() ...@@ -4371,11 +4376,9 @@ VarType_LoDTensorDesc::VarType_LoDTensorDesc()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.LoDTensorDesc) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
} }
VarType_LoDTensorDesc::VarType_LoDTensorDesc(const VarType_LoDTensorDesc& from) VarType_LoDTensorDesc::VarType_LoDTensorDesc(const VarType_LoDTensorDesc &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0) {
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_tensor()) { if (from.has_tensor()) {
tensor_ = new ::paddle_mobile::framework::proto::VarType_TensorDesc( tensor_ = new ::paddle_mobile::framework::proto::VarType_TensorDesc(
...@@ -4390,8 +4393,8 @@ VarType_LoDTensorDesc::VarType_LoDTensorDesc(const VarType_LoDTensorDesc& from) ...@@ -4390,8 +4393,8 @@ VarType_LoDTensorDesc::VarType_LoDTensorDesc(const VarType_LoDTensorDesc& from)
void VarType_LoDTensorDesc::SharedCtor() { void VarType_LoDTensorDesc::SharedCtor() {
_cached_size_ = 0; _cached_size_ = 0;
::memset(&tensor_, 0, ::memset(&tensor_, 0,
static_cast<size_t>(reinterpret_cast<char*>(&lod_level_) - static_cast<size_t>(reinterpret_cast<char *>(&lod_level_) -
reinterpret_cast<char*>(&tensor_)) + reinterpret_cast<char *>(&tensor_)) +
sizeof(lod_level_)); sizeof(lod_level_));
} }
...@@ -4401,7 +4404,8 @@ VarType_LoDTensorDesc::~VarType_LoDTensorDesc() { ...@@ -4401,7 +4404,8 @@ VarType_LoDTensorDesc::~VarType_LoDTensorDesc() {
} }
void VarType_LoDTensorDesc::SharedDtor() { void VarType_LoDTensorDesc::SharedDtor() {
if (this != internal_default_instance()) delete tensor_; if (this != internal_default_instance())
delete tensor_;
} }
void VarType_LoDTensorDesc::SetCachedSize(int size) const { void VarType_LoDTensorDesc::SetCachedSize(int size) const {
...@@ -4409,14 +4413,14 @@ void VarType_LoDTensorDesc::SetCachedSize(int size) const { ...@@ -4409,14 +4413,14 @@ void VarType_LoDTensorDesc::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const VarType_LoDTensorDesc& VarType_LoDTensorDesc::default_instance() { const VarType_LoDTensorDesc &VarType_LoDTensorDesc::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
VarType_LoDTensorDesc* VarType_LoDTensorDesc::New( VarType_LoDTensorDesc *
::google::protobuf::Arena* arena) const { VarType_LoDTensorDesc::New(::google::protobuf::Arena *arena) const {
VarType_LoDTensorDesc* n = new VarType_LoDTensorDesc; VarType_LoDTensorDesc *n = new VarType_LoDTensorDesc;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -4439,9 +4443,10 @@ void VarType_LoDTensorDesc::Clear() { ...@@ -4439,9 +4443,10 @@ void VarType_LoDTensorDesc::Clear() {
} }
bool VarType_LoDTensorDesc::MergePartialFromCodedStream( bool VarType_LoDTensorDesc::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -4455,15 +4460,16 @@ bool VarType_LoDTensorDesc::MergePartialFromCodedStream( ...@@ -4455,15 +4460,16 @@ bool VarType_LoDTensorDesc::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .paddle_mobile.framework.proto.VarType.TensorDesc tensor = 1; // required .paddle_mobile.framework.proto.VarType.TensorDesc tensor = 1;
case 1: { case 1: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, mutable_tensor())); input, mutable_tensor()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -4506,7 +4512,7 @@ failure: ...@@ -4506,7 +4512,7 @@ failure:
} }
void VarType_LoDTensorDesc::SerializeWithCachedSizes( void VarType_LoDTensorDesc::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType.LoDTensorDesc) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -4556,12 +4562,12 @@ size_t VarType_LoDTensorDesc::ByteSizeLong() const { ...@@ -4556,12 +4562,12 @@ size_t VarType_LoDTensorDesc::ByteSizeLong() const {
} }
void VarType_LoDTensorDesc::CheckTypeAndMergeFrom( void VarType_LoDTensorDesc::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom( MergeFrom(
*::google::protobuf::down_cast<const VarType_LoDTensorDesc*>(&from)); *::google::protobuf::down_cast<const VarType_LoDTensorDesc *>(&from));
} }
void VarType_LoDTensorDesc::MergeFrom(const VarType_LoDTensorDesc& from) { void VarType_LoDTensorDesc::MergeFrom(const VarType_LoDTensorDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.LoDTensorDesc) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -4582,26 +4588,30 @@ void VarType_LoDTensorDesc::MergeFrom(const VarType_LoDTensorDesc& from) { ...@@ -4582,26 +4588,30 @@ void VarType_LoDTensorDesc::MergeFrom(const VarType_LoDTensorDesc& from) {
} }
} }
void VarType_LoDTensorDesc::CopyFrom(const VarType_LoDTensorDesc& from) { void VarType_LoDTensorDesc::CopyFrom(const VarType_LoDTensorDesc &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.LoDTensorDesc) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool VarType_LoDTensorDesc::IsInitialized() const { bool VarType_LoDTensorDesc::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; if ((_has_bits_[0] & 0x00000001) != 0x00000001)
return false;
if (has_tensor()) { if (has_tensor()) {
if (!this->tensor_->IsInitialized()) return false; if (!this->tensor_->IsInitialized())
return false;
} }
return true; return true;
} }
void VarType_LoDTensorDesc::Swap(VarType_LoDTensorDesc* other) { void VarType_LoDTensorDesc::Swap(VarType_LoDTensorDesc *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void VarType_LoDTensorDesc::InternalSwap(VarType_LoDTensorDesc* other) { void VarType_LoDTensorDesc::InternalSwap(VarType_LoDTensorDesc *other) {
using std::swap; using std::swap;
swap(tensor_, other->tensor_); swap(tensor_, other->tensor_);
swap(lod_level_, other->lod_level_); swap(lod_level_, other->lod_level_);
...@@ -4630,16 +4640,18 @@ void VarType_LoDTensorDesc::clear_tensor() { ...@@ -4630,16 +4640,18 @@ void VarType_LoDTensorDesc::clear_tensor() {
tensor_->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear(); tensor_->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear();
clear_has_tensor(); clear_has_tensor();
} }
const ::paddle_mobile::framework::proto::VarType_TensorDesc& const ::paddle_mobile::framework::proto::VarType_TensorDesc &
VarType_LoDTensorDesc::tensor() const { VarType_LoDTensorDesc::tensor() const {
const ::paddle_mobile::framework::proto::VarType_TensorDesc* p = tensor_; const ::paddle_mobile::framework::proto::VarType_TensorDesc *p = tensor_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor)
return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework:: return p != NULL
proto::VarType_TensorDesc*>( ? *p
&::paddle_mobile::framework::proto:: : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType_TensorDesc
*>(&::paddle_mobile::framework::proto::
_VarType_TensorDesc_default_instance_); _VarType_TensorDesc_default_instance_);
} }
::paddle_mobile::framework::proto::VarType_TensorDesc* ::paddle_mobile::framework::proto::VarType_TensorDesc *
VarType_LoDTensorDesc::mutable_tensor() { VarType_LoDTensorDesc::mutable_tensor() {
set_has_tensor(); set_has_tensor();
if (tensor_ == NULL) { if (tensor_ == NULL) {
...@@ -4648,16 +4660,16 @@ VarType_LoDTensorDesc::mutable_tensor() { ...@@ -4648,16 +4660,16 @@ VarType_LoDTensorDesc::mutable_tensor() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor)
return tensor_; return tensor_;
} }
::paddle_mobile::framework::proto::VarType_TensorDesc* ::paddle_mobile::framework::proto::VarType_TensorDesc *
VarType_LoDTensorDesc::release_tensor() { VarType_LoDTensorDesc::release_tensor() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor)
clear_has_tensor(); clear_has_tensor();
::paddle_mobile::framework::proto::VarType_TensorDesc* temp = tensor_; ::paddle_mobile::framework::proto::VarType_TensorDesc *temp = tensor_;
tensor_ = NULL; tensor_ = NULL;
return temp; return temp;
} }
void VarType_LoDTensorDesc::set_allocated_tensor( void VarType_LoDTensorDesc::set_allocated_tensor(
::paddle_mobile::framework::proto::VarType_TensorDesc* tensor) { ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor) {
delete tensor_; delete tensor_;
tensor_ = tensor; tensor_ = tensor;
if (tensor) { if (tensor) {
...@@ -4710,11 +4722,9 @@ VarType_LoDTensorArrayDesc::VarType_LoDTensorArrayDesc() ...@@ -4710,11 +4722,9 @@ VarType_LoDTensorArrayDesc::VarType_LoDTensorArrayDesc()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc)
} }
VarType_LoDTensorArrayDesc::VarType_LoDTensorArrayDesc( VarType_LoDTensorArrayDesc::VarType_LoDTensorArrayDesc(
const VarType_LoDTensorArrayDesc& from) const VarType_LoDTensorArrayDesc &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0) {
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_tensor()) { if (from.has_tensor()) {
tensor_ = new ::paddle_mobile::framework::proto::VarType_TensorDesc( tensor_ = new ::paddle_mobile::framework::proto::VarType_TensorDesc(
...@@ -4729,8 +4739,8 @@ VarType_LoDTensorArrayDesc::VarType_LoDTensorArrayDesc( ...@@ -4729,8 +4739,8 @@ VarType_LoDTensorArrayDesc::VarType_LoDTensorArrayDesc(
void VarType_LoDTensorArrayDesc::SharedCtor() { void VarType_LoDTensorArrayDesc::SharedCtor() {
_cached_size_ = 0; _cached_size_ = 0;
::memset(&tensor_, 0, ::memset(&tensor_, 0,
static_cast<size_t>(reinterpret_cast<char*>(&lod_level_) - static_cast<size_t>(reinterpret_cast<char *>(&lod_level_) -
reinterpret_cast<char*>(&tensor_)) + reinterpret_cast<char *>(&tensor_)) +
sizeof(lod_level_)); sizeof(lod_level_));
} }
...@@ -4740,7 +4750,8 @@ VarType_LoDTensorArrayDesc::~VarType_LoDTensorArrayDesc() { ...@@ -4740,7 +4750,8 @@ VarType_LoDTensorArrayDesc::~VarType_LoDTensorArrayDesc() {
} }
void VarType_LoDTensorArrayDesc::SharedDtor() { void VarType_LoDTensorArrayDesc::SharedDtor() {
if (this != internal_default_instance()) delete tensor_; if (this != internal_default_instance())
delete tensor_;
} }
void VarType_LoDTensorArrayDesc::SetCachedSize(int size) const { void VarType_LoDTensorArrayDesc::SetCachedSize(int size) const {
...@@ -4748,15 +4759,15 @@ void VarType_LoDTensorArrayDesc::SetCachedSize(int size) const { ...@@ -4748,15 +4759,15 @@ void VarType_LoDTensorArrayDesc::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const VarType_LoDTensorArrayDesc& const VarType_LoDTensorArrayDesc &
VarType_LoDTensorArrayDesc::default_instance() { VarType_LoDTensorArrayDesc::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
VarType_LoDTensorArrayDesc* VarType_LoDTensorArrayDesc::New( VarType_LoDTensorArrayDesc *
::google::protobuf::Arena* arena) const { VarType_LoDTensorArrayDesc::New(::google::protobuf::Arena *arena) const {
VarType_LoDTensorArrayDesc* n = new VarType_LoDTensorArrayDesc; VarType_LoDTensorArrayDesc *n = new VarType_LoDTensorArrayDesc;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -4779,9 +4790,10 @@ void VarType_LoDTensorArrayDesc::Clear() { ...@@ -4779,9 +4790,10 @@ void VarType_LoDTensorArrayDesc::Clear() {
} }
bool VarType_LoDTensorArrayDesc::MergePartialFromCodedStream( bool VarType_LoDTensorArrayDesc::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -4795,15 +4807,16 @@ bool VarType_LoDTensorArrayDesc::MergePartialFromCodedStream( ...@@ -4795,15 +4807,16 @@ bool VarType_LoDTensorArrayDesc::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .paddle_mobile.framework.proto.VarType.TensorDesc tensor = 1; // required .paddle_mobile.framework.proto.VarType.TensorDesc tensor = 1;
case 1: { case 1: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, mutable_tensor())); input, mutable_tensor()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -4846,7 +4859,7 @@ failure: ...@@ -4846,7 +4859,7 @@ failure:
} }
void VarType_LoDTensorArrayDesc::SerializeWithCachedSizes( void VarType_LoDTensorArrayDesc::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -4896,13 +4909,13 @@ size_t VarType_LoDTensorArrayDesc::ByteSizeLong() const { ...@@ -4896,13 +4909,13 @@ size_t VarType_LoDTensorArrayDesc::ByteSizeLong() const {
} }
void VarType_LoDTensorArrayDesc::CheckTypeAndMergeFrom( void VarType_LoDTensorArrayDesc::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom( MergeFrom(*::google::protobuf::down_cast<const VarType_LoDTensorArrayDesc *>(
*::google::protobuf::down_cast<const VarType_LoDTensorArrayDesc*>(&from)); &from));
} }
void VarType_LoDTensorArrayDesc::MergeFrom( void VarType_LoDTensorArrayDesc::MergeFrom(
const VarType_LoDTensorArrayDesc& from) { const VarType_LoDTensorArrayDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -4924,27 +4937,31 @@ void VarType_LoDTensorArrayDesc::MergeFrom( ...@@ -4924,27 +4937,31 @@ void VarType_LoDTensorArrayDesc::MergeFrom(
} }
void VarType_LoDTensorArrayDesc::CopyFrom( void VarType_LoDTensorArrayDesc::CopyFrom(
const VarType_LoDTensorArrayDesc& from) { const VarType_LoDTensorArrayDesc &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool VarType_LoDTensorArrayDesc::IsInitialized() const { bool VarType_LoDTensorArrayDesc::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; if ((_has_bits_[0] & 0x00000001) != 0x00000001)
return false;
if (has_tensor()) { if (has_tensor()) {
if (!this->tensor_->IsInitialized()) return false; if (!this->tensor_->IsInitialized())
return false;
} }
return true; return true;
} }
void VarType_LoDTensorArrayDesc::Swap(VarType_LoDTensorArrayDesc* other) { void VarType_LoDTensorArrayDesc::Swap(VarType_LoDTensorArrayDesc *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void VarType_LoDTensorArrayDesc::InternalSwap( void VarType_LoDTensorArrayDesc::InternalSwap(
VarType_LoDTensorArrayDesc* other) { VarType_LoDTensorArrayDesc *other) {
using std::swap; using std::swap;
swap(tensor_, other->tensor_); swap(tensor_, other->tensor_);
swap(lod_level_, other->lod_level_); swap(lod_level_, other->lod_level_);
...@@ -4975,16 +4992,18 @@ void VarType_LoDTensorArrayDesc::clear_tensor() { ...@@ -4975,16 +4992,18 @@ void VarType_LoDTensorArrayDesc::clear_tensor() {
tensor_->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear(); tensor_->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear();
clear_has_tensor(); clear_has_tensor();
} }
const ::paddle_mobile::framework::proto::VarType_TensorDesc& const ::paddle_mobile::framework::proto::VarType_TensorDesc &
VarType_LoDTensorArrayDesc::tensor() const { VarType_LoDTensorArrayDesc::tensor() const {
const ::paddle_mobile::framework::proto::VarType_TensorDesc* p = tensor_; const ::paddle_mobile::framework::proto::VarType_TensorDesc *p = tensor_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor)
return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework:: return p != NULL
proto::VarType_TensorDesc*>( ? *p
&::paddle_mobile::framework::proto:: : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType_TensorDesc
*>(&::paddle_mobile::framework::proto::
_VarType_TensorDesc_default_instance_); _VarType_TensorDesc_default_instance_);
} }
::paddle_mobile::framework::proto::VarType_TensorDesc* ::paddle_mobile::framework::proto::VarType_TensorDesc *
VarType_LoDTensorArrayDesc::mutable_tensor() { VarType_LoDTensorArrayDesc::mutable_tensor() {
set_has_tensor(); set_has_tensor();
if (tensor_ == NULL) { if (tensor_ == NULL) {
...@@ -4993,16 +5012,16 @@ VarType_LoDTensorArrayDesc::mutable_tensor() { ...@@ -4993,16 +5012,16 @@ VarType_LoDTensorArrayDesc::mutable_tensor() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor)
return tensor_; return tensor_;
} }
::paddle_mobile::framework::proto::VarType_TensorDesc* ::paddle_mobile::framework::proto::VarType_TensorDesc *
VarType_LoDTensorArrayDesc::release_tensor() { VarType_LoDTensorArrayDesc::release_tensor() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor)
clear_has_tensor(); clear_has_tensor();
::paddle_mobile::framework::proto::VarType_TensorDesc* temp = tensor_; ::paddle_mobile::framework::proto::VarType_TensorDesc *temp = tensor_;
tensor_ = NULL; tensor_ = NULL;
return temp; return temp;
} }
void VarType_LoDTensorArrayDesc::set_allocated_tensor( void VarType_LoDTensorArrayDesc::set_allocated_tensor(
::paddle_mobile::framework::proto::VarType_TensorDesc* tensor) { ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor) {
delete tensor_; delete tensor_;
tensor_ = tensor; tensor_ = tensor;
if (tensor) { if (tensor) {
...@@ -5054,11 +5073,9 @@ VarType_ReaderDesc::VarType_ReaderDesc() ...@@ -5054,11 +5073,9 @@ VarType_ReaderDesc::VarType_ReaderDesc()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.ReaderDesc) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.ReaderDesc)
} }
VarType_ReaderDesc::VarType_ReaderDesc(const VarType_ReaderDesc& from) VarType_ReaderDesc::VarType_ReaderDesc(const VarType_ReaderDesc &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0),
_has_bits_(from._has_bits_),
_cached_size_(0),
lod_tensor_(from.lod_tensor_) { lod_tensor_(from.lod_tensor_) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.ReaderDesc) // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.ReaderDesc)
...@@ -5078,14 +5095,14 @@ void VarType_ReaderDesc::SetCachedSize(int size) const { ...@@ -5078,14 +5095,14 @@ void VarType_ReaderDesc::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const VarType_ReaderDesc& VarType_ReaderDesc::default_instance() { const VarType_ReaderDesc &VarType_ReaderDesc::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
VarType_ReaderDesc* VarType_ReaderDesc::New( VarType_ReaderDesc *
::google::protobuf::Arena* arena) const { VarType_ReaderDesc::New(::google::protobuf::Arena *arena) const {
VarType_ReaderDesc* n = new VarType_ReaderDesc; VarType_ReaderDesc *n = new VarType_ReaderDesc;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -5104,9 +5121,10 @@ void VarType_ReaderDesc::Clear() { ...@@ -5104,9 +5121,10 @@ void VarType_ReaderDesc::Clear() {
} }
bool VarType_ReaderDesc::MergePartialFromCodedStream( bool VarType_ReaderDesc::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -5120,7 +5138,8 @@ bool VarType_ReaderDesc::MergePartialFromCodedStream( ...@@ -5120,7 +5138,8 @@ bool VarType_ReaderDesc::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .paddle_mobile.framework.proto.VarType.LoDTensorDesc // repeated .paddle_mobile.framework.proto.VarType.LoDTensorDesc
...@@ -5128,8 +5147,8 @@ bool VarType_ReaderDesc::MergePartialFromCodedStream( ...@@ -5128,8 +5147,8 @@ bool VarType_ReaderDesc::MergePartialFromCodedStream(
case 1: { case 1: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, add_lod_tensor())); input, add_lod_tensor()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -5157,7 +5176,7 @@ failure: ...@@ -5157,7 +5176,7 @@ failure:
} }
void VarType_ReaderDesc::SerializeWithCachedSizes( void VarType_ReaderDesc::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType.ReaderDesc) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType.ReaderDesc)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -5203,11 +5222,11 @@ size_t VarType_ReaderDesc::ByteSizeLong() const { ...@@ -5203,11 +5222,11 @@ size_t VarType_ReaderDesc::ByteSizeLong() const {
} }
void VarType_ReaderDesc::CheckTypeAndMergeFrom( void VarType_ReaderDesc::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const VarType_ReaderDesc*>(&from)); MergeFrom(*::google::protobuf::down_cast<const VarType_ReaderDesc *>(&from));
} }
void VarType_ReaderDesc::MergeFrom(const VarType_ReaderDesc& from) { void VarType_ReaderDesc::MergeFrom(const VarType_ReaderDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.ReaderDesc) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.ReaderDesc)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -5217,9 +5236,10 @@ void VarType_ReaderDesc::MergeFrom(const VarType_ReaderDesc& from) { ...@@ -5217,9 +5236,10 @@ void VarType_ReaderDesc::MergeFrom(const VarType_ReaderDesc& from) {
lod_tensor_.MergeFrom(from.lod_tensor_); lod_tensor_.MergeFrom(from.lod_tensor_);
} }
void VarType_ReaderDesc::CopyFrom(const VarType_ReaderDesc& from) { void VarType_ReaderDesc::CopyFrom(const VarType_ReaderDesc &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.ReaderDesc) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.ReaderDesc)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
...@@ -5230,11 +5250,12 @@ bool VarType_ReaderDesc::IsInitialized() const { ...@@ -5230,11 +5250,12 @@ bool VarType_ReaderDesc::IsInitialized() const {
return true; return true;
} }
void VarType_ReaderDesc::Swap(VarType_ReaderDesc* other) { void VarType_ReaderDesc::Swap(VarType_ReaderDesc *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void VarType_ReaderDesc::InternalSwap(VarType_ReaderDesc* other) { void VarType_ReaderDesc::InternalSwap(VarType_ReaderDesc *other) {
using std::swap; using std::swap;
lod_tensor_.InternalSwap(&other->lod_tensor_); lod_tensor_.InternalSwap(&other->lod_tensor_);
swap(_has_bits_[0], other->_has_bits_[0]); swap(_has_bits_[0], other->_has_bits_[0]);
...@@ -5252,29 +5273,29 @@ void VarType_ReaderDesc::InternalSwap(VarType_ReaderDesc* other) { ...@@ -5252,29 +5273,29 @@ void VarType_ReaderDesc::InternalSwap(VarType_ReaderDesc* other) {
// repeated .paddle_mobile.framework.proto.VarType.LoDTensorDesc lod_tensor = 1; // repeated .paddle_mobile.framework.proto.VarType.LoDTensorDesc lod_tensor = 1;
int VarType_ReaderDesc::lod_tensor_size() const { return lod_tensor_.size(); } int VarType_ReaderDesc::lod_tensor_size() const { return lod_tensor_.size(); }
void VarType_ReaderDesc::clear_lod_tensor() { lod_tensor_.Clear(); } void VarType_ReaderDesc::clear_lod_tensor() { lod_tensor_.Clear(); }
const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc& const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc &
VarType_ReaderDesc::lod_tensor(int index) const { VarType_ReaderDesc::lod_tensor(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return lod_tensor_.Get(index); return lod_tensor_.Get(index);
} }
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *
VarType_ReaderDesc::mutable_lod_tensor(int index) { VarType_ReaderDesc::mutable_lod_tensor(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return lod_tensor_.Mutable(index); return lod_tensor_.Mutable(index);
} }
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *
VarType_ReaderDesc::add_lod_tensor() { VarType_ReaderDesc::add_lod_tensor() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return lod_tensor_.Add(); return lod_tensor_.Add();
} }
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::VarType_LoDTensorDesc>* ::paddle_mobile::framework::proto::VarType_LoDTensorDesc> *
VarType_ReaderDesc::mutable_lod_tensor() { VarType_ReaderDesc::mutable_lod_tensor() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return &lod_tensor_; return &lod_tensor_;
} }
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::VarType_LoDTensorDesc>& ::paddle_mobile::framework::proto::VarType_LoDTensorDesc> &
VarType_ReaderDesc::lod_tensor() const { VarType_ReaderDesc::lod_tensor() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return lod_tensor_; return lod_tensor_;
...@@ -5297,15 +5318,13 @@ VarType_ChannelDesc::VarType_ChannelDesc() ...@@ -5297,15 +5318,13 @@ VarType_ChannelDesc::VarType_ChannelDesc()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.ChannelDesc) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.ChannelDesc)
} }
VarType_ChannelDesc::VarType_ChannelDesc(const VarType_ChannelDesc& from) VarType_ChannelDesc::VarType_ChannelDesc(const VarType_ChannelDesc &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0) {
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
::memcpy(&capacity_, &from.capacity_, ::memcpy(&capacity_, &from.capacity_,
static_cast<size_t>(reinterpret_cast<char*>(&data_type_) - static_cast<size_t>(reinterpret_cast<char *>(&data_type_) -
reinterpret_cast<char*>(&capacity_)) + reinterpret_cast<char *>(&capacity_)) +
sizeof(data_type_)); sizeof(data_type_));
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.ChannelDesc) // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.ChannelDesc)
} }
...@@ -5313,8 +5332,8 @@ VarType_ChannelDesc::VarType_ChannelDesc(const VarType_ChannelDesc& from) ...@@ -5313,8 +5332,8 @@ VarType_ChannelDesc::VarType_ChannelDesc(const VarType_ChannelDesc& from)
void VarType_ChannelDesc::SharedCtor() { void VarType_ChannelDesc::SharedCtor() {
_cached_size_ = 0; _cached_size_ = 0;
::memset(&capacity_, 0, ::memset(&capacity_, 0,
static_cast<size_t>(reinterpret_cast<char*>(&data_type_) - static_cast<size_t>(reinterpret_cast<char *>(&data_type_) -
reinterpret_cast<char*>(&capacity_)) + reinterpret_cast<char *>(&capacity_)) +
sizeof(data_type_)); sizeof(data_type_));
} }
...@@ -5330,14 +5349,14 @@ void VarType_ChannelDesc::SetCachedSize(int size) const { ...@@ -5330,14 +5349,14 @@ void VarType_ChannelDesc::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const VarType_ChannelDesc& VarType_ChannelDesc::default_instance() { const VarType_ChannelDesc &VarType_ChannelDesc::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
VarType_ChannelDesc* VarType_ChannelDesc::New( VarType_ChannelDesc *
::google::protobuf::Arena* arena) const { VarType_ChannelDesc::New(::google::protobuf::Arena *arena) const {
VarType_ChannelDesc* n = new VarType_ChannelDesc; VarType_ChannelDesc *n = new VarType_ChannelDesc;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -5353,8 +5372,8 @@ void VarType_ChannelDesc::Clear() { ...@@ -5353,8 +5372,8 @@ void VarType_ChannelDesc::Clear() {
cached_has_bits = _has_bits_[0]; cached_has_bits = _has_bits_[0];
if (cached_has_bits & 3u) { if (cached_has_bits & 3u) {
::memset(&capacity_, 0, ::memset(&capacity_, 0,
static_cast<size_t>(reinterpret_cast<char*>(&data_type_) - static_cast<size_t>(reinterpret_cast<char *>(&data_type_) -
reinterpret_cast<char*>(&capacity_)) + reinterpret_cast<char *>(&capacity_)) +
sizeof(data_type_)); sizeof(data_type_));
} }
_has_bits_.Clear(); _has_bits_.Clear();
...@@ -5362,9 +5381,10 @@ void VarType_ChannelDesc::Clear() { ...@@ -5362,9 +5381,10 @@ void VarType_ChannelDesc::Clear() {
} }
bool VarType_ChannelDesc::MergePartialFromCodedStream( bool VarType_ChannelDesc::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -5378,7 +5398,8 @@ bool VarType_ChannelDesc::MergePartialFromCodedStream( ...@@ -5378,7 +5398,8 @@ bool VarType_ChannelDesc::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .paddle_mobile.framework.proto.VarType.Type data_type = 1; // required .paddle_mobile.framework.proto.VarType.Type data_type = 1;
...@@ -5440,7 +5461,7 @@ failure: ...@@ -5440,7 +5461,7 @@ failure:
} }
void VarType_ChannelDesc::SerializeWithCachedSizes( void VarType_ChannelDesc::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType.ChannelDesc) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType.ChannelDesc)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -5509,11 +5530,11 @@ size_t VarType_ChannelDesc::ByteSizeLong() const { ...@@ -5509,11 +5530,11 @@ size_t VarType_ChannelDesc::ByteSizeLong() const {
} }
void VarType_ChannelDesc::CheckTypeAndMergeFrom( void VarType_ChannelDesc::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const VarType_ChannelDesc*>(&from)); MergeFrom(*::google::protobuf::down_cast<const VarType_ChannelDesc *>(&from));
} }
void VarType_ChannelDesc::MergeFrom(const VarType_ChannelDesc& from) { void VarType_ChannelDesc::MergeFrom(const VarType_ChannelDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.ChannelDesc) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.ChannelDesc)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -5532,23 +5553,26 @@ void VarType_ChannelDesc::MergeFrom(const VarType_ChannelDesc& from) { ...@@ -5532,23 +5553,26 @@ void VarType_ChannelDesc::MergeFrom(const VarType_ChannelDesc& from) {
} }
} }
void VarType_ChannelDesc::CopyFrom(const VarType_ChannelDesc& from) { void VarType_ChannelDesc::CopyFrom(const VarType_ChannelDesc &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.ChannelDesc) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.ChannelDesc)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool VarType_ChannelDesc::IsInitialized() const { bool VarType_ChannelDesc::IsInitialized() const {
if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; if ((_has_bits_[0] & 0x00000003) != 0x00000003)
return false;
return true; return true;
} }
void VarType_ChannelDesc::Swap(VarType_ChannelDesc* other) { void VarType_ChannelDesc::Swap(VarType_ChannelDesc *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void VarType_ChannelDesc::InternalSwap(VarType_ChannelDesc* other) { void VarType_ChannelDesc::InternalSwap(VarType_ChannelDesc *other) {
using std::swap; using std::swap;
swap(capacity_, other->capacity_); swap(capacity_, other->capacity_);
swap(data_type_, other->data_type_); swap(data_type_, other->data_type_);
...@@ -5576,8 +5600,8 @@ void VarType_ChannelDesc::clear_data_type() { ...@@ -5576,8 +5600,8 @@ void VarType_ChannelDesc::clear_data_type() {
data_type_ = 0; data_type_ = 0;
clear_has_data_type(); clear_has_data_type();
} }
::paddle_mobile::framework::proto::VarType_Type VarType_ChannelDesc::data_type() ::paddle_mobile::framework::proto::VarType_Type
const { VarType_ChannelDesc::data_type() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.ChannelDesc.data_type) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.ChannelDesc.data_type)
return static_cast<::paddle_mobile::framework::proto::VarType_Type>( return static_cast<::paddle_mobile::framework::proto::VarType_Type>(
data_type_); data_type_);
...@@ -5628,11 +5652,9 @@ VarType_Tuple::VarType_Tuple() ...@@ -5628,11 +5652,9 @@ VarType_Tuple::VarType_Tuple()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.Tuple) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.Tuple)
} }
VarType_Tuple::VarType_Tuple(const VarType_Tuple& from) VarType_Tuple::VarType_Tuple(const VarType_Tuple &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0),
_has_bits_(from._has_bits_),
_cached_size_(0),
element_type_(from.element_type_) { element_type_(from.element_type_) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.Tuple) // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.Tuple)
...@@ -5652,13 +5674,13 @@ void VarType_Tuple::SetCachedSize(int size) const { ...@@ -5652,13 +5674,13 @@ void VarType_Tuple::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const VarType_Tuple& VarType_Tuple::default_instance() { const VarType_Tuple &VarType_Tuple::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
VarType_Tuple* VarType_Tuple::New(::google::protobuf::Arena* arena) const { VarType_Tuple *VarType_Tuple::New(::google::protobuf::Arena *arena) const {
VarType_Tuple* n = new VarType_Tuple; VarType_Tuple *n = new VarType_Tuple;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -5677,9 +5699,10 @@ void VarType_Tuple::Clear() { ...@@ -5677,9 +5699,10 @@ void VarType_Tuple::Clear() {
} }
bool VarType_Tuple::MergePartialFromCodedStream( bool VarType_Tuple::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -5693,7 +5716,8 @@ bool VarType_Tuple::MergePartialFromCodedStream( ...@@ -5693,7 +5716,8 @@ bool VarType_Tuple::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .paddle_mobile.framework.proto.VarType.Type element_type = 1; // repeated .paddle_mobile.framework.proto.VarType.Type element_type = 1;
...@@ -5714,8 +5738,7 @@ bool VarType_Tuple::MergePartialFromCodedStream( ...@@ -5714,8 +5738,7 @@ bool VarType_Tuple::MergePartialFromCodedStream(
static_cast<::google::protobuf::uint32>(value)); static_cast<::google::protobuf::uint32>(value));
} }
} else if (static_cast<::google::protobuf::uint8>(tag) == } else if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>( static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
10u /* 10 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite:: DO_((::google::protobuf::internal::WireFormatLite::
ReadPackedEnumPreserveUnknowns( ReadPackedEnumPreserveUnknowns(
input, 1, input, 1,
...@@ -5748,7 +5771,7 @@ failure: ...@@ -5748,7 +5771,7 @@ failure:
} }
void VarType_Tuple::SerializeWithCachedSizes( void VarType_Tuple::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType.Tuple) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType.Tuple)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -5790,11 +5813,11 @@ size_t VarType_Tuple::ByteSizeLong() const { ...@@ -5790,11 +5813,11 @@ size_t VarType_Tuple::ByteSizeLong() const {
} }
void VarType_Tuple::CheckTypeAndMergeFrom( void VarType_Tuple::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const VarType_Tuple*>(&from)); MergeFrom(*::google::protobuf::down_cast<const VarType_Tuple *>(&from));
} }
void VarType_Tuple::MergeFrom(const VarType_Tuple& from) { void VarType_Tuple::MergeFrom(const VarType_Tuple &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.Tuple) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.Tuple)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -5804,20 +5827,22 @@ void VarType_Tuple::MergeFrom(const VarType_Tuple& from) { ...@@ -5804,20 +5827,22 @@ void VarType_Tuple::MergeFrom(const VarType_Tuple& from) {
element_type_.MergeFrom(from.element_type_); element_type_.MergeFrom(from.element_type_);
} }
void VarType_Tuple::CopyFrom(const VarType_Tuple& from) { void VarType_Tuple::CopyFrom(const VarType_Tuple &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.Tuple) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.Tuple)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool VarType_Tuple::IsInitialized() const { return true; } bool VarType_Tuple::IsInitialized() const { return true; }
void VarType_Tuple::Swap(VarType_Tuple* other) { void VarType_Tuple::Swap(VarType_Tuple *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void VarType_Tuple::InternalSwap(VarType_Tuple* other) { void VarType_Tuple::InternalSwap(VarType_Tuple *other) {
using std::swap; using std::swap;
element_type_.InternalSwap(&other->element_type_); element_type_.InternalSwap(&other->element_type_);
swap(_has_bits_[0], other->_has_bits_[0]); swap(_has_bits_[0], other->_has_bits_[0]);
...@@ -5835,8 +5860,8 @@ void VarType_Tuple::InternalSwap(VarType_Tuple* other) { ...@@ -5835,8 +5860,8 @@ void VarType_Tuple::InternalSwap(VarType_Tuple* other) {
// repeated .paddle_mobile.framework.proto.VarType.Type element_type = 1; // repeated .paddle_mobile.framework.proto.VarType.Type element_type = 1;
int VarType_Tuple::element_type_size() const { return element_type_.size(); } int VarType_Tuple::element_type_size() const { return element_type_.size(); }
void VarType_Tuple::clear_element_type() { element_type_.Clear(); } void VarType_Tuple::clear_element_type() { element_type_.Clear(); }
::paddle_mobile::framework::proto::VarType_Type VarType_Tuple::element_type( ::paddle_mobile::framework::proto::VarType_Type
int index) const { VarType_Tuple::element_type(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.Tuple.element_type) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.Tuple.element_type)
return static_cast<::paddle_mobile::framework::proto::VarType_Type>( return static_cast<::paddle_mobile::framework::proto::VarType_Type>(
element_type_.Get(index)); element_type_.Get(index));
...@@ -5853,12 +5878,12 @@ void VarType_Tuple::add_element_type( ...@@ -5853,12 +5878,12 @@ void VarType_Tuple::add_element_type(
element_type_.Add(value); element_type_.Add(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.Tuple.element_type) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.Tuple.element_type)
} }
const ::google::protobuf::RepeatedField<int>& VarType_Tuple::element_type() const ::google::protobuf::RepeatedField<int> &
const { VarType_Tuple::element_type() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.Tuple.element_type) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.Tuple.element_type)
return element_type_; return element_type_;
} }
::google::protobuf::RepeatedField<int>* VarType_Tuple::mutable_element_type() { ::google::protobuf::RepeatedField<int> *VarType_Tuple::mutable_element_type() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.Tuple.element_type) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.Tuple.element_type)
return &element_type_; return &element_type_;
} }
...@@ -5885,11 +5910,9 @@ VarType::VarType() ...@@ -5885,11 +5910,9 @@ VarType::VarType()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType)
} }
VarType::VarType(const VarType& from) VarType::VarType(const VarType &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0) {
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_selected_rows()) { if (from.has_selected_rows()) {
selected_rows_ = new ::paddle_mobile::framework::proto::VarType_TensorDesc( selected_rows_ = new ::paddle_mobile::framework::proto::VarType_TensorDesc(
...@@ -5934,8 +5957,8 @@ VarType::VarType(const VarType& from) ...@@ -5934,8 +5957,8 @@ VarType::VarType(const VarType& from)
void VarType::SharedCtor() { void VarType::SharedCtor() {
_cached_size_ = 0; _cached_size_ = 0;
::memset(&selected_rows_, 0, ::memset(&selected_rows_, 0,
static_cast<size_t>(reinterpret_cast<char*>(&type_) - static_cast<size_t>(reinterpret_cast<char *>(&type_) -
reinterpret_cast<char*>(&selected_rows_)) + reinterpret_cast<char *>(&selected_rows_)) +
sizeof(type_)); sizeof(type_));
} }
...@@ -5945,12 +5968,18 @@ VarType::~VarType() { ...@@ -5945,12 +5968,18 @@ VarType::~VarType() {
} }
void VarType::SharedDtor() { void VarType::SharedDtor() {
if (this != internal_default_instance()) delete selected_rows_; if (this != internal_default_instance())
if (this != internal_default_instance()) delete lod_tensor_; delete selected_rows_;
if (this != internal_default_instance()) delete tensor_array_; if (this != internal_default_instance())
if (this != internal_default_instance()) delete reader_; delete lod_tensor_;
if (this != internal_default_instance()) delete channel_; if (this != internal_default_instance())
if (this != internal_default_instance()) delete tuple_; delete tensor_array_;
if (this != internal_default_instance())
delete reader_;
if (this != internal_default_instance())
delete channel_;
if (this != internal_default_instance())
delete tuple_;
} }
void VarType::SetCachedSize(int size) const { void VarType::SetCachedSize(int size) const {
...@@ -5958,13 +5987,13 @@ void VarType::SetCachedSize(int size) const { ...@@ -5958,13 +5987,13 @@ void VarType::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const VarType& VarType::default_instance() { const VarType &VarType::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
VarType* VarType::New(::google::protobuf::Arena* arena) const { VarType *VarType::New(::google::protobuf::Arena *arena) const {
VarType* n = new VarType; VarType *n = new VarType;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -6013,9 +6042,10 @@ void VarType::Clear() { ...@@ -6013,9 +6042,10 @@ void VarType::Clear() {
} }
bool VarType::MergePartialFromCodedStream( bool VarType::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -6029,7 +6059,8 @@ bool VarType::MergePartialFromCodedStream( ...@@ -6029,7 +6059,8 @@ bool VarType::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .paddle_mobile.framework.proto.VarType.Type type = 1; // required .paddle_mobile.framework.proto.VarType.Type type = 1;
...@@ -6041,8 +6072,7 @@ bool VarType::MergePartialFromCodedStream( ...@@ -6041,8 +6072,7 @@ bool VarType::MergePartialFromCodedStream(
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value))); input, &value)));
if (::paddle_mobile::framework::proto::VarType_Type_IsValid(value)) { if (::paddle_mobile::framework::proto::VarType_Type_IsValid(value)) {
set_type( set_type(static_cast<::paddle_mobile::framework::proto::VarType_Type>(
static_cast<::paddle_mobile::framework::proto::VarType_Type>(
value)); value));
} else { } else {
unknown_fields_stream.WriteVarint32(8u); unknown_fields_stream.WriteVarint32(8u);
...@@ -6060,8 +6090,8 @@ bool VarType::MergePartialFromCodedStream( ...@@ -6060,8 +6090,8 @@ bool VarType::MergePartialFromCodedStream(
case 2: { case 2: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, mutable_selected_rows())); input, mutable_selected_rows()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -6073,8 +6103,8 @@ bool VarType::MergePartialFromCodedStream( ...@@ -6073,8 +6103,8 @@ bool VarType::MergePartialFromCodedStream(
case 3: { case 3: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, mutable_lod_tensor())); input, mutable_lod_tensor()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -6086,8 +6116,8 @@ bool VarType::MergePartialFromCodedStream( ...@@ -6086,8 +6116,8 @@ bool VarType::MergePartialFromCodedStream(
case 4: { case 4: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, mutable_tensor_array())); input, mutable_tensor_array()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -6098,8 +6128,8 @@ bool VarType::MergePartialFromCodedStream( ...@@ -6098,8 +6128,8 @@ bool VarType::MergePartialFromCodedStream(
case 5: { case 5: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { static_cast<::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, mutable_reader())); input, mutable_reader()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -6111,8 +6141,8 @@ bool VarType::MergePartialFromCodedStream( ...@@ -6111,8 +6141,8 @@ bool VarType::MergePartialFromCodedStream(
case 6: { case 6: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { static_cast<::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, mutable_channel())); input, mutable_channel()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -6123,8 +6153,8 @@ bool VarType::MergePartialFromCodedStream( ...@@ -6123,8 +6153,8 @@ bool VarType::MergePartialFromCodedStream(
case 7: { case 7: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { static_cast<::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, mutable_tuple())); input, mutable_tuple()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -6152,7 +6182,7 @@ failure: ...@@ -6152,7 +6182,7 @@ failure:
} }
void VarType::SerializeWithCachedSizes( void VarType::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarType)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -6280,11 +6310,11 @@ size_t VarType::ByteSizeLong() const { ...@@ -6280,11 +6310,11 @@ size_t VarType::ByteSizeLong() const {
} }
void VarType::CheckTypeAndMergeFrom( void VarType::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const VarType*>(&from)); MergeFrom(*::google::protobuf::down_cast<const VarType *>(&from));
} }
void VarType::MergeFrom(const VarType& from) { void VarType::MergeFrom(const VarType &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -6329,38 +6359,46 @@ void VarType::MergeFrom(const VarType& from) { ...@@ -6329,38 +6359,46 @@ void VarType::MergeFrom(const VarType& from) {
} }
} }
void VarType::CopyFrom(const VarType& from) { void VarType::CopyFrom(const VarType &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool VarType::IsInitialized() const { bool VarType::IsInitialized() const {
if ((_has_bits_[0] & 0x00000040) != 0x00000040) return false; if ((_has_bits_[0] & 0x00000040) != 0x00000040)
return false;
if (has_selected_rows()) { if (has_selected_rows()) {
if (!this->selected_rows_->IsInitialized()) return false; if (!this->selected_rows_->IsInitialized())
return false;
} }
if (has_lod_tensor()) { if (has_lod_tensor()) {
if (!this->lod_tensor_->IsInitialized()) return false; if (!this->lod_tensor_->IsInitialized())
return false;
} }
if (has_tensor_array()) { if (has_tensor_array()) {
if (!this->tensor_array_->IsInitialized()) return false; if (!this->tensor_array_->IsInitialized())
return false;
} }
if (has_reader()) { if (has_reader()) {
if (!this->reader_->IsInitialized()) return false; if (!this->reader_->IsInitialized())
return false;
} }
if (has_channel()) { if (has_channel()) {
if (!this->channel_->IsInitialized()) return false; if (!this->channel_->IsInitialized())
return false;
} }
return true; return true;
} }
void VarType::Swap(VarType* other) { void VarType::Swap(VarType *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void VarType::InternalSwap(VarType* other) { void VarType::InternalSwap(VarType *other) {
using std::swap; using std::swap;
swap(selected_rows_, other->selected_rows_); swap(selected_rows_, other->selected_rows_);
swap(lod_tensor_, other->lod_tensor_); swap(lod_tensor_, other->lod_tensor_);
...@@ -6412,17 +6450,19 @@ void VarType::clear_selected_rows() { ...@@ -6412,17 +6450,19 @@ void VarType::clear_selected_rows() {
->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear(); ->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear();
clear_has_selected_rows(); clear_has_selected_rows();
} }
const ::paddle_mobile::framework::proto::VarType_TensorDesc& const ::paddle_mobile::framework::proto::VarType_TensorDesc &
VarType::selected_rows() const { VarType::selected_rows() const {
const ::paddle_mobile::framework::proto::VarType_TensorDesc* p = const ::paddle_mobile::framework::proto::VarType_TensorDesc *p =
selected_rows_; selected_rows_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.selected_rows) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.selected_rows)
return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework:: return p != NULL
proto::VarType_TensorDesc*>( ? *p
&::paddle_mobile::framework::proto:: : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType_TensorDesc
*>(&::paddle_mobile::framework::proto::
_VarType_TensorDesc_default_instance_); _VarType_TensorDesc_default_instance_);
} }
::paddle_mobile::framework::proto::VarType_TensorDesc* ::paddle_mobile::framework::proto::VarType_TensorDesc *
VarType::mutable_selected_rows() { VarType::mutable_selected_rows() {
set_has_selected_rows(); set_has_selected_rows();
if (selected_rows_ == NULL) { if (selected_rows_ == NULL) {
...@@ -6431,16 +6471,16 @@ VarType::mutable_selected_rows() { ...@@ -6431,16 +6471,16 @@ VarType::mutable_selected_rows() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.selected_rows) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.selected_rows)
return selected_rows_; return selected_rows_;
} }
::paddle_mobile::framework::proto::VarType_TensorDesc* ::paddle_mobile::framework::proto::VarType_TensorDesc *
VarType::release_selected_rows() { VarType::release_selected_rows() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.selected_rows) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.selected_rows)
clear_has_selected_rows(); clear_has_selected_rows();
::paddle_mobile::framework::proto::VarType_TensorDesc* temp = selected_rows_; ::paddle_mobile::framework::proto::VarType_TensorDesc *temp = selected_rows_;
selected_rows_ = NULL; selected_rows_ = NULL;
return temp; return temp;
} }
void VarType::set_allocated_selected_rows( void VarType::set_allocated_selected_rows(
::paddle_mobile::framework::proto::VarType_TensorDesc* selected_rows) { ::paddle_mobile::framework::proto::VarType_TensorDesc *selected_rows) {
delete selected_rows_; delete selected_rows_;
selected_rows_ = selected_rows; selected_rows_ = selected_rows;
if (selected_rows) { if (selected_rows) {
...@@ -6463,17 +6503,17 @@ void VarType::clear_lod_tensor() { ...@@ -6463,17 +6503,17 @@ void VarType::clear_lod_tensor() {
->::paddle_mobile::framework::proto::VarType_LoDTensorDesc::Clear(); ->::paddle_mobile::framework::proto::VarType_LoDTensorDesc::Clear();
clear_has_lod_tensor(); clear_has_lod_tensor();
} }
const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc& const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc &
VarType::lod_tensor() const { VarType::lod_tensor() const {
const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* p = const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *p =
lod_tensor_; lod_tensor_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.lod_tensor) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.lod_tensor)
return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework:: return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework::
proto::VarType_LoDTensorDesc*>( proto::VarType_LoDTensorDesc *>(
&::paddle_mobile::framework::proto:: &::paddle_mobile::framework::proto::
_VarType_LoDTensorDesc_default_instance_); _VarType_LoDTensorDesc_default_instance_);
} }
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *
VarType::mutable_lod_tensor() { VarType::mutable_lod_tensor() {
set_has_lod_tensor(); set_has_lod_tensor();
if (lod_tensor_ == NULL) { if (lod_tensor_ == NULL) {
...@@ -6482,16 +6522,16 @@ VarType::mutable_lod_tensor() { ...@@ -6482,16 +6522,16 @@ VarType::mutable_lod_tensor() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.lod_tensor) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.lod_tensor)
return lod_tensor_; return lod_tensor_;
} }
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *
VarType::release_lod_tensor() { VarType::release_lod_tensor() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.lod_tensor) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.lod_tensor)
clear_has_lod_tensor(); clear_has_lod_tensor();
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* temp = lod_tensor_; ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *temp = lod_tensor_;
lod_tensor_ = NULL; lod_tensor_ = NULL;
return temp; return temp;
} }
void VarType::set_allocated_lod_tensor( void VarType::set_allocated_lod_tensor(
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* lod_tensor) { ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *lod_tensor) {
delete lod_tensor_; delete lod_tensor_;
lod_tensor_ = lod_tensor; lod_tensor_ = lod_tensor;
if (lod_tensor) { if (lod_tensor) {
...@@ -6515,18 +6555,18 @@ void VarType::clear_tensor_array() { ...@@ -6515,18 +6555,18 @@ void VarType::clear_tensor_array() {
VarType_LoDTensorArrayDesc::Clear(); VarType_LoDTensorArrayDesc::Clear();
clear_has_tensor_array(); clear_has_tensor_array();
} }
const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc& const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc &
VarType::tensor_array() const { VarType::tensor_array() const {
const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* p = const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *p =
tensor_array_; tensor_array_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tensor_array) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tensor_array)
return p != NULL ? *p return p != NULL ? *p
: *reinterpret_cast<const ::paddle_mobile::framework::proto:: : *reinterpret_cast<const ::paddle_mobile::framework::proto::
VarType_LoDTensorArrayDesc*>( VarType_LoDTensorArrayDesc *>(
&::paddle_mobile::framework::proto:: &::paddle_mobile::framework::proto::
_VarType_LoDTensorArrayDesc_default_instance_); _VarType_LoDTensorArrayDesc_default_instance_);
} }
::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *
VarType::mutable_tensor_array() { VarType::mutable_tensor_array() {
set_has_tensor_array(); set_has_tensor_array();
if (tensor_array_ == NULL) { if (tensor_array_ == NULL) {
...@@ -6536,18 +6576,18 @@ VarType::mutable_tensor_array() { ...@@ -6536,18 +6576,18 @@ VarType::mutable_tensor_array() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.tensor_array) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.tensor_array)
return tensor_array_; return tensor_array_;
} }
::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *
VarType::release_tensor_array() { VarType::release_tensor_array() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.tensor_array) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.tensor_array)
clear_has_tensor_array(); clear_has_tensor_array();
::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* temp = ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *temp =
tensor_array_; tensor_array_;
tensor_array_ = NULL; tensor_array_ = NULL;
return temp; return temp;
} }
void VarType::set_allocated_tensor_array( void VarType::set_allocated_tensor_array(
::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc
tensor_array) { *tensor_array) {
delete tensor_array_; delete tensor_array_;
tensor_array_ = tensor_array; tensor_array_ = tensor_array;
if (tensor_array) { if (tensor_array) {
...@@ -6567,16 +6607,18 @@ void VarType::clear_reader() { ...@@ -6567,16 +6607,18 @@ void VarType::clear_reader() {
reader_->::paddle_mobile::framework::proto::VarType_ReaderDesc::Clear(); reader_->::paddle_mobile::framework::proto::VarType_ReaderDesc::Clear();
clear_has_reader(); clear_has_reader();
} }
const ::paddle_mobile::framework::proto::VarType_ReaderDesc& VarType::reader() const ::paddle_mobile::framework::proto::VarType_ReaderDesc &
const { VarType::reader() const {
const ::paddle_mobile::framework::proto::VarType_ReaderDesc* p = reader_; const ::paddle_mobile::framework::proto::VarType_ReaderDesc *p = reader_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.reader) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.reader)
return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework:: return p != NULL
proto::VarType_ReaderDesc*>( ? *p
&::paddle_mobile::framework::proto:: : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType_ReaderDesc
*>(&::paddle_mobile::framework::proto::
_VarType_ReaderDesc_default_instance_); _VarType_ReaderDesc_default_instance_);
} }
::paddle_mobile::framework::proto::VarType_ReaderDesc* ::paddle_mobile::framework::proto::VarType_ReaderDesc *
VarType::mutable_reader() { VarType::mutable_reader() {
set_has_reader(); set_has_reader();
if (reader_ == NULL) { if (reader_ == NULL) {
...@@ -6585,16 +6627,16 @@ VarType::mutable_reader() { ...@@ -6585,16 +6627,16 @@ VarType::mutable_reader() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.reader) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.reader)
return reader_; return reader_;
} }
::paddle_mobile::framework::proto::VarType_ReaderDesc* ::paddle_mobile::framework::proto::VarType_ReaderDesc *
VarType::release_reader() { VarType::release_reader() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.reader) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.reader)
clear_has_reader(); clear_has_reader();
::paddle_mobile::framework::proto::VarType_ReaderDesc* temp = reader_; ::paddle_mobile::framework::proto::VarType_ReaderDesc *temp = reader_;
reader_ = NULL; reader_ = NULL;
return temp; return temp;
} }
void VarType::set_allocated_reader( void VarType::set_allocated_reader(
::paddle_mobile::framework::proto::VarType_ReaderDesc* reader) { ::paddle_mobile::framework::proto::VarType_ReaderDesc *reader) {
delete reader_; delete reader_;
reader_ = reader; reader_ = reader;
if (reader) { if (reader) {
...@@ -6614,16 +6656,18 @@ void VarType::clear_channel() { ...@@ -6614,16 +6656,18 @@ void VarType::clear_channel() {
channel_->::paddle_mobile::framework::proto::VarType_ChannelDesc::Clear(); channel_->::paddle_mobile::framework::proto::VarType_ChannelDesc::Clear();
clear_has_channel(); clear_has_channel();
} }
const ::paddle_mobile::framework::proto::VarType_ChannelDesc& VarType::channel() const ::paddle_mobile::framework::proto::VarType_ChannelDesc &
const { VarType::channel() const {
const ::paddle_mobile::framework::proto::VarType_ChannelDesc* p = channel_; const ::paddle_mobile::framework::proto::VarType_ChannelDesc *p = channel_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.channel) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.channel)
return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework:: return p != NULL
proto::VarType_ChannelDesc*>( ? *p
&::paddle_mobile::framework::proto:: : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType_ChannelDesc
*>(&::paddle_mobile::framework::proto::
_VarType_ChannelDesc_default_instance_); _VarType_ChannelDesc_default_instance_);
} }
::paddle_mobile::framework::proto::VarType_ChannelDesc* ::paddle_mobile::framework::proto::VarType_ChannelDesc *
VarType::mutable_channel() { VarType::mutable_channel() {
set_has_channel(); set_has_channel();
if (channel_ == NULL) { if (channel_ == NULL) {
...@@ -6632,16 +6676,16 @@ VarType::mutable_channel() { ...@@ -6632,16 +6676,16 @@ VarType::mutable_channel() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.channel) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.channel)
return channel_; return channel_;
} }
::paddle_mobile::framework::proto::VarType_ChannelDesc* ::paddle_mobile::framework::proto::VarType_ChannelDesc *
VarType::release_channel() { VarType::release_channel() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.channel) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.channel)
clear_has_channel(); clear_has_channel();
::paddle_mobile::framework::proto::VarType_ChannelDesc* temp = channel_; ::paddle_mobile::framework::proto::VarType_ChannelDesc *temp = channel_;
channel_ = NULL; channel_ = NULL;
return temp; return temp;
} }
void VarType::set_allocated_channel( void VarType::set_allocated_channel(
::paddle_mobile::framework::proto::VarType_ChannelDesc* channel) { ::paddle_mobile::framework::proto::VarType_ChannelDesc *channel) {
delete channel_; delete channel_;
channel_ = channel; channel_ = channel;
if (channel) { if (channel) {
...@@ -6661,17 +6705,17 @@ void VarType::clear_tuple() { ...@@ -6661,17 +6705,17 @@ void VarType::clear_tuple() {
tuple_->::paddle_mobile::framework::proto::VarType_Tuple::Clear(); tuple_->::paddle_mobile::framework::proto::VarType_Tuple::Clear();
clear_has_tuple(); clear_has_tuple();
} }
const ::paddle_mobile::framework::proto::VarType_Tuple& VarType::tuple() const { const ::paddle_mobile::framework::proto::VarType_Tuple &VarType::tuple() const {
const ::paddle_mobile::framework::proto::VarType_Tuple* p = tuple_; const ::paddle_mobile::framework::proto::VarType_Tuple *p = tuple_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tuple) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tuple)
return p != NULL return p != NULL
? *p ? *p
: *reinterpret_cast< : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType_Tuple*>( const ::paddle_mobile::framework::proto::VarType_Tuple *>(
&::paddle_mobile::framework::proto:: &::paddle_mobile::framework::proto::
_VarType_Tuple_default_instance_); _VarType_Tuple_default_instance_);
} }
::paddle_mobile::framework::proto::VarType_Tuple* VarType::mutable_tuple() { ::paddle_mobile::framework::proto::VarType_Tuple *VarType::mutable_tuple() {
set_has_tuple(); set_has_tuple();
if (tuple_ == NULL) { if (tuple_ == NULL) {
tuple_ = new ::paddle_mobile::framework::proto::VarType_Tuple; tuple_ = new ::paddle_mobile::framework::proto::VarType_Tuple;
...@@ -6679,15 +6723,15 @@ const ::paddle_mobile::framework::proto::VarType_Tuple& VarType::tuple() const { ...@@ -6679,15 +6723,15 @@ const ::paddle_mobile::framework::proto::VarType_Tuple& VarType::tuple() const {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.tuple) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.tuple)
return tuple_; return tuple_;
} }
::paddle_mobile::framework::proto::VarType_Tuple* VarType::release_tuple() { ::paddle_mobile::framework::proto::VarType_Tuple *VarType::release_tuple() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.tuple) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.tuple)
clear_has_tuple(); clear_has_tuple();
::paddle_mobile::framework::proto::VarType_Tuple* temp = tuple_; ::paddle_mobile::framework::proto::VarType_Tuple *temp = tuple_;
tuple_ = NULL; tuple_ = NULL;
return temp; return temp;
} }
void VarType::set_allocated_tuple( void VarType::set_allocated_tuple(
::paddle_mobile::framework::proto::VarType_Tuple* tuple) { ::paddle_mobile::framework::proto::VarType_Tuple *tuple) {
delete tuple_; delete tuple_;
tuple_ = tuple; tuple_ = tuple;
if (tuple) { if (tuple) {
...@@ -6716,11 +6760,9 @@ VarDesc::VarDesc() ...@@ -6716,11 +6760,9 @@ VarDesc::VarDesc()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarDesc) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarDesc)
} }
VarDesc::VarDesc(const VarDesc& from) VarDesc::VarDesc(const VarDesc &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0) {
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault( name_.UnsafeSetDefault(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
...@@ -6743,8 +6785,8 @@ void VarDesc::SharedCtor() { ...@@ -6743,8 +6785,8 @@ void VarDesc::SharedCtor() {
name_.UnsafeSetDefault( name_.UnsafeSetDefault(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&type_, 0, ::memset(&type_, 0,
static_cast<size_t>(reinterpret_cast<char*>(&persistable_) - static_cast<size_t>(reinterpret_cast<char *>(&persistable_) -
reinterpret_cast<char*>(&type_)) + reinterpret_cast<char *>(&type_)) +
sizeof(persistable_)); sizeof(persistable_));
} }
...@@ -6756,7 +6798,8 @@ VarDesc::~VarDesc() { ...@@ -6756,7 +6798,8 @@ VarDesc::~VarDesc() {
void VarDesc::SharedDtor() { void VarDesc::SharedDtor() {
name_.DestroyNoArena( name_.DestroyNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete type_; if (this != internal_default_instance())
delete type_;
} }
void VarDesc::SetCachedSize(int size) const { void VarDesc::SetCachedSize(int size) const {
...@@ -6764,13 +6807,13 @@ void VarDesc::SetCachedSize(int size) const { ...@@ -6764,13 +6807,13 @@ void VarDesc::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const VarDesc& VarDesc::default_instance() { const VarDesc &VarDesc::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
VarDesc* VarDesc::New(::google::protobuf::Arena* arena) const { VarDesc *VarDesc::New(::google::protobuf::Arena *arena) const {
VarDesc* n = new VarDesc; VarDesc *n = new VarDesc;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -6801,9 +6844,10 @@ void VarDesc::Clear() { ...@@ -6801,9 +6844,10 @@ void VarDesc::Clear() {
} }
bool VarDesc::MergePartialFromCodedStream( bool VarDesc::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -6817,7 +6861,8 @@ bool VarDesc::MergePartialFromCodedStream( ...@@ -6817,7 +6861,8 @@ bool VarDesc::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required string name = 1; // required string name = 1;
...@@ -6836,8 +6881,8 @@ bool VarDesc::MergePartialFromCodedStream( ...@@ -6836,8 +6881,8 @@ bool VarDesc::MergePartialFromCodedStream(
case 2: { case 2: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, mutable_type())); input, mutable_type()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -6879,7 +6924,7 @@ failure: ...@@ -6879,7 +6924,7 @@ failure:
} }
void VarDesc::SerializeWithCachedSizes( void VarDesc::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarDesc) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.VarDesc)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -6961,11 +7006,11 @@ size_t VarDesc::ByteSizeLong() const { ...@@ -6961,11 +7006,11 @@ size_t VarDesc::ByteSizeLong() const {
} }
void VarDesc::CheckTypeAndMergeFrom( void VarDesc::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const VarDesc*>(&from)); MergeFrom(*::google::protobuf::down_cast<const VarDesc *>(&from));
} }
void VarDesc::MergeFrom(const VarDesc& from) { void VarDesc::MergeFrom(const VarDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarDesc) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarDesc)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -6991,26 +7036,30 @@ void VarDesc::MergeFrom(const VarDesc& from) { ...@@ -6991,26 +7036,30 @@ void VarDesc::MergeFrom(const VarDesc& from) {
} }
} }
void VarDesc::CopyFrom(const VarDesc& from) { void VarDesc::CopyFrom(const VarDesc &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarDesc) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarDesc)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool VarDesc::IsInitialized() const { bool VarDesc::IsInitialized() const {
if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; if ((_has_bits_[0] & 0x00000003) != 0x00000003)
return false;
if (has_type()) { if (has_type()) {
if (!this->type_->IsInitialized()) return false; if (!this->type_->IsInitialized())
return false;
} }
return true; return true;
} }
void VarDesc::Swap(VarDesc* other) { void VarDesc::Swap(VarDesc *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void VarDesc::InternalSwap(VarDesc* other) { void VarDesc::InternalSwap(VarDesc *other) {
using std::swap; using std::swap;
name_.Swap(&other->name_); name_.Swap(&other->name_);
swap(type_, other->type_); swap(type_, other->type_);
...@@ -7036,50 +7085,50 @@ void VarDesc::clear_name() { ...@@ -7036,50 +7085,50 @@ void VarDesc::clear_name() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name(); clear_has_name();
} }
const ::std::string& VarDesc::name() const { const ::std::string &VarDesc::name() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarDesc.name)
return name_.GetNoArena(); return name_.GetNoArena();
} }
void VarDesc::set_name(const ::std::string& value) { void VarDesc::set_name(const ::std::string &value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarDesc.name)
} }
#if LANG_CXX11 #if LANG_CXX11
void VarDesc::set_name(::std::string&& value) { void VarDesc::set_name(::std::string &&value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.VarDesc.name)
} }
#endif #endif
void VarDesc::set_name(const char* value) { void VarDesc::set_name(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.VarDesc.name)
} }
void VarDesc::set_name(const char* value, size_t size) { void VarDesc::set_name(const char *value, size_t size) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.VarDesc.name)
} }
::std::string* VarDesc::mutable_name() { ::std::string *VarDesc::mutable_name() {
set_has_name(); set_has_name();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarDesc.name)
return name_.MutableNoArena( return name_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
::std::string* VarDesc::release_name() { ::std::string *VarDesc::release_name() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarDesc.name)
clear_has_name(); clear_has_name();
return name_.ReleaseNoArena( return name_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
void VarDesc::set_allocated_name(::std::string* name) { void VarDesc::set_allocated_name(::std::string *name) {
if (name != NULL) { if (name != NULL) {
set_has_name(); set_has_name();
} else { } else {
...@@ -7095,19 +7144,20 @@ bool VarDesc::has_type() const { return (_has_bits_[0] & 0x00000002u) != 0; } ...@@ -7095,19 +7144,20 @@ bool VarDesc::has_type() const { return (_has_bits_[0] & 0x00000002u) != 0; }
void VarDesc::set_has_type() { _has_bits_[0] |= 0x00000002u; } void VarDesc::set_has_type() { _has_bits_[0] |= 0x00000002u; }
void VarDesc::clear_has_type() { _has_bits_[0] &= ~0x00000002u; } void VarDesc::clear_has_type() { _has_bits_[0] &= ~0x00000002u; }
void VarDesc::clear_type() { void VarDesc::clear_type() {
if (type_ != NULL) type_->::paddle_mobile::framework::proto::VarType::Clear(); if (type_ != NULL)
type_->::paddle_mobile::framework::proto::VarType::Clear();
clear_has_type(); clear_has_type();
} }
const ::paddle_mobile::framework::proto::VarType& VarDesc::type() const { const ::paddle_mobile::framework::proto::VarType &VarDesc::type() const {
const ::paddle_mobile::framework::proto::VarType* p = type_; const ::paddle_mobile::framework::proto::VarType *p = type_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarDesc.type) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarDesc.type)
return p != NULL ? *p return p != NULL ? *p
: *reinterpret_cast< : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType*>( const ::paddle_mobile::framework::proto::VarType *>(
&::paddle_mobile::framework::proto:: &::paddle_mobile::framework::proto::
_VarType_default_instance_); _VarType_default_instance_);
} }
::paddle_mobile::framework::proto::VarType* VarDesc::mutable_type() { ::paddle_mobile::framework::proto::VarType *VarDesc::mutable_type() {
set_has_type(); set_has_type();
if (type_ == NULL) { if (type_ == NULL) {
type_ = new ::paddle_mobile::framework::proto::VarType; type_ = new ::paddle_mobile::framework::proto::VarType;
...@@ -7115,15 +7165,15 @@ const ::paddle_mobile::framework::proto::VarType& VarDesc::type() const { ...@@ -7115,15 +7165,15 @@ const ::paddle_mobile::framework::proto::VarType& VarDesc::type() const {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarDesc.type) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarDesc.type)
return type_; return type_;
} }
::paddle_mobile::framework::proto::VarType* VarDesc::release_type() { ::paddle_mobile::framework::proto::VarType *VarDesc::release_type() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarDesc.type) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarDesc.type)
clear_has_type(); clear_has_type();
::paddle_mobile::framework::proto::VarType* temp = type_; ::paddle_mobile::framework::proto::VarType *temp = type_;
type_ = NULL; type_ = NULL;
return temp; return temp;
} }
void VarDesc::set_allocated_type( void VarDesc::set_allocated_type(
::paddle_mobile::framework::proto::VarType* type) { ::paddle_mobile::framework::proto::VarType *type) {
delete type_; delete type_;
type_ = type; type_ = type;
if (type) { if (type) {
...@@ -7174,25 +7224,23 @@ BlockDesc::BlockDesc() ...@@ -7174,25 +7224,23 @@ BlockDesc::BlockDesc()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.BlockDesc) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.BlockDesc)
} }
BlockDesc::BlockDesc(const BlockDesc& from) BlockDesc::BlockDesc(const BlockDesc &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0), vars_(from.vars_),
_has_bits_(from._has_bits_),
_cached_size_(0),
vars_(from.vars_),
ops_(from.ops_) { ops_(from.ops_) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
::memcpy(&idx_, &from.idx_, ::memcpy(&idx_, &from.idx_,
static_cast<size_t>(reinterpret_cast<char*>(&forward_block_idx_) - static_cast<size_t>(reinterpret_cast<char *>(&forward_block_idx_) -
reinterpret_cast<char*>(&idx_)) + reinterpret_cast<char *>(&idx_)) +
sizeof(forward_block_idx_)); sizeof(forward_block_idx_));
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.BlockDesc) // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.BlockDesc)
} }
void BlockDesc::SharedCtor() { void BlockDesc::SharedCtor() {
_cached_size_ = 0; _cached_size_ = 0;
::memset(&idx_, 0, static_cast<size_t>(reinterpret_cast<char*>(&parent_idx_) - ::memset(&idx_, 0,
reinterpret_cast<char*>(&idx_)) + static_cast<size_t>(reinterpret_cast<char *>(&parent_idx_) -
reinterpret_cast<char *>(&idx_)) +
sizeof(parent_idx_)); sizeof(parent_idx_));
forward_block_idx_ = -1; forward_block_idx_ = -1;
} }
...@@ -7209,13 +7257,13 @@ void BlockDesc::SetCachedSize(int size) const { ...@@ -7209,13 +7257,13 @@ void BlockDesc::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const BlockDesc& BlockDesc::default_instance() { const BlockDesc &BlockDesc::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
BlockDesc* BlockDesc::New(::google::protobuf::Arena* arena) const { BlockDesc *BlockDesc::New(::google::protobuf::Arena *arena) const {
BlockDesc* n = new BlockDesc; BlockDesc *n = new BlockDesc;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -7233,8 +7281,8 @@ void BlockDesc::Clear() { ...@@ -7233,8 +7281,8 @@ void BlockDesc::Clear() {
cached_has_bits = _has_bits_[0]; cached_has_bits = _has_bits_[0];
if (cached_has_bits & 7u) { if (cached_has_bits & 7u) {
::memset(&idx_, 0, ::memset(&idx_, 0,
static_cast<size_t>(reinterpret_cast<char*>(&parent_idx_) - static_cast<size_t>(reinterpret_cast<char *>(&parent_idx_) -
reinterpret_cast<char*>(&idx_)) + reinterpret_cast<char *>(&idx_)) +
sizeof(parent_idx_)); sizeof(parent_idx_));
forward_block_idx_ = -1; forward_block_idx_ = -1;
} }
...@@ -7243,9 +7291,10 @@ void BlockDesc::Clear() { ...@@ -7243,9 +7291,10 @@ void BlockDesc::Clear() {
} }
bool BlockDesc::MergePartialFromCodedStream( bool BlockDesc::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -7259,7 +7308,8 @@ bool BlockDesc::MergePartialFromCodedStream( ...@@ -7259,7 +7308,8 @@ bool BlockDesc::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required int32 idx = 1; // required int32 idx = 1;
...@@ -7269,8 +7319,8 @@ bool BlockDesc::MergePartialFromCodedStream( ...@@ -7269,8 +7319,8 @@ bool BlockDesc::MergePartialFromCodedStream(
set_has_idx(); set_has_idx();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::int32,
::google::protobuf::internal::WireFormatLite::TYPE_INT32>( ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(input,
input, &idx_))); &idx_)));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -7296,8 +7346,8 @@ bool BlockDesc::MergePartialFromCodedStream( ...@@ -7296,8 +7346,8 @@ bool BlockDesc::MergePartialFromCodedStream(
case 3: { case 3: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, add_vars())); input, add_vars()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -7308,8 +7358,8 @@ bool BlockDesc::MergePartialFromCodedStream( ...@@ -7308,8 +7358,8 @@ bool BlockDesc::MergePartialFromCodedStream(
case 4: { case 4: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, add_ops())); input, add_ops()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -7352,7 +7402,7 @@ failure: ...@@ -7352,7 +7402,7 @@ failure:
} }
void BlockDesc::SerializeWithCachedSizes( void BlockDesc::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.BlockDesc) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.BlockDesc)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -7469,11 +7519,11 @@ size_t BlockDesc::ByteSizeLong() const { ...@@ -7469,11 +7519,11 @@ size_t BlockDesc::ByteSizeLong() const {
} }
void BlockDesc::CheckTypeAndMergeFrom( void BlockDesc::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const BlockDesc*>(&from)); MergeFrom(*::google::protobuf::down_cast<const BlockDesc *>(&from));
} }
void BlockDesc::MergeFrom(const BlockDesc& from) { void BlockDesc::MergeFrom(const BlockDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.BlockDesc) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.BlockDesc)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -7497,15 +7547,17 @@ void BlockDesc::MergeFrom(const BlockDesc& from) { ...@@ -7497,15 +7547,17 @@ void BlockDesc::MergeFrom(const BlockDesc& from) {
} }
} }
void BlockDesc::CopyFrom(const BlockDesc& from) { void BlockDesc::CopyFrom(const BlockDesc &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.BlockDesc) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.BlockDesc)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
bool BlockDesc::IsInitialized() const { bool BlockDesc::IsInitialized() const {
if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; if ((_has_bits_[0] & 0x00000003) != 0x00000003)
return false;
if (!::google::protobuf::internal::AllAreInitialized(this->vars())) if (!::google::protobuf::internal::AllAreInitialized(this->vars()))
return false; return false;
if (!::google::protobuf::internal::AllAreInitialized(this->ops())) if (!::google::protobuf::internal::AllAreInitialized(this->ops()))
...@@ -7513,11 +7565,12 @@ bool BlockDesc::IsInitialized() const { ...@@ -7513,11 +7565,12 @@ bool BlockDesc::IsInitialized() const {
return true; return true;
} }
void BlockDesc::Swap(BlockDesc* other) { void BlockDesc::Swap(BlockDesc *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void BlockDesc::InternalSwap(BlockDesc* other) { void BlockDesc::InternalSwap(BlockDesc *other) {
using std::swap; using std::swap;
vars_.InternalSwap(&other->vars_); vars_.InternalSwap(&other->vars_);
ops_.InternalSwap(&other->ops_); ops_.InternalSwap(&other->ops_);
...@@ -7577,27 +7630,26 @@ void BlockDesc::set_parent_idx(::google::protobuf::int32 value) { ...@@ -7577,27 +7630,26 @@ void BlockDesc::set_parent_idx(::google::protobuf::int32 value) {
// repeated .paddle_mobile.framework.proto.VarDesc vars = 3; // repeated .paddle_mobile.framework.proto.VarDesc vars = 3;
int BlockDesc::vars_size() const { return vars_.size(); } int BlockDesc::vars_size() const { return vars_.size(); }
void BlockDesc::clear_vars() { vars_.Clear(); } void BlockDesc::clear_vars() { vars_.Clear(); }
const ::paddle_mobile::framework::proto::VarDesc& BlockDesc::vars( const ::paddle_mobile::framework::proto::VarDesc &
int index) const { BlockDesc::vars(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.vars) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.vars)
return vars_.Get(index); return vars_.Get(index);
} }
::paddle_mobile::framework::proto::VarDesc* BlockDesc::mutable_vars(int index) { ::paddle_mobile::framework::proto::VarDesc *BlockDesc::mutable_vars(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.vars) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.vars)
return vars_.Mutable(index); return vars_.Mutable(index);
} }
::paddle_mobile::framework::proto::VarDesc* BlockDesc::add_vars() { ::paddle_mobile::framework::proto::VarDesc *BlockDesc::add_vars() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.BlockDesc.vars) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.BlockDesc.vars)
return vars_.Add(); return vars_.Add();
} }
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<::paddle_mobile::framework::proto::VarDesc>
::paddle_mobile::framework::proto::VarDesc>* *BlockDesc::mutable_vars() {
BlockDesc::mutable_vars() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.vars) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.vars)
return &vars_; return &vars_;
} }
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::VarDesc>& ::paddle_mobile::framework::proto::VarDesc> &
BlockDesc::vars() const { BlockDesc::vars() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.vars) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.vars)
return vars_; return vars_;
...@@ -7606,26 +7658,26 @@ BlockDesc::vars() const { ...@@ -7606,26 +7658,26 @@ BlockDesc::vars() const {
// repeated .paddle_mobile.framework.proto.OpDesc ops = 4; // repeated .paddle_mobile.framework.proto.OpDesc ops = 4;
int BlockDesc::ops_size() const { return ops_.size(); } int BlockDesc::ops_size() const { return ops_.size(); }
void BlockDesc::clear_ops() { ops_.Clear(); } void BlockDesc::clear_ops() { ops_.Clear(); }
const ::paddle_mobile::framework::proto::OpDesc& BlockDesc::ops( const ::paddle_mobile::framework::proto::OpDesc &
int index) const { BlockDesc::ops(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.ops) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.ops)
return ops_.Get(index); return ops_.Get(index);
} }
::paddle_mobile::framework::proto::OpDesc* BlockDesc::mutable_ops(int index) { ::paddle_mobile::framework::proto::OpDesc *BlockDesc::mutable_ops(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.ops) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.ops)
return ops_.Mutable(index); return ops_.Mutable(index);
} }
::paddle_mobile::framework::proto::OpDesc* BlockDesc::add_ops() { ::paddle_mobile::framework::proto::OpDesc *BlockDesc::add_ops() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.BlockDesc.ops) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.BlockDesc.ops)
return ops_.Add(); return ops_.Add();
} }
::google::protobuf::RepeatedPtrField<::paddle_mobile::framework::proto::OpDesc>* ::google::protobuf::RepeatedPtrField<::paddle_mobile::framework::proto::OpDesc>
BlockDesc::mutable_ops() { *BlockDesc::mutable_ops() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.ops) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.ops)
return &ops_; return &ops_;
} }
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc>& ::paddle_mobile::framework::proto::OpDesc> &
BlockDesc::ops() const { BlockDesc::ops() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.ops) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.ops)
return ops_; return ops_;
...@@ -7667,12 +7719,9 @@ ProgramDesc::ProgramDesc() ...@@ -7667,12 +7719,9 @@ ProgramDesc::ProgramDesc()
SharedCtor(); SharedCtor();
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.ProgramDesc) // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.ProgramDesc)
} }
ProgramDesc::ProgramDesc(const ProgramDesc& from) ProgramDesc::ProgramDesc(const ProgramDesc &from)
: ::google::protobuf::MessageLite(), : ::google::protobuf::MessageLite(), _internal_metadata_(NULL),
_internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0), blocks_(from.blocks_) {
_has_bits_(from._has_bits_),
_cached_size_(0),
blocks_(from.blocks_) {
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.ProgramDesc) // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.ProgramDesc)
} }
...@@ -7691,13 +7740,13 @@ void ProgramDesc::SetCachedSize(int size) const { ...@@ -7691,13 +7740,13 @@ void ProgramDesc::SetCachedSize(int size) const {
_cached_size_ = size; _cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END(); GOOGLE_SAFE_CONCURRENT_WRITES_END();
} }
const ProgramDesc& ProgramDesc::default_instance() { const ProgramDesc &ProgramDesc::default_instance() {
protobuf_framework_2eproto::InitDefaults(); protobuf_framework_2eproto::InitDefaults();
return *internal_default_instance(); return *internal_default_instance();
} }
ProgramDesc* ProgramDesc::New(::google::protobuf::Arena* arena) const { ProgramDesc *ProgramDesc::New(::google::protobuf::Arena *arena) const {
ProgramDesc* n = new ProgramDesc; ProgramDesc *n = new ProgramDesc;
if (arena != NULL) { if (arena != NULL) {
arena->Own(n); arena->Own(n);
} }
...@@ -7716,9 +7765,10 @@ void ProgramDesc::Clear() { ...@@ -7716,9 +7765,10 @@ void ProgramDesc::Clear() {
} }
bool ProgramDesc::MergePartialFromCodedStream( bool ProgramDesc::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) { ::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \ #define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag; ::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback( ::google::protobuf::NewPermanentCallback(
...@@ -7732,15 +7782,16 @@ bool ProgramDesc::MergePartialFromCodedStream( ...@@ -7732,15 +7782,16 @@ bool ProgramDesc::MergePartialFromCodedStream(
::std::pair<::google::protobuf::uint32, bool> p = ::std::pair<::google::protobuf::uint32, bool> p =
input->ReadTagWithCutoffNoLastTag(127u); input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first; tag = p.first;
if (!p.second) goto handle_unusual; if (!p.second)
goto handle_unusual;
switch ( switch (
::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1; // repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1;
case 1: { case 1: {
if (static_cast<::google::protobuf::uint8>(tag) == if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite:: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
ReadMessageNoVirtual(input, add_blocks())); input, add_blocks()));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
...@@ -7768,7 +7819,7 @@ failure: ...@@ -7768,7 +7819,7 @@ failure:
} }
void ProgramDesc::SerializeWithCachedSizes( void ProgramDesc::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::io::CodedOutputStream *output) const {
// @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.ProgramDesc) // @@protoc_insertion_point(serialize_start:paddle_mobile.framework.proto.ProgramDesc)
::google::protobuf::uint32 cached_has_bits = 0; ::google::protobuf::uint32 cached_has_bits = 0;
(void)cached_has_bits; (void)cached_has_bits;
...@@ -7811,11 +7862,11 @@ size_t ProgramDesc::ByteSizeLong() const { ...@@ -7811,11 +7862,11 @@ size_t ProgramDesc::ByteSizeLong() const {
} }
void ProgramDesc::CheckTypeAndMergeFrom( void ProgramDesc::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) { const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const ProgramDesc*>(&from)); MergeFrom(*::google::protobuf::down_cast<const ProgramDesc *>(&from));
} }
void ProgramDesc::MergeFrom(const ProgramDesc& from) { void ProgramDesc::MergeFrom(const ProgramDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.ProgramDesc) // @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.ProgramDesc)
GOOGLE_DCHECK_NE(&from, this); GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_); _internal_metadata_.MergeFrom(from._internal_metadata_);
...@@ -7825,9 +7876,10 @@ void ProgramDesc::MergeFrom(const ProgramDesc& from) { ...@@ -7825,9 +7876,10 @@ void ProgramDesc::MergeFrom(const ProgramDesc& from) {
blocks_.MergeFrom(from.blocks_); blocks_.MergeFrom(from.blocks_);
} }
void ProgramDesc::CopyFrom(const ProgramDesc& from) { void ProgramDesc::CopyFrom(const ProgramDesc &from) {
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.ProgramDesc) // @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.ProgramDesc)
if (&from == this) return; if (&from == this)
return;
Clear(); Clear();
MergeFrom(from); MergeFrom(from);
} }
...@@ -7838,11 +7890,12 @@ bool ProgramDesc::IsInitialized() const { ...@@ -7838,11 +7890,12 @@ bool ProgramDesc::IsInitialized() const {
return true; return true;
} }
void ProgramDesc::Swap(ProgramDesc* other) { void ProgramDesc::Swap(ProgramDesc *other) {
if (other == this) return; if (other == this)
return;
InternalSwap(other); InternalSwap(other);
} }
void ProgramDesc::InternalSwap(ProgramDesc* other) { void ProgramDesc::InternalSwap(ProgramDesc *other) {
using std::swap; using std::swap;
blocks_.InternalSwap(&other->blocks_); blocks_.InternalSwap(&other->blocks_);
swap(_has_bits_[0], other->_has_bits_[0]); swap(_has_bits_[0], other->_has_bits_[0]);
...@@ -7860,28 +7913,28 @@ void ProgramDesc::InternalSwap(ProgramDesc* other) { ...@@ -7860,28 +7913,28 @@ void ProgramDesc::InternalSwap(ProgramDesc* other) {
// repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1; // repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1;
int ProgramDesc::blocks_size() const { return blocks_.size(); } int ProgramDesc::blocks_size() const { return blocks_.size(); }
void ProgramDesc::clear_blocks() { blocks_.Clear(); } void ProgramDesc::clear_blocks() { blocks_.Clear(); }
const ::paddle_mobile::framework::proto::BlockDesc& ProgramDesc::blocks( const ::paddle_mobile::framework::proto::BlockDesc &
int index) const { ProgramDesc::blocks(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.ProgramDesc.blocks) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.ProgramDesc.blocks)
return blocks_.Get(index); return blocks_.Get(index);
} }
::paddle_mobile::framework::proto::BlockDesc* ProgramDesc::mutable_blocks( ::paddle_mobile::framework::proto::BlockDesc *
int index) { ProgramDesc::mutable_blocks(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.ProgramDesc.blocks) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.ProgramDesc.blocks)
return blocks_.Mutable(index); return blocks_.Mutable(index);
} }
::paddle_mobile::framework::proto::BlockDesc* ProgramDesc::add_blocks() { ::paddle_mobile::framework::proto::BlockDesc *ProgramDesc::add_blocks() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.ProgramDesc.blocks) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.ProgramDesc.blocks)
return blocks_.Add(); return blocks_.Add();
} }
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::BlockDesc>* ::paddle_mobile::framework::proto::BlockDesc> *
ProgramDesc::mutable_blocks() { ProgramDesc::mutable_blocks() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.ProgramDesc.blocks) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.ProgramDesc.blocks)
return &blocks_; return &blocks_;
} }
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::BlockDesc>& ::paddle_mobile::framework::proto::BlockDesc> &
ProgramDesc::blocks() const { ProgramDesc::blocks() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.ProgramDesc.blocks) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.ProgramDesc.blocks)
return blocks_; return blocks_;
......
...@@ -160,79 +160,80 @@ class OpDesc_Attr ...@@ -160,79 +160,80 @@ class OpDesc_Attr
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc.Attr) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc.Attr)
*/ */
{ {
public: public:
OpDesc_Attr(); OpDesc_Attr();
virtual ~OpDesc_Attr(); virtual ~OpDesc_Attr();
OpDesc_Attr(const OpDesc_Attr& from); OpDesc_Attr(const OpDesc_Attr &from);
inline OpDesc_Attr& operator=(const OpDesc_Attr& from) { inline OpDesc_Attr &operator=(const OpDesc_Attr &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
OpDesc_Attr(OpDesc_Attr&& from) noexcept : OpDesc_Attr() { OpDesc_Attr(OpDesc_Attr &&from) noexcept : OpDesc_Attr() {
*this = ::std::move(from); *this = ::std::move(from);
} }
inline OpDesc_Attr& operator=(OpDesc_Attr&& from) noexcept { inline OpDesc_Attr &operator=(OpDesc_Attr &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const OpDesc_Attr& default_instance(); static const OpDesc_Attr &default_instance();
static inline const OpDesc_Attr* internal_default_instance() { static inline const OpDesc_Attr *internal_default_instance() {
return reinterpret_cast<const OpDesc_Attr*>( return reinterpret_cast<const OpDesc_Attr *>(
&_OpDesc_Attr_default_instance_); &_OpDesc_Attr_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 0; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 0;
void Swap(OpDesc_Attr* other); void Swap(OpDesc_Attr *other);
friend void swap(OpDesc_Attr& a, OpDesc_Attr& b) { a.Swap(&b); } friend void swap(OpDesc_Attr &a, OpDesc_Attr &b) { a.Swap(&b); }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline OpDesc_Attr* New() const PROTOBUF_FINAL { return New(NULL); } inline OpDesc_Attr *New() const PROTOBUF_FINAL { return New(NULL); }
OpDesc_Attr* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; OpDesc_Attr *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CopyFrom(const OpDesc_Attr& from); void CopyFrom(const OpDesc_Attr &from);
void MergeFrom(const OpDesc_Attr& from); void MergeFrom(const OpDesc_Attr &from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(OpDesc_Attr* other); void InternalSwap(OpDesc_Attr *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -246,9 +247,9 @@ class OpDesc_Attr ...@@ -246,9 +247,9 @@ class OpDesc_Attr
::google::protobuf::int32 ints(int index) const; ::google::protobuf::int32 ints(int index) const;
void set_ints(int index, ::google::protobuf::int32 value); void set_ints(int index, ::google::protobuf::int32 value);
void add_ints(::google::protobuf::int32 value); void add_ints(::google::protobuf::int32 value);
const ::google::protobuf::RepeatedField<::google::protobuf::int32>& ints() const ::google::protobuf::RepeatedField<::google::protobuf::int32> &
const; ints() const;
::google::protobuf::RepeatedField<::google::protobuf::int32>* mutable_ints(); ::google::protobuf::RepeatedField<::google::protobuf::int32> *mutable_ints();
// repeated float floats = 7; // repeated float floats = 7;
int floats_size() const; int floats_size() const;
...@@ -257,30 +258,30 @@ class OpDesc_Attr ...@@ -257,30 +258,30 @@ class OpDesc_Attr
float floats(int index) const; float floats(int index) const;
void set_floats(int index, float value); void set_floats(int index, float value);
void add_floats(float value); void add_floats(float value);
const ::google::protobuf::RepeatedField<float>& floats() const; const ::google::protobuf::RepeatedField<float> &floats() const;
::google::protobuf::RepeatedField<float>* mutable_floats(); ::google::protobuf::RepeatedField<float> *mutable_floats();
// repeated string strings = 8; // repeated string strings = 8;
int strings_size() const; int strings_size() const;
void clear_strings(); void clear_strings();
static const int kStringsFieldNumber = 8; static const int kStringsFieldNumber = 8;
const ::std::string& strings(int index) const; const ::std::string &strings(int index) const;
::std::string* mutable_strings(int index); ::std::string *mutable_strings(int index);
void set_strings(int index, const ::std::string& value); void set_strings(int index, const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void set_strings(int index, ::std::string&& value); void set_strings(int index, ::std::string &&value);
#endif #endif
void set_strings(int index, const char* value); void set_strings(int index, const char *value);
void set_strings(int index, const char* value, size_t size); void set_strings(int index, const char *value, size_t size);
::std::string* add_strings(); ::std::string *add_strings();
void add_strings(const ::std::string& value); void add_strings(const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void add_strings(::std::string&& value); void add_strings(::std::string &&value);
#endif #endif
void add_strings(const char* value); void add_strings(const char *value);
void add_strings(const char* value, size_t size); void add_strings(const char *value, size_t size);
const ::google::protobuf::RepeatedPtrField<::std::string>& strings() const; const ::google::protobuf::RepeatedPtrField<::std::string> &strings() const;
::google::protobuf::RepeatedPtrField<::std::string>* mutable_strings(); ::google::protobuf::RepeatedPtrField<::std::string> *mutable_strings();
// repeated bool bools = 11; // repeated bool bools = 11;
int bools_size() const; int bools_size() const;
...@@ -289,38 +290,38 @@ class OpDesc_Attr ...@@ -289,38 +290,38 @@ class OpDesc_Attr
bool bools(int index) const; bool bools(int index) const;
void set_bools(int index, bool value); void set_bools(int index, bool value);
void add_bools(bool value); void add_bools(bool value);
const ::google::protobuf::RepeatedField<bool>& bools() const; const ::google::protobuf::RepeatedField<bool> &bools() const;
::google::protobuf::RepeatedField<bool>* mutable_bools(); ::google::protobuf::RepeatedField<bool> *mutable_bools();
// required string name = 1; // required string name = 1;
bool has_name() const; bool has_name() const;
void clear_name(); void clear_name();
static const int kNameFieldNumber = 1; static const int kNameFieldNumber = 1;
const ::std::string& name() const; const ::std::string &name() const;
void set_name(const ::std::string& value); void set_name(const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void set_name(::std::string&& value); void set_name(::std::string &&value);
#endif #endif
void set_name(const char* value); void set_name(const char *value);
void set_name(const char* value, size_t size); void set_name(const char *value, size_t size);
::std::string* mutable_name(); ::std::string *mutable_name();
::std::string* release_name(); ::std::string *release_name();
void set_allocated_name(::std::string* name); void set_allocated_name(::std::string *name);
// optional string s = 5; // optional string s = 5;
bool has_s() const; bool has_s() const;
void clear_s(); void clear_s();
static const int kSFieldNumber = 5; static const int kSFieldNumber = 5;
const ::std::string& s() const; const ::std::string &s() const;
void set_s(const ::std::string& value); void set_s(const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void set_s(::std::string&& value); void set_s(::std::string &&value);
#endif #endif
void set_s(const char* value); void set_s(const char *value);
void set_s(const char* value, size_t size); void set_s(const char *value, size_t size);
::std::string* mutable_s(); ::std::string *mutable_s();
::std::string* release_s(); ::std::string *release_s();
void set_allocated_s(::std::string* s); void set_allocated_s(::std::string *s);
// required .paddle_mobile.framework.proto.AttrType type = 2; // required .paddle_mobile.framework.proto.AttrType type = 2;
bool has_type() const; bool has_type() const;
...@@ -365,7 +366,7 @@ class OpDesc_Attr ...@@ -365,7 +366,7 @@ class OpDesc_Attr
void set_block_idx(::google::protobuf::int32 value); void set_block_idx(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc.Attr) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc.Attr)
private: private:
void set_has_name(); void set_has_name();
void clear_has_name(); void clear_has_name();
void set_has_type(); void set_has_type();
...@@ -411,78 +412,79 @@ class OpDesc_Var ...@@ -411,78 +412,79 @@ class OpDesc_Var
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc.Var) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc.Var)
*/ */
{ {
public: public:
OpDesc_Var(); OpDesc_Var();
virtual ~OpDesc_Var(); virtual ~OpDesc_Var();
OpDesc_Var(const OpDesc_Var& from); OpDesc_Var(const OpDesc_Var &from);
inline OpDesc_Var& operator=(const OpDesc_Var& from) { inline OpDesc_Var &operator=(const OpDesc_Var &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
OpDesc_Var(OpDesc_Var&& from) noexcept : OpDesc_Var() { OpDesc_Var(OpDesc_Var &&from) noexcept : OpDesc_Var() {
*this = ::std::move(from); *this = ::std::move(from);
} }
inline OpDesc_Var& operator=(OpDesc_Var&& from) noexcept { inline OpDesc_Var &operator=(OpDesc_Var &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const OpDesc_Var& default_instance(); static const OpDesc_Var &default_instance();
static inline const OpDesc_Var* internal_default_instance() { static inline const OpDesc_Var *internal_default_instance() {
return reinterpret_cast<const OpDesc_Var*>(&_OpDesc_Var_default_instance_); return reinterpret_cast<const OpDesc_Var *>(&_OpDesc_Var_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 1; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 1;
void Swap(OpDesc_Var* other); void Swap(OpDesc_Var *other);
friend void swap(OpDesc_Var& a, OpDesc_Var& b) { a.Swap(&b); } friend void swap(OpDesc_Var &a, OpDesc_Var &b) { a.Swap(&b); }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline OpDesc_Var* New() const PROTOBUF_FINAL { return New(NULL); } inline OpDesc_Var *New() const PROTOBUF_FINAL { return New(NULL); }
OpDesc_Var* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; OpDesc_Var *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CopyFrom(const OpDesc_Var& from); void CopyFrom(const OpDesc_Var &from);
void MergeFrom(const OpDesc_Var& from); void MergeFrom(const OpDesc_Var &from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(OpDesc_Var* other); void InternalSwap(OpDesc_Var *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -493,41 +495,41 @@ class OpDesc_Var ...@@ -493,41 +495,41 @@ class OpDesc_Var
int arguments_size() const; int arguments_size() const;
void clear_arguments(); void clear_arguments();
static const int kArgumentsFieldNumber = 2; static const int kArgumentsFieldNumber = 2;
const ::std::string& arguments(int index) const; const ::std::string &arguments(int index) const;
::std::string* mutable_arguments(int index); ::std::string *mutable_arguments(int index);
void set_arguments(int index, const ::std::string& value); void set_arguments(int index, const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void set_arguments(int index, ::std::string&& value); void set_arguments(int index, ::std::string &&value);
#endif #endif
void set_arguments(int index, const char* value); void set_arguments(int index, const char *value);
void set_arguments(int index, const char* value, size_t size); void set_arguments(int index, const char *value, size_t size);
::std::string* add_arguments(); ::std::string *add_arguments();
void add_arguments(const ::std::string& value); void add_arguments(const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void add_arguments(::std::string&& value); void add_arguments(::std::string &&value);
#endif #endif
void add_arguments(const char* value); void add_arguments(const char *value);
void add_arguments(const char* value, size_t size); void add_arguments(const char *value, size_t size);
const ::google::protobuf::RepeatedPtrField<::std::string>& arguments() const; const ::google::protobuf::RepeatedPtrField<::std::string> &arguments() const;
::google::protobuf::RepeatedPtrField<::std::string>* mutable_arguments(); ::google::protobuf::RepeatedPtrField<::std::string> *mutable_arguments();
// required string parameter = 1; // required string parameter = 1;
bool has_parameter() const; bool has_parameter() const;
void clear_parameter(); void clear_parameter();
static const int kParameterFieldNumber = 1; static const int kParameterFieldNumber = 1;
const ::std::string& parameter() const; const ::std::string &parameter() const;
void set_parameter(const ::std::string& value); void set_parameter(const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void set_parameter(::std::string&& value); void set_parameter(::std::string &&value);
#endif #endif
void set_parameter(const char* value); void set_parameter(const char *value);
void set_parameter(const char* value, size_t size); void set_parameter(const char *value, size_t size);
::std::string* mutable_parameter(); ::std::string *mutable_parameter();
::std::string* release_parameter(); ::std::string *release_parameter();
void set_allocated_parameter(::std::string* parameter); void set_allocated_parameter(::std::string *parameter);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc.Var) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc.Var)
private: private:
void set_has_parameter(); void set_has_parameter();
void clear_has_parameter(); void clear_has_parameter();
...@@ -546,76 +548,77 @@ class OpDesc ...@@ -546,76 +548,77 @@ class OpDesc
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc)
*/ */
{ {
public: public:
OpDesc(); OpDesc();
virtual ~OpDesc(); virtual ~OpDesc();
OpDesc(const OpDesc& from); OpDesc(const OpDesc &from);
inline OpDesc& operator=(const OpDesc& from) { inline OpDesc &operator=(const OpDesc &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
OpDesc(OpDesc&& from) noexcept : OpDesc() { *this = ::std::move(from); } OpDesc(OpDesc &&from) noexcept : OpDesc() { *this = ::std::move(from); }
inline OpDesc& operator=(OpDesc&& from) noexcept { inline OpDesc &operator=(OpDesc &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const OpDesc& default_instance(); static const OpDesc &default_instance();
static inline const OpDesc* internal_default_instance() { static inline const OpDesc *internal_default_instance() {
return reinterpret_cast<const OpDesc*>(&_OpDesc_default_instance_); return reinterpret_cast<const OpDesc *>(&_OpDesc_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 2; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 2;
void Swap(OpDesc* other); void Swap(OpDesc *other);
friend void swap(OpDesc& a, OpDesc& b) { a.Swap(&b); } friend void swap(OpDesc &a, OpDesc &b) { a.Swap(&b); }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline OpDesc* New() const PROTOBUF_FINAL { return New(NULL); } inline OpDesc *New() const PROTOBUF_FINAL { return New(NULL); }
OpDesc* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; OpDesc *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CopyFrom(const OpDesc& from); void CopyFrom(const OpDesc &from);
void MergeFrom(const OpDesc& from); void MergeFrom(const OpDesc &from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(OpDesc* other); void InternalSwap(OpDesc *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -629,58 +632,58 @@ class OpDesc ...@@ -629,58 +632,58 @@ class OpDesc
int inputs_size() const; int inputs_size() const;
void clear_inputs(); void clear_inputs();
static const int kInputsFieldNumber = 1; static const int kInputsFieldNumber = 1;
const ::paddle_mobile::framework::proto::OpDesc_Var& inputs(int index) const; const ::paddle_mobile::framework::proto::OpDesc_Var &inputs(int index) const;
::paddle_mobile::framework::proto::OpDesc_Var* mutable_inputs(int index); ::paddle_mobile::framework::proto::OpDesc_Var *mutable_inputs(int index);
::paddle_mobile::framework::proto::OpDesc_Var* add_inputs(); ::paddle_mobile::framework::proto::OpDesc_Var *add_inputs();
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Var>* ::paddle_mobile::framework::proto::OpDesc_Var> *
mutable_inputs(); mutable_inputs();
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Var>& ::paddle_mobile::framework::proto::OpDesc_Var> &
inputs() const; inputs() const;
// repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2; // repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2;
int outputs_size() const; int outputs_size() const;
void clear_outputs(); void clear_outputs();
static const int kOutputsFieldNumber = 2; static const int kOutputsFieldNumber = 2;
const ::paddle_mobile::framework::proto::OpDesc_Var& outputs(int index) const; const ::paddle_mobile::framework::proto::OpDesc_Var &outputs(int index) const;
::paddle_mobile::framework::proto::OpDesc_Var* mutable_outputs(int index); ::paddle_mobile::framework::proto::OpDesc_Var *mutable_outputs(int index);
::paddle_mobile::framework::proto::OpDesc_Var* add_outputs(); ::paddle_mobile::framework::proto::OpDesc_Var *add_outputs();
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Var>* ::paddle_mobile::framework::proto::OpDesc_Var> *
mutable_outputs(); mutable_outputs();
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Var>& ::paddle_mobile::framework::proto::OpDesc_Var> &
outputs() const; outputs() const;
// repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4; // repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4;
int attrs_size() const; int attrs_size() const;
void clear_attrs(); void clear_attrs();
static const int kAttrsFieldNumber = 4; static const int kAttrsFieldNumber = 4;
const ::paddle_mobile::framework::proto::OpDesc_Attr& attrs(int index) const; const ::paddle_mobile::framework::proto::OpDesc_Attr &attrs(int index) const;
::paddle_mobile::framework::proto::OpDesc_Attr* mutable_attrs(int index); ::paddle_mobile::framework::proto::OpDesc_Attr *mutable_attrs(int index);
::paddle_mobile::framework::proto::OpDesc_Attr* add_attrs(); ::paddle_mobile::framework::proto::OpDesc_Attr *add_attrs();
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Attr>* ::paddle_mobile::framework::proto::OpDesc_Attr> *
mutable_attrs(); mutable_attrs();
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Attr>& ::paddle_mobile::framework::proto::OpDesc_Attr> &
attrs() const; attrs() const;
// required string type = 3; // required string type = 3;
bool has_type() const; bool has_type() const;
void clear_type(); void clear_type();
static const int kTypeFieldNumber = 3; static const int kTypeFieldNumber = 3;
const ::std::string& type() const; const ::std::string &type() const;
void set_type(const ::std::string& value); void set_type(const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void set_type(::std::string&& value); void set_type(::std::string &&value);
#endif #endif
void set_type(const char* value); void set_type(const char *value);
void set_type(const char* value, size_t size); void set_type(const char *value, size_t size);
::std::string* mutable_type(); ::std::string *mutable_type();
::std::string* release_type(); ::std::string *release_type();
void set_allocated_type(::std::string* type); void set_allocated_type(::std::string *type);
// optional bool is_target = 5 [default = false]; // optional bool is_target = 5 [default = false];
bool has_is_target() const; bool has_is_target() const;
...@@ -690,7 +693,7 @@ class OpDesc ...@@ -690,7 +693,7 @@ class OpDesc
void set_is_target(bool value); void set_is_target(bool value);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc)
private: private:
void set_has_type(); void set_has_type();
void clear_has_type(); void clear_has_type();
void set_has_is_target(); void set_has_is_target();
...@@ -720,79 +723,80 @@ class OpProto_Var ...@@ -720,79 +723,80 @@ class OpProto_Var
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto.Var) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto.Var)
*/ */
{ {
public: public:
OpProto_Var(); OpProto_Var();
virtual ~OpProto_Var(); virtual ~OpProto_Var();
OpProto_Var(const OpProto_Var& from); OpProto_Var(const OpProto_Var &from);
inline OpProto_Var& operator=(const OpProto_Var& from) { inline OpProto_Var &operator=(const OpProto_Var &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
OpProto_Var(OpProto_Var&& from) noexcept : OpProto_Var() { OpProto_Var(OpProto_Var &&from) noexcept : OpProto_Var() {
*this = ::std::move(from); *this = ::std::move(from);
} }
inline OpProto_Var& operator=(OpProto_Var&& from) noexcept { inline OpProto_Var &operator=(OpProto_Var &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const OpProto_Var& default_instance(); static const OpProto_Var &default_instance();
static inline const OpProto_Var* internal_default_instance() { static inline const OpProto_Var *internal_default_instance() {
return reinterpret_cast<const OpProto_Var*>( return reinterpret_cast<const OpProto_Var *>(
&_OpProto_Var_default_instance_); &_OpProto_Var_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 3; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 3;
void Swap(OpProto_Var* other); void Swap(OpProto_Var *other);
friend void swap(OpProto_Var& a, OpProto_Var& b) { a.Swap(&b); } friend void swap(OpProto_Var &a, OpProto_Var &b) { a.Swap(&b); }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline OpProto_Var* New() const PROTOBUF_FINAL { return New(NULL); } inline OpProto_Var *New() const PROTOBUF_FINAL { return New(NULL); }
OpProto_Var* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; OpProto_Var *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CopyFrom(const OpProto_Var& from); void CopyFrom(const OpProto_Var &from);
void MergeFrom(const OpProto_Var& from); void MergeFrom(const OpProto_Var &from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(OpProto_Var* other); void InternalSwap(OpProto_Var *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -803,31 +807,31 @@ class OpProto_Var ...@@ -803,31 +807,31 @@ class OpProto_Var
bool has_name() const; bool has_name() const;
void clear_name(); void clear_name();
static const int kNameFieldNumber = 1; static const int kNameFieldNumber = 1;
const ::std::string& name() const; const ::std::string &name() const;
void set_name(const ::std::string& value); void set_name(const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void set_name(::std::string&& value); void set_name(::std::string &&value);
#endif #endif
void set_name(const char* value); void set_name(const char *value);
void set_name(const char* value, size_t size); void set_name(const char *value, size_t size);
::std::string* mutable_name(); ::std::string *mutable_name();
::std::string* release_name(); ::std::string *release_name();
void set_allocated_name(::std::string* name); void set_allocated_name(::std::string *name);
// required string comment = 2; // required string comment = 2;
bool has_comment() const; bool has_comment() const;
void clear_comment(); void clear_comment();
static const int kCommentFieldNumber = 2; static const int kCommentFieldNumber = 2;
const ::std::string& comment() const; const ::std::string &comment() const;
void set_comment(const ::std::string& value); void set_comment(const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void set_comment(::std::string&& value); void set_comment(::std::string &&value);
#endif #endif
void set_comment(const char* value); void set_comment(const char *value);
void set_comment(const char* value, size_t size); void set_comment(const char *value, size_t size);
::std::string* mutable_comment(); ::std::string *mutable_comment();
::std::string* release_comment(); ::std::string *release_comment();
void set_allocated_comment(::std::string* comment); void set_allocated_comment(::std::string *comment);
// optional bool duplicable = 3 [default = false]; // optional bool duplicable = 3 [default = false];
bool has_duplicable() const; bool has_duplicable() const;
...@@ -851,7 +855,7 @@ class OpProto_Var ...@@ -851,7 +855,7 @@ class OpProto_Var
void set_dispensable(bool value); void set_dispensable(bool value);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto.Var) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto.Var)
private: private:
void set_has_name(); void set_has_name();
void clear_has_name(); void clear_has_name();
void set_has_comment(); void set_has_comment();
...@@ -884,79 +888,80 @@ class OpProto_Attr ...@@ -884,79 +888,80 @@ class OpProto_Attr
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto.Attr) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto.Attr)
*/ */
{ {
public: public:
OpProto_Attr(); OpProto_Attr();
virtual ~OpProto_Attr(); virtual ~OpProto_Attr();
OpProto_Attr(const OpProto_Attr& from); OpProto_Attr(const OpProto_Attr &from);
inline OpProto_Attr& operator=(const OpProto_Attr& from) { inline OpProto_Attr &operator=(const OpProto_Attr &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
OpProto_Attr(OpProto_Attr&& from) noexcept : OpProto_Attr() { OpProto_Attr(OpProto_Attr &&from) noexcept : OpProto_Attr() {
*this = ::std::move(from); *this = ::std::move(from);
} }
inline OpProto_Attr& operator=(OpProto_Attr&& from) noexcept { inline OpProto_Attr &operator=(OpProto_Attr &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const OpProto_Attr& default_instance(); static const OpProto_Attr &default_instance();
static inline const OpProto_Attr* internal_default_instance() { static inline const OpProto_Attr *internal_default_instance() {
return reinterpret_cast<const OpProto_Attr*>( return reinterpret_cast<const OpProto_Attr *>(
&_OpProto_Attr_default_instance_); &_OpProto_Attr_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 4; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 4;
void Swap(OpProto_Attr* other); void Swap(OpProto_Attr *other);
friend void swap(OpProto_Attr& a, OpProto_Attr& b) { a.Swap(&b); } friend void swap(OpProto_Attr &a, OpProto_Attr &b) { a.Swap(&b); }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline OpProto_Attr* New() const PROTOBUF_FINAL { return New(NULL); } inline OpProto_Attr *New() const PROTOBUF_FINAL { return New(NULL); }
OpProto_Attr* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; OpProto_Attr *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CopyFrom(const OpProto_Attr& from); void CopyFrom(const OpProto_Attr &from);
void MergeFrom(const OpProto_Attr& from); void MergeFrom(const OpProto_Attr &from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(OpProto_Attr* other); void InternalSwap(OpProto_Attr *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -967,31 +972,31 @@ class OpProto_Attr ...@@ -967,31 +972,31 @@ class OpProto_Attr
bool has_name() const; bool has_name() const;
void clear_name(); void clear_name();
static const int kNameFieldNumber = 1; static const int kNameFieldNumber = 1;
const ::std::string& name() const; const ::std::string &name() const;
void set_name(const ::std::string& value); void set_name(const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void set_name(::std::string&& value); void set_name(::std::string &&value);
#endif #endif
void set_name(const char* value); void set_name(const char *value);
void set_name(const char* value, size_t size); void set_name(const char *value, size_t size);
::std::string* mutable_name(); ::std::string *mutable_name();
::std::string* release_name(); ::std::string *release_name();
void set_allocated_name(::std::string* name); void set_allocated_name(::std::string *name);
// required string comment = 3; // required string comment = 3;
bool has_comment() const; bool has_comment() const;
void clear_comment(); void clear_comment();
static const int kCommentFieldNumber = 3; static const int kCommentFieldNumber = 3;
const ::std::string& comment() const; const ::std::string &comment() const;
void set_comment(const ::std::string& value); void set_comment(const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void set_comment(::std::string&& value); void set_comment(::std::string &&value);
#endif #endif
void set_comment(const char* value); void set_comment(const char *value);
void set_comment(const char* value, size_t size); void set_comment(const char *value, size_t size);
::std::string* mutable_comment(); ::std::string *mutable_comment();
::std::string* release_comment(); ::std::string *release_comment();
void set_allocated_comment(::std::string* comment); void set_allocated_comment(::std::string *comment);
// required .paddle_mobile.framework.proto.AttrType type = 2; // required .paddle_mobile.framework.proto.AttrType type = 2;
bool has_type() const; bool has_type() const;
...@@ -1008,7 +1013,7 @@ class OpProto_Attr ...@@ -1008,7 +1013,7 @@ class OpProto_Attr
void set_generated(bool value); void set_generated(bool value);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto.Attr) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto.Attr)
private: private:
void set_has_name(); void set_has_name();
void clear_has_name(); void clear_has_name();
void set_has_type(); void set_has_type();
...@@ -1038,76 +1043,77 @@ class OpProto ...@@ -1038,76 +1043,77 @@ class OpProto
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto)
*/ */
{ {
public: public:
OpProto(); OpProto();
virtual ~OpProto(); virtual ~OpProto();
OpProto(const OpProto& from); OpProto(const OpProto &from);
inline OpProto& operator=(const OpProto& from) { inline OpProto &operator=(const OpProto &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
OpProto(OpProto&& from) noexcept : OpProto() { *this = ::std::move(from); } OpProto(OpProto &&from) noexcept : OpProto() { *this = ::std::move(from); }
inline OpProto& operator=(OpProto&& from) noexcept { inline OpProto &operator=(OpProto &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const OpProto& default_instance(); static const OpProto &default_instance();
static inline const OpProto* internal_default_instance() { static inline const OpProto *internal_default_instance() {
return reinterpret_cast<const OpProto*>(&_OpProto_default_instance_); return reinterpret_cast<const OpProto *>(&_OpProto_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 5; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 5;
void Swap(OpProto* other); void Swap(OpProto *other);
friend void swap(OpProto& a, OpProto& b) { a.Swap(&b); } friend void swap(OpProto &a, OpProto &b) { a.Swap(&b); }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline OpProto* New() const PROTOBUF_FINAL { return New(NULL); } inline OpProto *New() const PROTOBUF_FINAL { return New(NULL); }
OpProto* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; OpProto *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CopyFrom(const OpProto& from); void CopyFrom(const OpProto &from);
void MergeFrom(const OpProto& from); void MergeFrom(const OpProto &from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(OpProto* other); void InternalSwap(OpProto *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -1121,77 +1127,77 @@ class OpProto ...@@ -1121,77 +1127,77 @@ class OpProto
int inputs_size() const; int inputs_size() const;
void clear_inputs(); void clear_inputs();
static const int kInputsFieldNumber = 2; static const int kInputsFieldNumber = 2;
const ::paddle_mobile::framework::proto::OpProto_Var& inputs(int index) const; const ::paddle_mobile::framework::proto::OpProto_Var &inputs(int index) const;
::paddle_mobile::framework::proto::OpProto_Var* mutable_inputs(int index); ::paddle_mobile::framework::proto::OpProto_Var *mutable_inputs(int index);
::paddle_mobile::framework::proto::OpProto_Var* add_inputs(); ::paddle_mobile::framework::proto::OpProto_Var *add_inputs();
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Var>* ::paddle_mobile::framework::proto::OpProto_Var> *
mutable_inputs(); mutable_inputs();
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Var>& ::paddle_mobile::framework::proto::OpProto_Var> &
inputs() const; inputs() const;
// repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3; // repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3;
int outputs_size() const; int outputs_size() const;
void clear_outputs(); void clear_outputs();
static const int kOutputsFieldNumber = 3; static const int kOutputsFieldNumber = 3;
const ::paddle_mobile::framework::proto::OpProto_Var& outputs( const ::paddle_mobile::framework::proto::OpProto_Var &
int index) const; outputs(int index) const;
::paddle_mobile::framework::proto::OpProto_Var* mutable_outputs(int index); ::paddle_mobile::framework::proto::OpProto_Var *mutable_outputs(int index);
::paddle_mobile::framework::proto::OpProto_Var* add_outputs(); ::paddle_mobile::framework::proto::OpProto_Var *add_outputs();
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Var>* ::paddle_mobile::framework::proto::OpProto_Var> *
mutable_outputs(); mutable_outputs();
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Var>& ::paddle_mobile::framework::proto::OpProto_Var> &
outputs() const; outputs() const;
// repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4; // repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4;
int attrs_size() const; int attrs_size() const;
void clear_attrs(); void clear_attrs();
static const int kAttrsFieldNumber = 4; static const int kAttrsFieldNumber = 4;
const ::paddle_mobile::framework::proto::OpProto_Attr& attrs(int index) const; const ::paddle_mobile::framework::proto::OpProto_Attr &attrs(int index) const;
::paddle_mobile::framework::proto::OpProto_Attr* mutable_attrs(int index); ::paddle_mobile::framework::proto::OpProto_Attr *mutable_attrs(int index);
::paddle_mobile::framework::proto::OpProto_Attr* add_attrs(); ::paddle_mobile::framework::proto::OpProto_Attr *add_attrs();
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Attr>* ::paddle_mobile::framework::proto::OpProto_Attr> *
mutable_attrs(); mutable_attrs();
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Attr>& ::paddle_mobile::framework::proto::OpProto_Attr> &
attrs() const; attrs() const;
// required string type = 1; // required string type = 1;
bool has_type() const; bool has_type() const;
void clear_type(); void clear_type();
static const int kTypeFieldNumber = 1; static const int kTypeFieldNumber = 1;
const ::std::string& type() const; const ::std::string &type() const;
void set_type(const ::std::string& value); void set_type(const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void set_type(::std::string&& value); void set_type(::std::string &&value);
#endif #endif
void set_type(const char* value); void set_type(const char *value);
void set_type(const char* value, size_t size); void set_type(const char *value, size_t size);
::std::string* mutable_type(); ::std::string *mutable_type();
::std::string* release_type(); ::std::string *release_type();
void set_allocated_type(::std::string* type); void set_allocated_type(::std::string *type);
// required string comment = 5; // required string comment = 5;
bool has_comment() const; bool has_comment() const;
void clear_comment(); void clear_comment();
static const int kCommentFieldNumber = 5; static const int kCommentFieldNumber = 5;
const ::std::string& comment() const; const ::std::string &comment() const;
void set_comment(const ::std::string& value); void set_comment(const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void set_comment(::std::string&& value); void set_comment(::std::string &&value);
#endif #endif
void set_comment(const char* value); void set_comment(const char *value);
void set_comment(const char* value, size_t size); void set_comment(const char *value, size_t size);
::std::string* mutable_comment(); ::std::string *mutable_comment();
::std::string* release_comment(); ::std::string *release_comment();
void set_allocated_comment(::std::string* comment); void set_allocated_comment(::std::string *comment);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto)
private: private:
void set_has_type(); void set_has_type();
void clear_has_type(); void clear_has_type();
void set_has_comment(); void set_has_comment();
...@@ -1224,81 +1230,82 @@ class VarType_TensorDesc ...@@ -1224,81 +1230,82 @@ class VarType_TensorDesc
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.TensorDesc) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.TensorDesc)
*/ */
{ {
public: public:
VarType_TensorDesc(); VarType_TensorDesc();
virtual ~VarType_TensorDesc(); virtual ~VarType_TensorDesc();
VarType_TensorDesc(const VarType_TensorDesc& from); VarType_TensorDesc(const VarType_TensorDesc &from);
inline VarType_TensorDesc& operator=(const VarType_TensorDesc& from) { inline VarType_TensorDesc &operator=(const VarType_TensorDesc &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
VarType_TensorDesc(VarType_TensorDesc&& from) noexcept VarType_TensorDesc(VarType_TensorDesc &&from) noexcept
: VarType_TensorDesc() { : VarType_TensorDesc() {
*this = ::std::move(from); *this = ::std::move(from);
} }
inline VarType_TensorDesc& operator=(VarType_TensorDesc&& from) noexcept { inline VarType_TensorDesc &operator=(VarType_TensorDesc &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const VarType_TensorDesc& default_instance(); static const VarType_TensorDesc &default_instance();
static inline const VarType_TensorDesc* internal_default_instance() { static inline const VarType_TensorDesc *internal_default_instance() {
return reinterpret_cast<const VarType_TensorDesc*>( return reinterpret_cast<const VarType_TensorDesc *>(
&_VarType_TensorDesc_default_instance_); &_VarType_TensorDesc_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 6; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 6;
void Swap(VarType_TensorDesc* other); void Swap(VarType_TensorDesc *other);
friend void swap(VarType_TensorDesc& a, VarType_TensorDesc& b) { a.Swap(&b); } friend void swap(VarType_TensorDesc &a, VarType_TensorDesc &b) { a.Swap(&b); }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline VarType_TensorDesc* New() const PROTOBUF_FINAL { return New(NULL); } inline VarType_TensorDesc *New() const PROTOBUF_FINAL { return New(NULL); }
VarType_TensorDesc* New(::google::protobuf::Arena* arena) const VarType_TensorDesc *
New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CopyFrom(const VarType_TensorDesc &from);
PROTOBUF_FINAL; void MergeFrom(const VarType_TensorDesc &from);
void CopyFrom(const VarType_TensorDesc& from);
void MergeFrom(const VarType_TensorDesc& from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(VarType_TensorDesc* other); void InternalSwap(VarType_TensorDesc *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -1312,9 +1319,9 @@ class VarType_TensorDesc ...@@ -1312,9 +1319,9 @@ class VarType_TensorDesc
::google::protobuf::int64 dims(int index) const; ::google::protobuf::int64 dims(int index) const;
void set_dims(int index, ::google::protobuf::int64 value); void set_dims(int index, ::google::protobuf::int64 value);
void add_dims(::google::protobuf::int64 value); void add_dims(::google::protobuf::int64 value);
const ::google::protobuf::RepeatedField<::google::protobuf::int64>& dims() const ::google::protobuf::RepeatedField<::google::protobuf::int64> &
const; dims() const;
::google::protobuf::RepeatedField<::google::protobuf::int64>* mutable_dims(); ::google::protobuf::RepeatedField<::google::protobuf::int64> *mutable_dims();
// required .paddle_mobile.framework.proto.VarType.Type data_type = 1; // required .paddle_mobile.framework.proto.VarType.Type data_type = 1;
bool has_data_type() const; bool has_data_type() const;
...@@ -1324,7 +1331,7 @@ class VarType_TensorDesc ...@@ -1324,7 +1331,7 @@ class VarType_TensorDesc
void set_data_type(::paddle_mobile::framework::proto::VarType_Type value); void set_data_type(::paddle_mobile::framework::proto::VarType_Type value);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.TensorDesc) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.TensorDesc)
private: private:
void set_has_data_type(); void set_has_data_type();
void clear_has_data_type(); void clear_has_data_type();
...@@ -1343,84 +1350,85 @@ class VarType_LoDTensorDesc ...@@ -1343,84 +1350,85 @@ class VarType_LoDTensorDesc
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.LoDTensorDesc) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
*/ */
{ {
public: public:
VarType_LoDTensorDesc(); VarType_LoDTensorDesc();
virtual ~VarType_LoDTensorDesc(); virtual ~VarType_LoDTensorDesc();
VarType_LoDTensorDesc(const VarType_LoDTensorDesc& from); VarType_LoDTensorDesc(const VarType_LoDTensorDesc &from);
inline VarType_LoDTensorDesc& operator=(const VarType_LoDTensorDesc& from) { inline VarType_LoDTensorDesc &operator=(const VarType_LoDTensorDesc &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
VarType_LoDTensorDesc(VarType_LoDTensorDesc&& from) noexcept VarType_LoDTensorDesc(VarType_LoDTensorDesc &&from) noexcept
: VarType_LoDTensorDesc() { : VarType_LoDTensorDesc() {
*this = ::std::move(from); *this = ::std::move(from);
} }
inline VarType_LoDTensorDesc& operator=( inline VarType_LoDTensorDesc &
VarType_LoDTensorDesc&& from) noexcept { operator=(VarType_LoDTensorDesc &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const VarType_LoDTensorDesc& default_instance(); static const VarType_LoDTensorDesc &default_instance();
static inline const VarType_LoDTensorDesc* internal_default_instance() { static inline const VarType_LoDTensorDesc *internal_default_instance() {
return reinterpret_cast<const VarType_LoDTensorDesc*>( return reinterpret_cast<const VarType_LoDTensorDesc *>(
&_VarType_LoDTensorDesc_default_instance_); &_VarType_LoDTensorDesc_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 7; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 7;
void Swap(VarType_LoDTensorDesc* other); void Swap(VarType_LoDTensorDesc *other);
friend void swap(VarType_LoDTensorDesc& a, VarType_LoDTensorDesc& b) { friend void swap(VarType_LoDTensorDesc &a, VarType_LoDTensorDesc &b) {
a.Swap(&b); a.Swap(&b);
} }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline VarType_LoDTensorDesc* New() const PROTOBUF_FINAL { return New(NULL); } inline VarType_LoDTensorDesc *New() const PROTOBUF_FINAL { return New(NULL); }
VarType_LoDTensorDesc* New(::google::protobuf::Arena* arena) const VarType_LoDTensorDesc *
PROTOBUF_FINAL; New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CopyFrom(const VarType_LoDTensorDesc& from); void CopyFrom(const VarType_LoDTensorDesc &from);
void MergeFrom(const VarType_LoDTensorDesc& from); void MergeFrom(const VarType_LoDTensorDesc &from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(VarType_LoDTensorDesc* other); void InternalSwap(VarType_LoDTensorDesc *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -1431,11 +1439,11 @@ class VarType_LoDTensorDesc ...@@ -1431,11 +1439,11 @@ class VarType_LoDTensorDesc
bool has_tensor() const; bool has_tensor() const;
void clear_tensor(); void clear_tensor();
static const int kTensorFieldNumber = 1; static const int kTensorFieldNumber = 1;
const ::paddle_mobile::framework::proto::VarType_TensorDesc& tensor() const; const ::paddle_mobile::framework::proto::VarType_TensorDesc &tensor() const;
::paddle_mobile::framework::proto::VarType_TensorDesc* mutable_tensor(); ::paddle_mobile::framework::proto::VarType_TensorDesc *mutable_tensor();
::paddle_mobile::framework::proto::VarType_TensorDesc* release_tensor(); ::paddle_mobile::framework::proto::VarType_TensorDesc *release_tensor();
void set_allocated_tensor( void set_allocated_tensor(
::paddle_mobile::framework::proto::VarType_TensorDesc* tensor); ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor);
// optional int32 lod_level = 2 [default = 0]; // optional int32 lod_level = 2 [default = 0];
bool has_lod_level() const; bool has_lod_level() const;
...@@ -1445,7 +1453,7 @@ class VarType_LoDTensorDesc ...@@ -1445,7 +1453,7 @@ class VarType_LoDTensorDesc
void set_lod_level(::google::protobuf::int32 value); void set_lod_level(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.LoDTensorDesc) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
private: private:
void set_has_tensor(); void set_has_tensor();
void clear_has_tensor(); void clear_has_tensor();
void set_has_lod_level(); void set_has_lod_level();
...@@ -1455,7 +1463,7 @@ class VarType_LoDTensorDesc ...@@ -1455,7 +1463,7 @@ class VarType_LoDTensorDesc
_internal_metadata_; _internal_metadata_;
::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::HasBits<1> _has_bits_;
mutable int _cached_size_; mutable int _cached_size_;
::paddle_mobile::framework::proto::VarType_TensorDesc* tensor_; ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor_;
::google::protobuf::int32 lod_level_; ::google::protobuf::int32 lod_level_;
friend struct protobuf_framework_2eproto::TableStruct; friend struct protobuf_framework_2eproto::TableStruct;
}; };
...@@ -1466,88 +1474,89 @@ class VarType_LoDTensorArrayDesc ...@@ -1466,88 +1474,89 @@ class VarType_LoDTensorArrayDesc
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc)
*/ */
{ {
public: public:
VarType_LoDTensorArrayDesc(); VarType_LoDTensorArrayDesc();
virtual ~VarType_LoDTensorArrayDesc(); virtual ~VarType_LoDTensorArrayDesc();
VarType_LoDTensorArrayDesc(const VarType_LoDTensorArrayDesc& from); VarType_LoDTensorArrayDesc(const VarType_LoDTensorArrayDesc &from);
inline VarType_LoDTensorArrayDesc& operator=( inline VarType_LoDTensorArrayDesc &
const VarType_LoDTensorArrayDesc& from) { operator=(const VarType_LoDTensorArrayDesc &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
VarType_LoDTensorArrayDesc(VarType_LoDTensorArrayDesc&& from) noexcept VarType_LoDTensorArrayDesc(VarType_LoDTensorArrayDesc &&from) noexcept
: VarType_LoDTensorArrayDesc() { : VarType_LoDTensorArrayDesc() {
*this = ::std::move(from); *this = ::std::move(from);
} }
inline VarType_LoDTensorArrayDesc& operator=( inline VarType_LoDTensorArrayDesc &
VarType_LoDTensorArrayDesc&& from) noexcept { operator=(VarType_LoDTensorArrayDesc &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const VarType_LoDTensorArrayDesc& default_instance(); static const VarType_LoDTensorArrayDesc &default_instance();
static inline const VarType_LoDTensorArrayDesc* internal_default_instance() { static inline const VarType_LoDTensorArrayDesc *internal_default_instance() {
return reinterpret_cast<const VarType_LoDTensorArrayDesc*>( return reinterpret_cast<const VarType_LoDTensorArrayDesc *>(
&_VarType_LoDTensorArrayDesc_default_instance_); &_VarType_LoDTensorArrayDesc_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 8; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 8;
void Swap(VarType_LoDTensorArrayDesc* other); void Swap(VarType_LoDTensorArrayDesc *other);
friend void swap(VarType_LoDTensorArrayDesc& a, friend void swap(VarType_LoDTensorArrayDesc &a,
VarType_LoDTensorArrayDesc& b) { VarType_LoDTensorArrayDesc &b) {
a.Swap(&b); a.Swap(&b);
} }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline VarType_LoDTensorArrayDesc* New() const PROTOBUF_FINAL { inline VarType_LoDTensorArrayDesc *New() const PROTOBUF_FINAL {
return New(NULL); return New(NULL);
} }
VarType_LoDTensorArrayDesc* New(::google::protobuf::Arena* arena) const VarType_LoDTensorArrayDesc *
New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CopyFrom(const VarType_LoDTensorArrayDesc &from);
PROTOBUF_FINAL; void MergeFrom(const VarType_LoDTensorArrayDesc &from);
void CopyFrom(const VarType_LoDTensorArrayDesc& from);
void MergeFrom(const VarType_LoDTensorArrayDesc& from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(VarType_LoDTensorArrayDesc* other); void InternalSwap(VarType_LoDTensorArrayDesc *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -1558,11 +1567,11 @@ class VarType_LoDTensorArrayDesc ...@@ -1558,11 +1567,11 @@ class VarType_LoDTensorArrayDesc
bool has_tensor() const; bool has_tensor() const;
void clear_tensor(); void clear_tensor();
static const int kTensorFieldNumber = 1; static const int kTensorFieldNumber = 1;
const ::paddle_mobile::framework::proto::VarType_TensorDesc& tensor() const; const ::paddle_mobile::framework::proto::VarType_TensorDesc &tensor() const;
::paddle_mobile::framework::proto::VarType_TensorDesc* mutable_tensor(); ::paddle_mobile::framework::proto::VarType_TensorDesc *mutable_tensor();
::paddle_mobile::framework::proto::VarType_TensorDesc* release_tensor(); ::paddle_mobile::framework::proto::VarType_TensorDesc *release_tensor();
void set_allocated_tensor( void set_allocated_tensor(
::paddle_mobile::framework::proto::VarType_TensorDesc* tensor); ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor);
// optional int32 lod_level = 2 [default = 0]; // optional int32 lod_level = 2 [default = 0];
bool has_lod_level() const; bool has_lod_level() const;
...@@ -1572,7 +1581,7 @@ class VarType_LoDTensorArrayDesc ...@@ -1572,7 +1581,7 @@ class VarType_LoDTensorArrayDesc
void set_lod_level(::google::protobuf::int32 value); void set_lod_level(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc)
private: private:
void set_has_tensor(); void set_has_tensor();
void clear_has_tensor(); void clear_has_tensor();
void set_has_lod_level(); void set_has_lod_level();
...@@ -1582,7 +1591,7 @@ class VarType_LoDTensorArrayDesc ...@@ -1582,7 +1591,7 @@ class VarType_LoDTensorArrayDesc
_internal_metadata_; _internal_metadata_;
::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::HasBits<1> _has_bits_;
mutable int _cached_size_; mutable int _cached_size_;
::paddle_mobile::framework::proto::VarType_TensorDesc* tensor_; ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor_;
::google::protobuf::int32 lod_level_; ::google::protobuf::int32 lod_level_;
friend struct protobuf_framework_2eproto::TableStruct; friend struct protobuf_framework_2eproto::TableStruct;
}; };
...@@ -1593,81 +1602,82 @@ class VarType_ReaderDesc ...@@ -1593,81 +1602,82 @@ class VarType_ReaderDesc
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.ReaderDesc) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.ReaderDesc)
*/ */
{ {
public: public:
VarType_ReaderDesc(); VarType_ReaderDesc();
virtual ~VarType_ReaderDesc(); virtual ~VarType_ReaderDesc();
VarType_ReaderDesc(const VarType_ReaderDesc& from); VarType_ReaderDesc(const VarType_ReaderDesc &from);
inline VarType_ReaderDesc& operator=(const VarType_ReaderDesc& from) { inline VarType_ReaderDesc &operator=(const VarType_ReaderDesc &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
VarType_ReaderDesc(VarType_ReaderDesc&& from) noexcept VarType_ReaderDesc(VarType_ReaderDesc &&from) noexcept
: VarType_ReaderDesc() { : VarType_ReaderDesc() {
*this = ::std::move(from); *this = ::std::move(from);
} }
inline VarType_ReaderDesc& operator=(VarType_ReaderDesc&& from) noexcept { inline VarType_ReaderDesc &operator=(VarType_ReaderDesc &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const VarType_ReaderDesc& default_instance(); static const VarType_ReaderDesc &default_instance();
static inline const VarType_ReaderDesc* internal_default_instance() { static inline const VarType_ReaderDesc *internal_default_instance() {
return reinterpret_cast<const VarType_ReaderDesc*>( return reinterpret_cast<const VarType_ReaderDesc *>(
&_VarType_ReaderDesc_default_instance_); &_VarType_ReaderDesc_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 9; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 9;
void Swap(VarType_ReaderDesc* other); void Swap(VarType_ReaderDesc *other);
friend void swap(VarType_ReaderDesc& a, VarType_ReaderDesc& b) { a.Swap(&b); } friend void swap(VarType_ReaderDesc &a, VarType_ReaderDesc &b) { a.Swap(&b); }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline VarType_ReaderDesc* New() const PROTOBUF_FINAL { return New(NULL); } inline VarType_ReaderDesc *New() const PROTOBUF_FINAL { return New(NULL); }
VarType_ReaderDesc* New(::google::protobuf::Arena* arena) const VarType_ReaderDesc *
PROTOBUF_FINAL; New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CopyFrom(const VarType_ReaderDesc& from); void CopyFrom(const VarType_ReaderDesc &from);
void MergeFrom(const VarType_ReaderDesc& from); void MergeFrom(const VarType_ReaderDesc &from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(VarType_ReaderDesc* other); void InternalSwap(VarType_ReaderDesc *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -1679,20 +1689,20 @@ class VarType_ReaderDesc ...@@ -1679,20 +1689,20 @@ class VarType_ReaderDesc
int lod_tensor_size() const; int lod_tensor_size() const;
void clear_lod_tensor(); void clear_lod_tensor();
static const int kLodTensorFieldNumber = 1; static const int kLodTensorFieldNumber = 1;
const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc& lod_tensor( const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc &
int index) const; lod_tensor(int index) const;
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* mutable_lod_tensor( ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *
int index); mutable_lod_tensor(int index);
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* add_lod_tensor(); ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *add_lod_tensor();
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::VarType_LoDTensorDesc>* ::paddle_mobile::framework::proto::VarType_LoDTensorDesc> *
mutable_lod_tensor(); mutable_lod_tensor();
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::VarType_LoDTensorDesc>& ::paddle_mobile::framework::proto::VarType_LoDTensorDesc> &
lod_tensor() const; lod_tensor() const;
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.ReaderDesc) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.ReaderDesc)
private: private:
::google::protobuf::internal::InternalMetadataWithArenaLite ::google::protobuf::internal::InternalMetadataWithArenaLite
_internal_metadata_; _internal_metadata_;
::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::HasBits<1> _has_bits_;
...@@ -1709,83 +1719,84 @@ class VarType_ChannelDesc ...@@ -1709,83 +1719,84 @@ class VarType_ChannelDesc
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.ChannelDesc) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.ChannelDesc)
*/ */
{ {
public: public:
VarType_ChannelDesc(); VarType_ChannelDesc();
virtual ~VarType_ChannelDesc(); virtual ~VarType_ChannelDesc();
VarType_ChannelDesc(const VarType_ChannelDesc& from); VarType_ChannelDesc(const VarType_ChannelDesc &from);
inline VarType_ChannelDesc& operator=(const VarType_ChannelDesc& from) { inline VarType_ChannelDesc &operator=(const VarType_ChannelDesc &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
VarType_ChannelDesc(VarType_ChannelDesc&& from) noexcept VarType_ChannelDesc(VarType_ChannelDesc &&from) noexcept
: VarType_ChannelDesc() { : VarType_ChannelDesc() {
*this = ::std::move(from); *this = ::std::move(from);
} }
inline VarType_ChannelDesc& operator=(VarType_ChannelDesc&& from) noexcept { inline VarType_ChannelDesc &operator=(VarType_ChannelDesc &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const VarType_ChannelDesc& default_instance(); static const VarType_ChannelDesc &default_instance();
static inline const VarType_ChannelDesc* internal_default_instance() { static inline const VarType_ChannelDesc *internal_default_instance() {
return reinterpret_cast<const VarType_ChannelDesc*>( return reinterpret_cast<const VarType_ChannelDesc *>(
&_VarType_ChannelDesc_default_instance_); &_VarType_ChannelDesc_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 10; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 10;
void Swap(VarType_ChannelDesc* other); void Swap(VarType_ChannelDesc *other);
friend void swap(VarType_ChannelDesc& a, VarType_ChannelDesc& b) { friend void swap(VarType_ChannelDesc &a, VarType_ChannelDesc &b) {
a.Swap(&b); a.Swap(&b);
} }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline VarType_ChannelDesc* New() const PROTOBUF_FINAL { return New(NULL); } inline VarType_ChannelDesc *New() const PROTOBUF_FINAL { return New(NULL); }
VarType_ChannelDesc* New(::google::protobuf::Arena* arena) const VarType_ChannelDesc *
New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CopyFrom(const VarType_ChannelDesc &from);
PROTOBUF_FINAL; void MergeFrom(const VarType_ChannelDesc &from);
void CopyFrom(const VarType_ChannelDesc& from);
void MergeFrom(const VarType_ChannelDesc& from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(VarType_ChannelDesc* other); void InternalSwap(VarType_ChannelDesc *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -1807,7 +1818,7 @@ class VarType_ChannelDesc ...@@ -1807,7 +1818,7 @@ class VarType_ChannelDesc
void set_data_type(::paddle_mobile::framework::proto::VarType_Type value); void set_data_type(::paddle_mobile::framework::proto::VarType_Type value);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.ChannelDesc) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.ChannelDesc)
private: private:
void set_has_data_type(); void set_has_data_type();
void clear_has_data_type(); void clear_has_data_type();
void set_has_capacity(); void set_has_capacity();
...@@ -1831,79 +1842,80 @@ class VarType_Tuple ...@@ -1831,79 +1842,80 @@ class VarType_Tuple
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.Tuple) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.Tuple)
*/ */
{ {
public: public:
VarType_Tuple(); VarType_Tuple();
virtual ~VarType_Tuple(); virtual ~VarType_Tuple();
VarType_Tuple(const VarType_Tuple& from); VarType_Tuple(const VarType_Tuple &from);
inline VarType_Tuple& operator=(const VarType_Tuple& from) { inline VarType_Tuple &operator=(const VarType_Tuple &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
VarType_Tuple(VarType_Tuple&& from) noexcept : VarType_Tuple() { VarType_Tuple(VarType_Tuple &&from) noexcept : VarType_Tuple() {
*this = ::std::move(from); *this = ::std::move(from);
} }
inline VarType_Tuple& operator=(VarType_Tuple&& from) noexcept { inline VarType_Tuple &operator=(VarType_Tuple &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const VarType_Tuple& default_instance(); static const VarType_Tuple &default_instance();
static inline const VarType_Tuple* internal_default_instance() { static inline const VarType_Tuple *internal_default_instance() {
return reinterpret_cast<const VarType_Tuple*>( return reinterpret_cast<const VarType_Tuple *>(
&_VarType_Tuple_default_instance_); &_VarType_Tuple_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 11; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 11;
void Swap(VarType_Tuple* other); void Swap(VarType_Tuple *other);
friend void swap(VarType_Tuple& a, VarType_Tuple& b) { a.Swap(&b); } friend void swap(VarType_Tuple &a, VarType_Tuple &b) { a.Swap(&b); }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline VarType_Tuple* New() const PROTOBUF_FINAL { return New(NULL); } inline VarType_Tuple *New() const PROTOBUF_FINAL { return New(NULL); }
VarType_Tuple* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; VarType_Tuple *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CopyFrom(const VarType_Tuple& from); void CopyFrom(const VarType_Tuple &from);
void MergeFrom(const VarType_Tuple& from); void MergeFrom(const VarType_Tuple &from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(VarType_Tuple* other); void InternalSwap(VarType_Tuple *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -1918,11 +1930,11 @@ class VarType_Tuple ...@@ -1918,11 +1930,11 @@ class VarType_Tuple
void set_element_type(int index, void set_element_type(int index,
::paddle_mobile::framework::proto::VarType_Type value); ::paddle_mobile::framework::proto::VarType_Type value);
void add_element_type(::paddle_mobile::framework::proto::VarType_Type value); void add_element_type(::paddle_mobile::framework::proto::VarType_Type value);
const ::google::protobuf::RepeatedField<int>& element_type() const; const ::google::protobuf::RepeatedField<int> &element_type() const;
::google::protobuf::RepeatedField<int>* mutable_element_type(); ::google::protobuf::RepeatedField<int> *mutable_element_type();
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.Tuple) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.Tuple)
private: private:
::google::protobuf::internal::InternalMetadataWithArenaLite ::google::protobuf::internal::InternalMetadataWithArenaLite
_internal_metadata_; _internal_metadata_;
::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::HasBits<1> _has_bits_;
...@@ -1937,76 +1949,77 @@ class VarType ...@@ -1937,76 +1949,77 @@ class VarType
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType)
*/ */
{ {
public: public:
VarType(); VarType();
virtual ~VarType(); virtual ~VarType();
VarType(const VarType& from); VarType(const VarType &from);
inline VarType& operator=(const VarType& from) { inline VarType &operator=(const VarType &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
VarType(VarType&& from) noexcept : VarType() { *this = ::std::move(from); } VarType(VarType &&from) noexcept : VarType() { *this = ::std::move(from); }
inline VarType& operator=(VarType&& from) noexcept { inline VarType &operator=(VarType &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const VarType& default_instance(); static const VarType &default_instance();
static inline const VarType* internal_default_instance() { static inline const VarType *internal_default_instance() {
return reinterpret_cast<const VarType*>(&_VarType_default_instance_); return reinterpret_cast<const VarType *>(&_VarType_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 12; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 12;
void Swap(VarType* other); void Swap(VarType *other);
friend void swap(VarType& a, VarType& b) { a.Swap(&b); } friend void swap(VarType &a, VarType &b) { a.Swap(&b); }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline VarType* New() const PROTOBUF_FINAL { return New(NULL); } inline VarType *New() const PROTOBUF_FINAL { return New(NULL); }
VarType* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; VarType *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CopyFrom(const VarType& from); void CopyFrom(const VarType &from);
void MergeFrom(const VarType& from); void MergeFrom(const VarType &from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(VarType* other); void InternalSwap(VarType *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -2052,73 +2065,73 @@ class VarType ...@@ -2052,73 +2065,73 @@ class VarType
bool has_selected_rows() const; bool has_selected_rows() const;
void clear_selected_rows(); void clear_selected_rows();
static const int kSelectedRowsFieldNumber = 2; static const int kSelectedRowsFieldNumber = 2;
const ::paddle_mobile::framework::proto::VarType_TensorDesc& selected_rows() const ::paddle_mobile::framework::proto::VarType_TensorDesc &
const; selected_rows() const;
::paddle_mobile::framework::proto::VarType_TensorDesc* ::paddle_mobile::framework::proto::VarType_TensorDesc *
mutable_selected_rows(); mutable_selected_rows();
::paddle_mobile::framework::proto::VarType_TensorDesc* ::paddle_mobile::framework::proto::VarType_TensorDesc *
release_selected_rows(); release_selected_rows();
void set_allocated_selected_rows( void set_allocated_selected_rows(
::paddle_mobile::framework::proto::VarType_TensorDesc* selected_rows); ::paddle_mobile::framework::proto::VarType_TensorDesc *selected_rows);
// optional .paddle_mobile.framework.proto.VarType.LoDTensorDesc lod_tensor = // optional .paddle_mobile.framework.proto.VarType.LoDTensorDesc lod_tensor =
// 3; // 3;
bool has_lod_tensor() const; bool has_lod_tensor() const;
void clear_lod_tensor(); void clear_lod_tensor();
static const int kLodTensorFieldNumber = 3; static const int kLodTensorFieldNumber = 3;
const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc& lod_tensor() const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc &
const; lod_tensor() const;
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *
mutable_lod_tensor(); mutable_lod_tensor();
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *
release_lod_tensor(); release_lod_tensor();
void set_allocated_lod_tensor( void set_allocated_lod_tensor(
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* lod_tensor); ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *lod_tensor);
// optional .paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc // optional .paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc
// tensor_array = 4; // tensor_array = 4;
bool has_tensor_array() const; bool has_tensor_array() const;
void clear_tensor_array(); void clear_tensor_array();
static const int kTensorArrayFieldNumber = 4; static const int kTensorArrayFieldNumber = 4;
const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc& const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc &
tensor_array() const; tensor_array() const;
::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *
mutable_tensor_array(); mutable_tensor_array();
::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *
release_tensor_array(); release_tensor_array();
void set_allocated_tensor_array( void set_allocated_tensor_array(
::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc
tensor_array); *tensor_array);
// optional .paddle_mobile.framework.proto.VarType.ReaderDesc reader = 5; // optional .paddle_mobile.framework.proto.VarType.ReaderDesc reader = 5;
bool has_reader() const; bool has_reader() const;
void clear_reader(); void clear_reader();
static const int kReaderFieldNumber = 5; static const int kReaderFieldNumber = 5;
const ::paddle_mobile::framework::proto::VarType_ReaderDesc& reader() const; const ::paddle_mobile::framework::proto::VarType_ReaderDesc &reader() const;
::paddle_mobile::framework::proto::VarType_ReaderDesc* mutable_reader(); ::paddle_mobile::framework::proto::VarType_ReaderDesc *mutable_reader();
::paddle_mobile::framework::proto::VarType_ReaderDesc* release_reader(); ::paddle_mobile::framework::proto::VarType_ReaderDesc *release_reader();
void set_allocated_reader( void set_allocated_reader(
::paddle_mobile::framework::proto::VarType_ReaderDesc* reader); ::paddle_mobile::framework::proto::VarType_ReaderDesc *reader);
// optional .paddle_mobile.framework.proto.VarType.ChannelDesc channel = 6; // optional .paddle_mobile.framework.proto.VarType.ChannelDesc channel = 6;
bool has_channel() const; bool has_channel() const;
void clear_channel(); void clear_channel();
static const int kChannelFieldNumber = 6; static const int kChannelFieldNumber = 6;
const ::paddle_mobile::framework::proto::VarType_ChannelDesc& channel() const; const ::paddle_mobile::framework::proto::VarType_ChannelDesc &channel() const;
::paddle_mobile::framework::proto::VarType_ChannelDesc* mutable_channel(); ::paddle_mobile::framework::proto::VarType_ChannelDesc *mutable_channel();
::paddle_mobile::framework::proto::VarType_ChannelDesc* release_channel(); ::paddle_mobile::framework::proto::VarType_ChannelDesc *release_channel();
void set_allocated_channel( void set_allocated_channel(
::paddle_mobile::framework::proto::VarType_ChannelDesc* channel); ::paddle_mobile::framework::proto::VarType_ChannelDesc *channel);
// optional .paddle_mobile.framework.proto.VarType.Tuple tuple = 7; // optional .paddle_mobile.framework.proto.VarType.Tuple tuple = 7;
bool has_tuple() const; bool has_tuple() const;
void clear_tuple(); void clear_tuple();
static const int kTupleFieldNumber = 7; static const int kTupleFieldNumber = 7;
const ::paddle_mobile::framework::proto::VarType_Tuple& tuple() const; const ::paddle_mobile::framework::proto::VarType_Tuple &tuple() const;
::paddle_mobile::framework::proto::VarType_Tuple* mutable_tuple(); ::paddle_mobile::framework::proto::VarType_Tuple *mutable_tuple();
::paddle_mobile::framework::proto::VarType_Tuple* release_tuple(); ::paddle_mobile::framework::proto::VarType_Tuple *release_tuple();
void set_allocated_tuple( void
::paddle_mobile::framework::proto::VarType_Tuple* tuple); set_allocated_tuple(::paddle_mobile::framework::proto::VarType_Tuple *tuple);
// required .paddle_mobile.framework.proto.VarType.Type type = 1; // required .paddle_mobile.framework.proto.VarType.Type type = 1;
bool has_type() const; bool has_type() const;
...@@ -2128,7 +2141,7 @@ class VarType ...@@ -2128,7 +2141,7 @@ class VarType
void set_type(::paddle_mobile::framework::proto::VarType_Type value); void set_type(::paddle_mobile::framework::proto::VarType_Type value);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType)
private: private:
void set_has_type(); void set_has_type();
void clear_has_type(); void clear_has_type();
void set_has_selected_rows(); void set_has_selected_rows();
...@@ -2148,12 +2161,12 @@ class VarType ...@@ -2148,12 +2161,12 @@ class VarType
_internal_metadata_; _internal_metadata_;
::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::HasBits<1> _has_bits_;
mutable int _cached_size_; mutable int _cached_size_;
::paddle_mobile::framework::proto::VarType_TensorDesc* selected_rows_; ::paddle_mobile::framework::proto::VarType_TensorDesc *selected_rows_;
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* lod_tensor_; ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *lod_tensor_;
::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* tensor_array_; ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *tensor_array_;
::paddle_mobile::framework::proto::VarType_ReaderDesc* reader_; ::paddle_mobile::framework::proto::VarType_ReaderDesc *reader_;
::paddle_mobile::framework::proto::VarType_ChannelDesc* channel_; ::paddle_mobile::framework::proto::VarType_ChannelDesc *channel_;
::paddle_mobile::framework::proto::VarType_Tuple* tuple_; ::paddle_mobile::framework::proto::VarType_Tuple *tuple_;
int type_; int type_;
friend struct protobuf_framework_2eproto::TableStruct; friend struct protobuf_framework_2eproto::TableStruct;
}; };
...@@ -2164,76 +2177,77 @@ class VarDesc ...@@ -2164,76 +2177,77 @@ class VarDesc
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarDesc) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarDesc)
*/ */
{ {
public: public:
VarDesc(); VarDesc();
virtual ~VarDesc(); virtual ~VarDesc();
VarDesc(const VarDesc& from); VarDesc(const VarDesc &from);
inline VarDesc& operator=(const VarDesc& from) { inline VarDesc &operator=(const VarDesc &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
VarDesc(VarDesc&& from) noexcept : VarDesc() { *this = ::std::move(from); } VarDesc(VarDesc &&from) noexcept : VarDesc() { *this = ::std::move(from); }
inline VarDesc& operator=(VarDesc&& from) noexcept { inline VarDesc &operator=(VarDesc &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const VarDesc& default_instance(); static const VarDesc &default_instance();
static inline const VarDesc* internal_default_instance() { static inline const VarDesc *internal_default_instance() {
return reinterpret_cast<const VarDesc*>(&_VarDesc_default_instance_); return reinterpret_cast<const VarDesc *>(&_VarDesc_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 13; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 13;
void Swap(VarDesc* other); void Swap(VarDesc *other);
friend void swap(VarDesc& a, VarDesc& b) { a.Swap(&b); } friend void swap(VarDesc &a, VarDesc &b) { a.Swap(&b); }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline VarDesc* New() const PROTOBUF_FINAL { return New(NULL); } inline VarDesc *New() const PROTOBUF_FINAL { return New(NULL); }
VarDesc* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; VarDesc *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CopyFrom(const VarDesc& from); void CopyFrom(const VarDesc &from);
void MergeFrom(const VarDesc& from); void MergeFrom(const VarDesc &from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(VarDesc* other); void InternalSwap(VarDesc *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -2244,25 +2258,25 @@ class VarDesc ...@@ -2244,25 +2258,25 @@ class VarDesc
bool has_name() const; bool has_name() const;
void clear_name(); void clear_name();
static const int kNameFieldNumber = 1; static const int kNameFieldNumber = 1;
const ::std::string& name() const; const ::std::string &name() const;
void set_name(const ::std::string& value); void set_name(const ::std::string &value);
#if LANG_CXX11 #if LANG_CXX11
void set_name(::std::string&& value); void set_name(::std::string &&value);
#endif #endif
void set_name(const char* value); void set_name(const char *value);
void set_name(const char* value, size_t size); void set_name(const char *value, size_t size);
::std::string* mutable_name(); ::std::string *mutable_name();
::std::string* release_name(); ::std::string *release_name();
void set_allocated_name(::std::string* name); void set_allocated_name(::std::string *name);
// required .paddle_mobile.framework.proto.VarType type = 2; // required .paddle_mobile.framework.proto.VarType type = 2;
bool has_type() const; bool has_type() const;
void clear_type(); void clear_type();
static const int kTypeFieldNumber = 2; static const int kTypeFieldNumber = 2;
const ::paddle_mobile::framework::proto::VarType& type() const; const ::paddle_mobile::framework::proto::VarType &type() const;
::paddle_mobile::framework::proto::VarType* mutable_type(); ::paddle_mobile::framework::proto::VarType *mutable_type();
::paddle_mobile::framework::proto::VarType* release_type(); ::paddle_mobile::framework::proto::VarType *release_type();
void set_allocated_type(::paddle_mobile::framework::proto::VarType* type); void set_allocated_type(::paddle_mobile::framework::proto::VarType *type);
// optional bool persistable = 3 [default = false]; // optional bool persistable = 3 [default = false];
bool has_persistable() const; bool has_persistable() const;
...@@ -2272,7 +2286,7 @@ class VarDesc ...@@ -2272,7 +2286,7 @@ class VarDesc
void set_persistable(bool value); void set_persistable(bool value);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarDesc) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarDesc)
private: private:
void set_has_name(); void set_has_name();
void clear_has_name(); void clear_has_name();
void set_has_type(); void set_has_type();
...@@ -2288,7 +2302,7 @@ class VarDesc ...@@ -2288,7 +2302,7 @@ class VarDesc
::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::HasBits<1> _has_bits_;
mutable int _cached_size_; mutable int _cached_size_;
::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::internal::ArenaStringPtr name_;
::paddle_mobile::framework::proto::VarType* type_; ::paddle_mobile::framework::proto::VarType *type_;
bool persistable_; bool persistable_;
friend struct protobuf_framework_2eproto::TableStruct; friend struct protobuf_framework_2eproto::TableStruct;
}; };
...@@ -2299,78 +2313,79 @@ class BlockDesc ...@@ -2299,78 +2313,79 @@ class BlockDesc
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.BlockDesc) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.BlockDesc)
*/ */
{ {
public: public:
BlockDesc(); BlockDesc();
virtual ~BlockDesc(); virtual ~BlockDesc();
BlockDesc(const BlockDesc& from); BlockDesc(const BlockDesc &from);
inline BlockDesc& operator=(const BlockDesc& from) { inline BlockDesc &operator=(const BlockDesc &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
BlockDesc(BlockDesc&& from) noexcept : BlockDesc() { BlockDesc(BlockDesc &&from) noexcept : BlockDesc() {
*this = ::std::move(from); *this = ::std::move(from);
} }
inline BlockDesc& operator=(BlockDesc&& from) noexcept { inline BlockDesc &operator=(BlockDesc &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const BlockDesc& default_instance(); static const BlockDesc &default_instance();
static inline const BlockDesc* internal_default_instance() { static inline const BlockDesc *internal_default_instance() {
return reinterpret_cast<const BlockDesc*>(&_BlockDesc_default_instance_); return reinterpret_cast<const BlockDesc *>(&_BlockDesc_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 14; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 14;
void Swap(BlockDesc* other); void Swap(BlockDesc *other);
friend void swap(BlockDesc& a, BlockDesc& b) { a.Swap(&b); } friend void swap(BlockDesc &a, BlockDesc &b) { a.Swap(&b); }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline BlockDesc* New() const PROTOBUF_FINAL { return New(NULL); } inline BlockDesc *New() const PROTOBUF_FINAL { return New(NULL); }
BlockDesc* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; BlockDesc *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CopyFrom(const BlockDesc& from); void CopyFrom(const BlockDesc &from);
void MergeFrom(const BlockDesc& from); void MergeFrom(const BlockDesc &from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(BlockDesc* other); void InternalSwap(BlockDesc *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -2381,28 +2396,28 @@ class BlockDesc ...@@ -2381,28 +2396,28 @@ class BlockDesc
int vars_size() const; int vars_size() const;
void clear_vars(); void clear_vars();
static const int kVarsFieldNumber = 3; static const int kVarsFieldNumber = 3;
const ::paddle_mobile::framework::proto::VarDesc& vars(int index) const; const ::paddle_mobile::framework::proto::VarDesc &vars(int index) const;
::paddle_mobile::framework::proto::VarDesc* mutable_vars(int index); ::paddle_mobile::framework::proto::VarDesc *mutable_vars(int index);
::paddle_mobile::framework::proto::VarDesc* add_vars(); ::paddle_mobile::framework::proto::VarDesc *add_vars();
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::VarDesc>* ::paddle_mobile::framework::proto::VarDesc> *
mutable_vars(); mutable_vars();
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::VarDesc>& ::paddle_mobile::framework::proto::VarDesc> &
vars() const; vars() const;
// repeated .paddle_mobile.framework.proto.OpDesc ops = 4; // repeated .paddle_mobile.framework.proto.OpDesc ops = 4;
int ops_size() const; int ops_size() const;
void clear_ops(); void clear_ops();
static const int kOpsFieldNumber = 4; static const int kOpsFieldNumber = 4;
const ::paddle_mobile::framework::proto::OpDesc& ops(int index) const; const ::paddle_mobile::framework::proto::OpDesc &ops(int index) const;
::paddle_mobile::framework::proto::OpDesc* mutable_ops(int index); ::paddle_mobile::framework::proto::OpDesc *mutable_ops(int index);
::paddle_mobile::framework::proto::OpDesc* add_ops(); ::paddle_mobile::framework::proto::OpDesc *add_ops();
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc>* ::paddle_mobile::framework::proto::OpDesc> *
mutable_ops(); mutable_ops();
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc>& ::paddle_mobile::framework::proto::OpDesc> &
ops() const; ops() const;
// required int32 idx = 1; // required int32 idx = 1;
...@@ -2427,7 +2442,7 @@ class BlockDesc ...@@ -2427,7 +2442,7 @@ class BlockDesc
void set_forward_block_idx(::google::protobuf::int32 value); void set_forward_block_idx(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.BlockDesc) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.BlockDesc)
private: private:
void set_has_idx(); void set_has_idx();
void clear_has_idx(); void clear_has_idx();
void set_has_parent_idx(); void set_has_parent_idx();
...@@ -2460,79 +2475,80 @@ class ProgramDesc ...@@ -2460,79 +2475,80 @@ class ProgramDesc
MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.ProgramDesc) MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.ProgramDesc)
*/ */
{ {
public: public:
ProgramDesc(); ProgramDesc();
virtual ~ProgramDesc(); virtual ~ProgramDesc();
ProgramDesc(const ProgramDesc& from); ProgramDesc(const ProgramDesc &from);
inline ProgramDesc& operator=(const ProgramDesc& from) { inline ProgramDesc &operator=(const ProgramDesc &from) {
CopyFrom(from); CopyFrom(from);
return *this; return *this;
} }
#if LANG_CXX11 #if LANG_CXX11
ProgramDesc(ProgramDesc&& from) noexcept : ProgramDesc() { ProgramDesc(ProgramDesc &&from) noexcept : ProgramDesc() {
*this = ::std::move(from); *this = ::std::move(from);
} }
inline ProgramDesc& operator=(ProgramDesc&& from) noexcept { inline ProgramDesc &operator=(ProgramDesc &&from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from); if (this != &from)
InternalSwap(&from);
} else { } else {
CopyFrom(from); CopyFrom(from);
} }
return *this; return *this;
} }
#endif #endif
inline const ::std::string& unknown_fields() const { inline const ::std::string &unknown_fields() const {
return _internal_metadata_.unknown_fields(); return _internal_metadata_.unknown_fields();
} }
inline ::std::string* mutable_unknown_fields() { inline ::std::string *mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields(); return _internal_metadata_.mutable_unknown_fields();
} }
static const ProgramDesc& default_instance(); static const ProgramDesc &default_instance();
static inline const ProgramDesc* internal_default_instance() { static inline const ProgramDesc *internal_default_instance() {
return reinterpret_cast<const ProgramDesc*>( return reinterpret_cast<const ProgramDesc *>(
&_ProgramDesc_default_instance_); &_ProgramDesc_default_instance_);
} }
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 15; static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 15;
void Swap(ProgramDesc* other); void Swap(ProgramDesc *other);
friend void swap(ProgramDesc& a, ProgramDesc& b) { a.Swap(&b); } friend void swap(ProgramDesc &a, ProgramDesc &b) { a.Swap(&b); }
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
inline ProgramDesc* New() const PROTOBUF_FINAL { return New(NULL); } inline ProgramDesc *New() const PROTOBUF_FINAL { return New(NULL); }
ProgramDesc* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; ProgramDesc *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL;
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from)
PROTOBUF_FINAL; PROTOBUF_FINAL;
void CopyFrom(const ProgramDesc& from); void CopyFrom(const ProgramDesc &from);
void MergeFrom(const ProgramDesc& from); void MergeFrom(const ProgramDesc &from);
void Clear() PROTOBUF_FINAL; void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL;
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL;
void DiscardUnknownFields(); void DiscardUnknownFields();
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private: private:
void SharedCtor(); void SharedCtor();
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(ProgramDesc* other); void InternalSwap(ProgramDesc *other);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; }
inline void* MaybeArenaPtr() const { return NULL; } inline void *MaybeArenaPtr() const { return NULL; }
public: public:
::std::string GetTypeName() const PROTOBUF_FINAL; ::std::string GetTypeName() const PROTOBUF_FINAL;
// nested types ---------------------------------------------------- // nested types ----------------------------------------------------
...@@ -2543,18 +2559,18 @@ class ProgramDesc ...@@ -2543,18 +2559,18 @@ class ProgramDesc
int blocks_size() const; int blocks_size() const;
void clear_blocks(); void clear_blocks();
static const int kBlocksFieldNumber = 1; static const int kBlocksFieldNumber = 1;
const ::paddle_mobile::framework::proto::BlockDesc& blocks(int index) const; const ::paddle_mobile::framework::proto::BlockDesc &blocks(int index) const;
::paddle_mobile::framework::proto::BlockDesc* mutable_blocks(int index); ::paddle_mobile::framework::proto::BlockDesc *mutable_blocks(int index);
::paddle_mobile::framework::proto::BlockDesc* add_blocks(); ::paddle_mobile::framework::proto::BlockDesc *add_blocks();
::google::protobuf::RepeatedPtrField< ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::BlockDesc>* ::paddle_mobile::framework::proto::BlockDesc> *
mutable_blocks(); mutable_blocks();
const ::google::protobuf::RepeatedPtrField< const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::BlockDesc>& ::paddle_mobile::framework::proto::BlockDesc> &
blocks() const; blocks() const;
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.ProgramDesc) // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.ProgramDesc)
private: private:
::google::protobuf::internal::InternalMetadataWithArenaLite ::google::protobuf::internal::InternalMetadataWithArenaLite
_internal_metadata_; _internal_metadata_;
::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::HasBits<1> _has_bits_;
...@@ -2586,50 +2602,50 @@ inline void OpDesc_Attr::clear_name() { ...@@ -2586,50 +2602,50 @@ inline void OpDesc_Attr::clear_name() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name(); clear_has_name();
} }
inline const ::std::string& OpDesc_Attr::name() const { inline const ::std::string &OpDesc_Attr::name() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.name)
return name_.GetNoArena(); return name_.GetNoArena();
} }
inline void OpDesc_Attr::set_name(const ::std::string& value) { inline void OpDesc_Attr::set_name(const ::std::string &value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.name)
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpDesc_Attr::set_name(::std::string&& value) { inline void OpDesc_Attr::set_name(::std::string &&value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Attr.name)
} }
#endif #endif
inline void OpDesc_Attr::set_name(const char* value) { inline void OpDesc_Attr::set_name(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Attr.name)
} }
inline void OpDesc_Attr::set_name(const char* value, size_t size) { inline void OpDesc_Attr::set_name(const char *value, size_t size) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.name)
} }
inline ::std::string* OpDesc_Attr::mutable_name() { inline ::std::string *OpDesc_Attr::mutable_name() {
set_has_name(); set_has_name();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.name)
return name_.MutableNoArena( return name_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline ::std::string* OpDesc_Attr::release_name() { inline ::std::string *OpDesc_Attr::release_name() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.Attr.name) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.Attr.name)
clear_has_name(); clear_has_name();
return name_.ReleaseNoArena( return name_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline void OpDesc_Attr::set_allocated_name(::std::string* name) { inline void OpDesc_Attr::set_allocated_name(::std::string *name) {
if (name != NULL) { if (name != NULL) {
set_has_name(); set_has_name();
} else { } else {
...@@ -2654,8 +2670,8 @@ inline ::paddle_mobile::framework::proto::AttrType OpDesc_Attr::type() const { ...@@ -2654,8 +2670,8 @@ inline ::paddle_mobile::framework::proto::AttrType OpDesc_Attr::type() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.type) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.type)
return static_cast<::paddle_mobile::framework::proto::AttrType>(type_); return static_cast<::paddle_mobile::framework::proto::AttrType>(type_);
} }
inline void OpDesc_Attr::set_type( inline void
::paddle_mobile::framework::proto::AttrType value) { OpDesc_Attr::set_type(::paddle_mobile::framework::proto::AttrType value) {
assert(::paddle_mobile::framework::proto::AttrType_IsValid(value)); assert(::paddle_mobile::framework::proto::AttrType_IsValid(value));
set_has_type(); set_has_type();
type_ = value; type_ = value;
...@@ -2713,50 +2729,50 @@ inline void OpDesc_Attr::clear_s() { ...@@ -2713,50 +2729,50 @@ inline void OpDesc_Attr::clear_s() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_s(); clear_has_s();
} }
inline const ::std::string& OpDesc_Attr::s() const { inline const ::std::string &OpDesc_Attr::s() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.s)
return s_.GetNoArena(); return s_.GetNoArena();
} }
inline void OpDesc_Attr::set_s(const ::std::string& value) { inline void OpDesc_Attr::set_s(const ::std::string &value) {
set_has_s(); set_has_s();
s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.s)
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpDesc_Attr::set_s(::std::string&& value) { inline void OpDesc_Attr::set_s(::std::string &&value) {
set_has_s(); set_has_s();
s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Attr.s)
} }
#endif #endif
inline void OpDesc_Attr::set_s(const char* value) { inline void OpDesc_Attr::set_s(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_s(); set_has_s();
s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Attr.s)
} }
inline void OpDesc_Attr::set_s(const char* value, size_t size) { inline void OpDesc_Attr::set_s(const char *value, size_t size) {
set_has_s(); set_has_s();
s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.s)
} }
inline ::std::string* OpDesc_Attr::mutable_s() { inline ::std::string *OpDesc_Attr::mutable_s() {
set_has_s(); set_has_s();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.s)
return s_.MutableNoArena( return s_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline ::std::string* OpDesc_Attr::release_s() { inline ::std::string *OpDesc_Attr::release_s() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.Attr.s) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.Attr.s)
clear_has_s(); clear_has_s();
return s_.ReleaseNoArena( return s_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline void OpDesc_Attr::set_allocated_s(::std::string* s) { inline void OpDesc_Attr::set_allocated_s(::std::string *s) {
if (s != NULL) { if (s != NULL) {
set_has_s(); set_has_s();
} else { } else {
...@@ -2782,12 +2798,12 @@ inline void OpDesc_Attr::add_ints(::google::protobuf::int32 value) { ...@@ -2782,12 +2798,12 @@ inline void OpDesc_Attr::add_ints(::google::protobuf::int32 value) {
ints_.Add(value); ints_.Add(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.ints) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.ints)
} }
inline const ::google::protobuf::RepeatedField<::google::protobuf::int32>& inline const ::google::protobuf::RepeatedField<::google::protobuf::int32> &
OpDesc_Attr::ints() const { OpDesc_Attr::ints() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.ints) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.ints)
return ints_; return ints_;
} }
inline ::google::protobuf::RepeatedField<::google::protobuf::int32>* inline ::google::protobuf::RepeatedField<::google::protobuf::int32> *
OpDesc_Attr::mutable_ints() { OpDesc_Attr::mutable_ints() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.ints) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.ints)
return &ints_; return &ints_;
...@@ -2808,12 +2824,12 @@ inline void OpDesc_Attr::add_floats(float value) { ...@@ -2808,12 +2824,12 @@ inline void OpDesc_Attr::add_floats(float value) {
floats_.Add(value); floats_.Add(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.floats) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.floats)
} }
inline const ::google::protobuf::RepeatedField<float>& OpDesc_Attr::floats() inline const ::google::protobuf::RepeatedField<float> &
const { OpDesc_Attr::floats() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.floats) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.floats)
return floats_; return floats_;
} }
inline ::google::protobuf::RepeatedField<float>* OpDesc_Attr::mutable_floats() { inline ::google::protobuf::RepeatedField<float> *OpDesc_Attr::mutable_floats() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.floats) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.floats)
return &floats_; return &floats_;
} }
...@@ -2821,63 +2837,63 @@ inline ::google::protobuf::RepeatedField<float>* OpDesc_Attr::mutable_floats() { ...@@ -2821,63 +2837,63 @@ inline ::google::protobuf::RepeatedField<float>* OpDesc_Attr::mutable_floats() {
// repeated string strings = 8; // repeated string strings = 8;
inline int OpDesc_Attr::strings_size() const { return strings_.size(); } inline int OpDesc_Attr::strings_size() const { return strings_.size(); }
inline void OpDesc_Attr::clear_strings() { strings_.Clear(); } inline void OpDesc_Attr::clear_strings() { strings_.Clear(); }
inline const ::std::string& OpDesc_Attr::strings(int index) const { inline const ::std::string &OpDesc_Attr::strings(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return strings_.Get(index); return strings_.Get(index);
} }
inline ::std::string* OpDesc_Attr::mutable_strings(int index) { inline ::std::string *OpDesc_Attr::mutable_strings(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return strings_.Mutable(index); return strings_.Mutable(index);
} }
inline void OpDesc_Attr::set_strings(int index, const ::std::string& value) { inline void OpDesc_Attr::set_strings(int index, const ::std::string &value) {
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.strings)
strings_.Mutable(index)->assign(value); strings_.Mutable(index)->assign(value);
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpDesc_Attr::set_strings(int index, ::std::string&& value) { inline void OpDesc_Attr::set_strings(int index, ::std::string &&value) {
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.strings)
strings_.Mutable(index)->assign(std::move(value)); strings_.Mutable(index)->assign(std::move(value));
} }
#endif #endif
inline void OpDesc_Attr::set_strings(int index, const char* value) { inline void OpDesc_Attr::set_strings(int index, const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
strings_.Mutable(index)->assign(value); strings_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Attr.strings)
} }
inline void OpDesc_Attr::set_strings(int index, const char* value, inline void OpDesc_Attr::set_strings(int index, const char *value,
size_t size) { size_t size) {
strings_.Mutable(index)->assign(reinterpret_cast<const char*>(value), size); strings_.Mutable(index)->assign(reinterpret_cast<const char *>(value), size);
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.strings)
} }
inline ::std::string* OpDesc_Attr::add_strings() { inline ::std::string *OpDesc_Attr::add_strings() {
// @@protoc_insertion_point(field_add_mutable:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_add_mutable:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return strings_.Add(); return strings_.Add();
} }
inline void OpDesc_Attr::add_strings(const ::std::string& value) { inline void OpDesc_Attr::add_strings(const ::std::string &value) {
strings_.Add()->assign(value); strings_.Add()->assign(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.strings)
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpDesc_Attr::add_strings(::std::string&& value) { inline void OpDesc_Attr::add_strings(::std::string &&value) {
strings_.Add(std::move(value)); strings_.Add(std::move(value));
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.strings)
} }
#endif #endif
inline void OpDesc_Attr::add_strings(const char* value) { inline void OpDesc_Attr::add_strings(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
strings_.Add()->assign(value); strings_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_add_char:paddle_mobile.framework.proto.OpDesc.Attr.strings)
} }
inline void OpDesc_Attr::add_strings(const char* value, size_t size) { inline void OpDesc_Attr::add_strings(const char *value, size_t size) {
strings_.Add()->assign(reinterpret_cast<const char*>(value), size); strings_.Add()->assign(reinterpret_cast<const char *>(value), size);
// @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Attr.strings)
} }
inline const ::google::protobuf::RepeatedPtrField<::std::string>& inline const ::google::protobuf::RepeatedPtrField<::std::string> &
OpDesc_Attr::strings() const { OpDesc_Attr::strings() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return strings_; return strings_;
} }
inline ::google::protobuf::RepeatedPtrField<::std::string>* inline ::google::protobuf::RepeatedPtrField<::std::string> *
OpDesc_Attr::mutable_strings() { OpDesc_Attr::mutable_strings() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.strings) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return &strings_; return &strings_;
...@@ -2918,12 +2934,12 @@ inline void OpDesc_Attr::add_bools(bool value) { ...@@ -2918,12 +2934,12 @@ inline void OpDesc_Attr::add_bools(bool value) {
bools_.Add(value); bools_.Add(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.bools) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.bools)
} }
inline const ::google::protobuf::RepeatedField<bool>& OpDesc_Attr::bools() inline const ::google::protobuf::RepeatedField<bool> &
const { OpDesc_Attr::bools() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.bools) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.bools)
return bools_; return bools_;
} }
inline ::google::protobuf::RepeatedField<bool>* OpDesc_Attr::mutable_bools() { inline ::google::protobuf::RepeatedField<bool> *OpDesc_Attr::mutable_bools() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.bools) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.bools)
return &bools_; return &bools_;
} }
...@@ -2985,18 +3001,18 @@ inline void OpDesc_Var::clear_parameter() { ...@@ -2985,18 +3001,18 @@ inline void OpDesc_Var::clear_parameter() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_parameter(); clear_has_parameter();
} }
inline const ::std::string& OpDesc_Var::parameter() const { inline const ::std::string &OpDesc_Var::parameter() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Var.parameter)
return parameter_.GetNoArena(); return parameter_.GetNoArena();
} }
inline void OpDesc_Var::set_parameter(const ::std::string& value) { inline void OpDesc_Var::set_parameter(const ::std::string &value) {
set_has_parameter(); set_has_parameter();
parameter_.SetNoArena( parameter_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.parameter)
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpDesc_Var::set_parameter(::std::string&& value) { inline void OpDesc_Var::set_parameter(::std::string &&value) {
set_has_parameter(); set_has_parameter();
parameter_.SetNoArena( parameter_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
...@@ -3004,7 +3020,7 @@ inline void OpDesc_Var::set_parameter(::std::string&& value) { ...@@ -3004,7 +3020,7 @@ inline void OpDesc_Var::set_parameter(::std::string&& value) {
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Var.parameter)
} }
#endif #endif
inline void OpDesc_Var::set_parameter(const char* value) { inline void OpDesc_Var::set_parameter(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_parameter(); set_has_parameter();
parameter_.SetNoArena( parameter_.SetNoArena(
...@@ -3012,26 +3028,26 @@ inline void OpDesc_Var::set_parameter(const char* value) { ...@@ -3012,26 +3028,26 @@ inline void OpDesc_Var::set_parameter(const char* value) {
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Var.parameter)
} }
inline void OpDesc_Var::set_parameter(const char* value, size_t size) { inline void OpDesc_Var::set_parameter(const char *value, size_t size) {
set_has_parameter(); set_has_parameter();
parameter_.SetNoArena( parameter_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Var.parameter)
} }
inline ::std::string* OpDesc_Var::mutable_parameter() { inline ::std::string *OpDesc_Var::mutable_parameter() {
set_has_parameter(); set_has_parameter();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Var.parameter)
return parameter_.MutableNoArena( return parameter_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline ::std::string* OpDesc_Var::release_parameter() { inline ::std::string *OpDesc_Var::release_parameter() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.Var.parameter) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.Var.parameter)
clear_has_parameter(); clear_has_parameter();
return parameter_.ReleaseNoArena( return parameter_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline void OpDesc_Var::set_allocated_parameter(::std::string* parameter) { inline void OpDesc_Var::set_allocated_parameter(::std::string *parameter) {
if (parameter != NULL) { if (parameter != NULL) {
set_has_parameter(); set_has_parameter();
} else { } else {
...@@ -3045,63 +3061,64 @@ inline void OpDesc_Var::set_allocated_parameter(::std::string* parameter) { ...@@ -3045,63 +3061,64 @@ inline void OpDesc_Var::set_allocated_parameter(::std::string* parameter) {
// repeated string arguments = 2; // repeated string arguments = 2;
inline int OpDesc_Var::arguments_size() const { return arguments_.size(); } inline int OpDesc_Var::arguments_size() const { return arguments_.size(); }
inline void OpDesc_Var::clear_arguments() { arguments_.Clear(); } inline void OpDesc_Var::clear_arguments() { arguments_.Clear(); }
inline const ::std::string& OpDesc_Var::arguments(int index) const { inline const ::std::string &OpDesc_Var::arguments(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return arguments_.Get(index); return arguments_.Get(index);
} }
inline ::std::string* OpDesc_Var::mutable_arguments(int index) { inline ::std::string *OpDesc_Var::mutable_arguments(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return arguments_.Mutable(index); return arguments_.Mutable(index);
} }
inline void OpDesc_Var::set_arguments(int index, const ::std::string& value) { inline void OpDesc_Var::set_arguments(int index, const ::std::string &value) {
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.arguments)
arguments_.Mutable(index)->assign(value); arguments_.Mutable(index)->assign(value);
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpDesc_Var::set_arguments(int index, ::std::string&& value) { inline void OpDesc_Var::set_arguments(int index, ::std::string &&value) {
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.arguments)
arguments_.Mutable(index)->assign(std::move(value)); arguments_.Mutable(index)->assign(std::move(value));
} }
#endif #endif
inline void OpDesc_Var::set_arguments(int index, const char* value) { inline void OpDesc_Var::set_arguments(int index, const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
arguments_.Mutable(index)->assign(value); arguments_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.Var.arguments)
} }
inline void OpDesc_Var::set_arguments(int index, const char* value, inline void OpDesc_Var::set_arguments(int index, const char *value,
size_t size) { size_t size) {
arguments_.Mutable(index)->assign(reinterpret_cast<const char*>(value), size); arguments_.Mutable(index)->assign(reinterpret_cast<const char *>(value),
size);
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Var.arguments)
} }
inline ::std::string* OpDesc_Var::add_arguments() { inline ::std::string *OpDesc_Var::add_arguments() {
// @@protoc_insertion_point(field_add_mutable:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_add_mutable:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return arguments_.Add(); return arguments_.Add();
} }
inline void OpDesc_Var::add_arguments(const ::std::string& value) { inline void OpDesc_Var::add_arguments(const ::std::string &value) {
arguments_.Add()->assign(value); arguments_.Add()->assign(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Var.arguments)
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpDesc_Var::add_arguments(::std::string&& value) { inline void OpDesc_Var::add_arguments(::std::string &&value) {
arguments_.Add(std::move(value)); arguments_.Add(std::move(value));
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Var.arguments)
} }
#endif #endif
inline void OpDesc_Var::add_arguments(const char* value) { inline void OpDesc_Var::add_arguments(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
arguments_.Add()->assign(value); arguments_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_add_char:paddle_mobile.framework.proto.OpDesc.Var.arguments)
} }
inline void OpDesc_Var::add_arguments(const char* value, size_t size) { inline void OpDesc_Var::add_arguments(const char *value, size_t size) {
arguments_.Add()->assign(reinterpret_cast<const char*>(value), size); arguments_.Add()->assign(reinterpret_cast<const char *>(value), size);
// @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Var.arguments)
} }
inline const ::google::protobuf::RepeatedPtrField<::std::string>& inline const ::google::protobuf::RepeatedPtrField<::std::string> &
OpDesc_Var::arguments() const { OpDesc_Var::arguments() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return arguments_; return arguments_;
} }
inline ::google::protobuf::RepeatedPtrField<::std::string>* inline ::google::protobuf::RepeatedPtrField<::std::string> *
OpDesc_Var::mutable_arguments() { OpDesc_Var::mutable_arguments() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Var.arguments) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return &arguments_; return &arguments_;
...@@ -3122,50 +3139,50 @@ inline void OpDesc::clear_type() { ...@@ -3122,50 +3139,50 @@ inline void OpDesc::clear_type() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_type(); clear_has_type();
} }
inline const ::std::string& OpDesc::type() const { inline const ::std::string &OpDesc::type() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.type)
return type_.GetNoArena(); return type_.GetNoArena();
} }
inline void OpDesc::set_type(const ::std::string& value) { inline void OpDesc::set_type(const ::std::string &value) {
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.type)
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpDesc::set_type(::std::string&& value) { inline void OpDesc::set_type(::std::string &&value) {
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.type)
} }
#endif #endif
inline void OpDesc::set_type(const char* value) { inline void OpDesc::set_type(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpDesc.type)
} }
inline void OpDesc::set_type(const char* value, size_t size) { inline void OpDesc::set_type(const char *value, size_t size) {
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.type)
} }
inline ::std::string* OpDesc::mutable_type() { inline ::std::string *OpDesc::mutable_type() {
set_has_type(); set_has_type();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.type)
return type_.MutableNoArena( return type_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline ::std::string* OpDesc::release_type() { inline ::std::string *OpDesc::release_type() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.type) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpDesc.type)
clear_has_type(); clear_has_type();
return type_.ReleaseNoArena( return type_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline void OpDesc::set_allocated_type(::std::string* type) { inline void OpDesc::set_allocated_type(::std::string *type) {
if (type != NULL) { if (type != NULL) {
set_has_type(); set_has_type();
} else { } else {
...@@ -3179,28 +3196,28 @@ inline void OpDesc::set_allocated_type(::std::string* type) { ...@@ -3179,28 +3196,28 @@ inline void OpDesc::set_allocated_type(::std::string* type) {
// repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1; // repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1;
inline int OpDesc::inputs_size() const { return inputs_.size(); } inline int OpDesc::inputs_size() const { return inputs_.size(); }
inline void OpDesc::clear_inputs() { inputs_.Clear(); } inline void OpDesc::clear_inputs() { inputs_.Clear(); }
inline const ::paddle_mobile::framework::proto::OpDesc_Var& OpDesc::inputs( inline const ::paddle_mobile::framework::proto::OpDesc_Var &
int index) const { OpDesc::inputs(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.inputs) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.inputs)
return inputs_.Get(index); return inputs_.Get(index);
} }
inline ::paddle_mobile::framework::proto::OpDesc_Var* OpDesc::mutable_inputs( inline ::paddle_mobile::framework::proto::OpDesc_Var *
int index) { OpDesc::mutable_inputs(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.inputs) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.inputs)
return inputs_.Mutable(index); return inputs_.Mutable(index);
} }
inline ::paddle_mobile::framework::proto::OpDesc_Var* OpDesc::add_inputs() { inline ::paddle_mobile::framework::proto::OpDesc_Var *OpDesc::add_inputs() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.inputs) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.inputs)
return inputs_.Add(); return inputs_.Add();
} }
inline ::google::protobuf::RepeatedPtrField< inline ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Var>* ::paddle_mobile::framework::proto::OpDesc_Var> *
OpDesc::mutable_inputs() { OpDesc::mutable_inputs() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.inputs) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.inputs)
return &inputs_; return &inputs_;
} }
inline const ::google::protobuf::RepeatedPtrField< inline const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Var>& ::paddle_mobile::framework::proto::OpDesc_Var> &
OpDesc::inputs() const { OpDesc::inputs() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.inputs) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.inputs)
return inputs_; return inputs_;
...@@ -3209,28 +3226,28 @@ OpDesc::inputs() const { ...@@ -3209,28 +3226,28 @@ OpDesc::inputs() const {
// repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2; // repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2;
inline int OpDesc::outputs_size() const { return outputs_.size(); } inline int OpDesc::outputs_size() const { return outputs_.size(); }
inline void OpDesc::clear_outputs() { outputs_.Clear(); } inline void OpDesc::clear_outputs() { outputs_.Clear(); }
inline const ::paddle_mobile::framework::proto::OpDesc_Var& OpDesc::outputs( inline const ::paddle_mobile::framework::proto::OpDesc_Var &
int index) const { OpDesc::outputs(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.outputs) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.outputs)
return outputs_.Get(index); return outputs_.Get(index);
} }
inline ::paddle_mobile::framework::proto::OpDesc_Var* OpDesc::mutable_outputs( inline ::paddle_mobile::framework::proto::OpDesc_Var *
int index) { OpDesc::mutable_outputs(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.outputs) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.outputs)
return outputs_.Mutable(index); return outputs_.Mutable(index);
} }
inline ::paddle_mobile::framework::proto::OpDesc_Var* OpDesc::add_outputs() { inline ::paddle_mobile::framework::proto::OpDesc_Var *OpDesc::add_outputs() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.outputs) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.outputs)
return outputs_.Add(); return outputs_.Add();
} }
inline ::google::protobuf::RepeatedPtrField< inline ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Var>* ::paddle_mobile::framework::proto::OpDesc_Var> *
OpDesc::mutable_outputs() { OpDesc::mutable_outputs() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.outputs) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.outputs)
return &outputs_; return &outputs_;
} }
inline const ::google::protobuf::RepeatedPtrField< inline const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Var>& ::paddle_mobile::framework::proto::OpDesc_Var> &
OpDesc::outputs() const { OpDesc::outputs() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.outputs) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.outputs)
return outputs_; return outputs_;
...@@ -3239,28 +3256,28 @@ OpDesc::outputs() const { ...@@ -3239,28 +3256,28 @@ OpDesc::outputs() const {
// repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4; // repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4;
inline int OpDesc::attrs_size() const { return attrs_.size(); } inline int OpDesc::attrs_size() const { return attrs_.size(); }
inline void OpDesc::clear_attrs() { attrs_.Clear(); } inline void OpDesc::clear_attrs() { attrs_.Clear(); }
inline const ::paddle_mobile::framework::proto::OpDesc_Attr& OpDesc::attrs( inline const ::paddle_mobile::framework::proto::OpDesc_Attr &
int index) const { OpDesc::attrs(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.attrs) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.attrs)
return attrs_.Get(index); return attrs_.Get(index);
} }
inline ::paddle_mobile::framework::proto::OpDesc_Attr* OpDesc::mutable_attrs( inline ::paddle_mobile::framework::proto::OpDesc_Attr *
int index) { OpDesc::mutable_attrs(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.attrs) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.attrs)
return attrs_.Mutable(index); return attrs_.Mutable(index);
} }
inline ::paddle_mobile::framework::proto::OpDesc_Attr* OpDesc::add_attrs() { inline ::paddle_mobile::framework::proto::OpDesc_Attr *OpDesc::add_attrs() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.attrs) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.attrs)
return attrs_.Add(); return attrs_.Add();
} }
inline ::google::protobuf::RepeatedPtrField< inline ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Attr>* ::paddle_mobile::framework::proto::OpDesc_Attr> *
OpDesc::mutable_attrs() { OpDesc::mutable_attrs() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.attrs) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.attrs)
return &attrs_; return &attrs_;
} }
inline const ::google::protobuf::RepeatedPtrField< inline const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc_Attr>& ::paddle_mobile::framework::proto::OpDesc_Attr> &
OpDesc::attrs() const { OpDesc::attrs() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.attrs) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.attrs)
return attrs_; return attrs_;
...@@ -3301,50 +3318,50 @@ inline void OpProto_Var::clear_name() { ...@@ -3301,50 +3318,50 @@ inline void OpProto_Var::clear_name() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name(); clear_has_name();
} }
inline const ::std::string& OpProto_Var::name() const { inline const ::std::string &OpProto_Var::name() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Var.name)
return name_.GetNoArena(); return name_.GetNoArena();
} }
inline void OpProto_Var::set_name(const ::std::string& value) { inline void OpProto_Var::set_name(const ::std::string &value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Var.name)
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpProto_Var::set_name(::std::string&& value) { inline void OpProto_Var::set_name(::std::string &&value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Var.name)
} }
#endif #endif
inline void OpProto_Var::set_name(const char* value) { inline void OpProto_Var::set_name(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Var.name)
} }
inline void OpProto_Var::set_name(const char* value, size_t size) { inline void OpProto_Var::set_name(const char *value, size_t size) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Var.name)
} }
inline ::std::string* OpProto_Var::mutable_name() { inline ::std::string *OpProto_Var::mutable_name() {
set_has_name(); set_has_name();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Var.name)
return name_.MutableNoArena( return name_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline ::std::string* OpProto_Var::release_name() { inline ::std::string *OpProto_Var::release_name() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Var.name) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Var.name)
clear_has_name(); clear_has_name();
return name_.ReleaseNoArena( return name_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline void OpProto_Var::set_allocated_name(::std::string* name) { inline void OpProto_Var::set_allocated_name(::std::string *name) {
if (name != NULL) { if (name != NULL) {
set_has_name(); set_has_name();
} else { } else {
...@@ -3366,18 +3383,18 @@ inline void OpProto_Var::clear_comment() { ...@@ -3366,18 +3383,18 @@ inline void OpProto_Var::clear_comment() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_comment(); clear_has_comment();
} }
inline const ::std::string& OpProto_Var::comment() const { inline const ::std::string &OpProto_Var::comment() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Var.comment)
return comment_.GetNoArena(); return comment_.GetNoArena();
} }
inline void OpProto_Var::set_comment(const ::std::string& value) { inline void OpProto_Var::set_comment(const ::std::string &value) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Var.comment)
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpProto_Var::set_comment(::std::string&& value) { inline void OpProto_Var::set_comment(::std::string &&value) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
...@@ -3385,7 +3402,7 @@ inline void OpProto_Var::set_comment(::std::string&& value) { ...@@ -3385,7 +3402,7 @@ inline void OpProto_Var::set_comment(::std::string&& value) {
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Var.comment)
} }
#endif #endif
inline void OpProto_Var::set_comment(const char* value) { inline void OpProto_Var::set_comment(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
...@@ -3393,26 +3410,26 @@ inline void OpProto_Var::set_comment(const char* value) { ...@@ -3393,26 +3410,26 @@ inline void OpProto_Var::set_comment(const char* value) {
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Var.comment)
} }
inline void OpProto_Var::set_comment(const char* value, size_t size) { inline void OpProto_Var::set_comment(const char *value, size_t size) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Var.comment)
} }
inline ::std::string* OpProto_Var::mutable_comment() { inline ::std::string *OpProto_Var::mutable_comment() {
set_has_comment(); set_has_comment();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Var.comment)
return comment_.MutableNoArena( return comment_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline ::std::string* OpProto_Var::release_comment() { inline ::std::string *OpProto_Var::release_comment() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Var.comment) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Var.comment)
clear_has_comment(); clear_has_comment();
return comment_.ReleaseNoArena( return comment_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline void OpProto_Var::set_allocated_comment(::std::string* comment) { inline void OpProto_Var::set_allocated_comment(::std::string *comment) {
if (comment != NULL) { if (comment != NULL) {
set_has_comment(); set_has_comment();
} else { } else {
...@@ -3506,50 +3523,50 @@ inline void OpProto_Attr::clear_name() { ...@@ -3506,50 +3523,50 @@ inline void OpProto_Attr::clear_name() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name(); clear_has_name();
} }
inline const ::std::string& OpProto_Attr::name() const { inline const ::std::string &OpProto_Attr::name() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Attr.name)
return name_.GetNoArena(); return name_.GetNoArena();
} }
inline void OpProto_Attr::set_name(const ::std::string& value) { inline void OpProto_Attr::set_name(const ::std::string &value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Attr.name)
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpProto_Attr::set_name(::std::string&& value) { inline void OpProto_Attr::set_name(::std::string &&value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Attr.name)
} }
#endif #endif
inline void OpProto_Attr::set_name(const char* value) { inline void OpProto_Attr::set_name(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Attr.name)
} }
inline void OpProto_Attr::set_name(const char* value, size_t size) { inline void OpProto_Attr::set_name(const char *value, size_t size) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Attr.name)
} }
inline ::std::string* OpProto_Attr::mutable_name() { inline ::std::string *OpProto_Attr::mutable_name() {
set_has_name(); set_has_name();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Attr.name)
return name_.MutableNoArena( return name_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline ::std::string* OpProto_Attr::release_name() { inline ::std::string *OpProto_Attr::release_name() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Attr.name) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Attr.name)
clear_has_name(); clear_has_name();
return name_.ReleaseNoArena( return name_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline void OpProto_Attr::set_allocated_name(::std::string* name) { inline void OpProto_Attr::set_allocated_name(::std::string *name) {
if (name != NULL) { if (name != NULL) {
set_has_name(); set_has_name();
} else { } else {
...@@ -3574,8 +3591,8 @@ inline ::paddle_mobile::framework::proto::AttrType OpProto_Attr::type() const { ...@@ -3574,8 +3591,8 @@ inline ::paddle_mobile::framework::proto::AttrType OpProto_Attr::type() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Attr.type) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Attr.type)
return static_cast<::paddle_mobile::framework::proto::AttrType>(type_); return static_cast<::paddle_mobile::framework::proto::AttrType>(type_);
} }
inline void OpProto_Attr::set_type( inline void
::paddle_mobile::framework::proto::AttrType value) { OpProto_Attr::set_type(::paddle_mobile::framework::proto::AttrType value) {
assert(::paddle_mobile::framework::proto::AttrType_IsValid(value)); assert(::paddle_mobile::framework::proto::AttrType_IsValid(value));
set_has_type(); set_has_type();
type_ = value; type_ = value;
...@@ -3593,18 +3610,18 @@ inline void OpProto_Attr::clear_comment() { ...@@ -3593,18 +3610,18 @@ inline void OpProto_Attr::clear_comment() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_comment(); clear_has_comment();
} }
inline const ::std::string& OpProto_Attr::comment() const { inline const ::std::string &OpProto_Attr::comment() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Attr.comment)
return comment_.GetNoArena(); return comment_.GetNoArena();
} }
inline void OpProto_Attr::set_comment(const ::std::string& value) { inline void OpProto_Attr::set_comment(const ::std::string &value) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Attr.comment)
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpProto_Attr::set_comment(::std::string&& value) { inline void OpProto_Attr::set_comment(::std::string &&value) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
...@@ -3612,7 +3629,7 @@ inline void OpProto_Attr::set_comment(::std::string&& value) { ...@@ -3612,7 +3629,7 @@ inline void OpProto_Attr::set_comment(::std::string&& value) {
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Attr.comment)
} }
#endif #endif
inline void OpProto_Attr::set_comment(const char* value) { inline void OpProto_Attr::set_comment(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
...@@ -3620,26 +3637,26 @@ inline void OpProto_Attr::set_comment(const char* value) { ...@@ -3620,26 +3637,26 @@ inline void OpProto_Attr::set_comment(const char* value) {
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.Attr.comment)
} }
inline void OpProto_Attr::set_comment(const char* value, size_t size) { inline void OpProto_Attr::set_comment(const char *value, size_t size) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Attr.comment)
} }
inline ::std::string* OpProto_Attr::mutable_comment() { inline ::std::string *OpProto_Attr::mutable_comment() {
set_has_comment(); set_has_comment();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Attr.comment)
return comment_.MutableNoArena( return comment_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline ::std::string* OpProto_Attr::release_comment() { inline ::std::string *OpProto_Attr::release_comment() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Attr.comment) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.Attr.comment)
clear_has_comment(); clear_has_comment();
return comment_.ReleaseNoArena( return comment_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline void OpProto_Attr::set_allocated_comment(::std::string* comment) { inline void OpProto_Attr::set_allocated_comment(::std::string *comment) {
if (comment != NULL) { if (comment != NULL) {
set_has_comment(); set_has_comment();
} else { } else {
...@@ -3687,50 +3704,50 @@ inline void OpProto::clear_type() { ...@@ -3687,50 +3704,50 @@ inline void OpProto::clear_type() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_type(); clear_has_type();
} }
inline const ::std::string& OpProto::type() const { inline const ::std::string &OpProto::type() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.type)
return type_.GetNoArena(); return type_.GetNoArena();
} }
inline void OpProto::set_type(const ::std::string& value) { inline void OpProto::set_type(const ::std::string &value) {
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.type)
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpProto::set_type(::std::string&& value) { inline void OpProto::set_type(::std::string &&value) {
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.type)
} }
#endif #endif
inline void OpProto::set_type(const char* value) { inline void OpProto::set_type(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.type)
} }
inline void OpProto::set_type(const char* value, size_t size) { inline void OpProto::set_type(const char *value, size_t size) {
set_has_type(); set_has_type();
type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.type)
} }
inline ::std::string* OpProto::mutable_type() { inline ::std::string *OpProto::mutable_type() {
set_has_type(); set_has_type();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.type)
return type_.MutableNoArena( return type_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline ::std::string* OpProto::release_type() { inline ::std::string *OpProto::release_type() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.type) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.type)
clear_has_type(); clear_has_type();
return type_.ReleaseNoArena( return type_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline void OpProto::set_allocated_type(::std::string* type) { inline void OpProto::set_allocated_type(::std::string *type) {
if (type != NULL) { if (type != NULL) {
set_has_type(); set_has_type();
} else { } else {
...@@ -3744,28 +3761,28 @@ inline void OpProto::set_allocated_type(::std::string* type) { ...@@ -3744,28 +3761,28 @@ inline void OpProto::set_allocated_type(::std::string* type) {
// repeated .paddle_mobile.framework.proto.OpProto.Var inputs = 2; // repeated .paddle_mobile.framework.proto.OpProto.Var inputs = 2;
inline int OpProto::inputs_size() const { return inputs_.size(); } inline int OpProto::inputs_size() const { return inputs_.size(); }
inline void OpProto::clear_inputs() { inputs_.Clear(); } inline void OpProto::clear_inputs() { inputs_.Clear(); }
inline const ::paddle_mobile::framework::proto::OpProto_Var& OpProto::inputs( inline const ::paddle_mobile::framework::proto::OpProto_Var &
int index) const { OpProto::inputs(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.inputs) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.inputs)
return inputs_.Get(index); return inputs_.Get(index);
} }
inline ::paddle_mobile::framework::proto::OpProto_Var* OpProto::mutable_inputs( inline ::paddle_mobile::framework::proto::OpProto_Var *
int index) { OpProto::mutable_inputs(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.inputs) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.inputs)
return inputs_.Mutable(index); return inputs_.Mutable(index);
} }
inline ::paddle_mobile::framework::proto::OpProto_Var* OpProto::add_inputs() { inline ::paddle_mobile::framework::proto::OpProto_Var *OpProto::add_inputs() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpProto.inputs) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpProto.inputs)
return inputs_.Add(); return inputs_.Add();
} }
inline ::google::protobuf::RepeatedPtrField< inline ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Var>* ::paddle_mobile::framework::proto::OpProto_Var> *
OpProto::mutable_inputs() { OpProto::mutable_inputs() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.inputs) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.inputs)
return &inputs_; return &inputs_;
} }
inline const ::google::protobuf::RepeatedPtrField< inline const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Var>& ::paddle_mobile::framework::proto::OpProto_Var> &
OpProto::inputs() const { OpProto::inputs() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.inputs) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.inputs)
return inputs_; return inputs_;
...@@ -3774,28 +3791,28 @@ OpProto::inputs() const { ...@@ -3774,28 +3791,28 @@ OpProto::inputs() const {
// repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3; // repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3;
inline int OpProto::outputs_size() const { return outputs_.size(); } inline int OpProto::outputs_size() const { return outputs_.size(); }
inline void OpProto::clear_outputs() { outputs_.Clear(); } inline void OpProto::clear_outputs() { outputs_.Clear(); }
inline const ::paddle_mobile::framework::proto::OpProto_Var& OpProto::outputs( inline const ::paddle_mobile::framework::proto::OpProto_Var &
int index) const { OpProto::outputs(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.outputs) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.outputs)
return outputs_.Get(index); return outputs_.Get(index);
} }
inline ::paddle_mobile::framework::proto::OpProto_Var* OpProto::mutable_outputs( inline ::paddle_mobile::framework::proto::OpProto_Var *
int index) { OpProto::mutable_outputs(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.outputs) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.outputs)
return outputs_.Mutable(index); return outputs_.Mutable(index);
} }
inline ::paddle_mobile::framework::proto::OpProto_Var* OpProto::add_outputs() { inline ::paddle_mobile::framework::proto::OpProto_Var *OpProto::add_outputs() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpProto.outputs) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpProto.outputs)
return outputs_.Add(); return outputs_.Add();
} }
inline ::google::protobuf::RepeatedPtrField< inline ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Var>* ::paddle_mobile::framework::proto::OpProto_Var> *
OpProto::mutable_outputs() { OpProto::mutable_outputs() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.outputs) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.outputs)
return &outputs_; return &outputs_;
} }
inline const ::google::protobuf::RepeatedPtrField< inline const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Var>& ::paddle_mobile::framework::proto::OpProto_Var> &
OpProto::outputs() const { OpProto::outputs() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.outputs) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.outputs)
return outputs_; return outputs_;
...@@ -3804,28 +3821,28 @@ OpProto::outputs() const { ...@@ -3804,28 +3821,28 @@ OpProto::outputs() const {
// repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4; // repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4;
inline int OpProto::attrs_size() const { return attrs_.size(); } inline int OpProto::attrs_size() const { return attrs_.size(); }
inline void OpProto::clear_attrs() { attrs_.Clear(); } inline void OpProto::clear_attrs() { attrs_.Clear(); }
inline const ::paddle_mobile::framework::proto::OpProto_Attr& OpProto::attrs( inline const ::paddle_mobile::framework::proto::OpProto_Attr &
int index) const { OpProto::attrs(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.attrs) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.attrs)
return attrs_.Get(index); return attrs_.Get(index);
} }
inline ::paddle_mobile::framework::proto::OpProto_Attr* OpProto::mutable_attrs( inline ::paddle_mobile::framework::proto::OpProto_Attr *
int index) { OpProto::mutable_attrs(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.attrs) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.attrs)
return attrs_.Mutable(index); return attrs_.Mutable(index);
} }
inline ::paddle_mobile::framework::proto::OpProto_Attr* OpProto::add_attrs() { inline ::paddle_mobile::framework::proto::OpProto_Attr *OpProto::add_attrs() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpProto.attrs) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpProto.attrs)
return attrs_.Add(); return attrs_.Add();
} }
inline ::google::protobuf::RepeatedPtrField< inline ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Attr>* ::paddle_mobile::framework::proto::OpProto_Attr> *
OpProto::mutable_attrs() { OpProto::mutable_attrs() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.attrs) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.attrs)
return &attrs_; return &attrs_;
} }
inline const ::google::protobuf::RepeatedPtrField< inline const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpProto_Attr>& ::paddle_mobile::framework::proto::OpProto_Attr> &
OpProto::attrs() const { OpProto::attrs() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.attrs) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.attrs)
return attrs_; return attrs_;
...@@ -3842,18 +3859,18 @@ inline void OpProto::clear_comment() { ...@@ -3842,18 +3859,18 @@ inline void OpProto::clear_comment() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_comment(); clear_has_comment();
} }
inline const ::std::string& OpProto::comment() const { inline const ::std::string &OpProto::comment() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.comment)
return comment_.GetNoArena(); return comment_.GetNoArena();
} }
inline void OpProto::set_comment(const ::std::string& value) { inline void OpProto::set_comment(const ::std::string &value) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.comment)
} }
#if LANG_CXX11 #if LANG_CXX11
inline void OpProto::set_comment(::std::string&& value) { inline void OpProto::set_comment(::std::string &&value) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
...@@ -3861,7 +3878,7 @@ inline void OpProto::set_comment(::std::string&& value) { ...@@ -3861,7 +3878,7 @@ inline void OpProto::set_comment(::std::string&& value) {
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.comment)
} }
#endif #endif
inline void OpProto::set_comment(const char* value) { inline void OpProto::set_comment(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
...@@ -3869,26 +3886,26 @@ inline void OpProto::set_comment(const char* value) { ...@@ -3869,26 +3886,26 @@ inline void OpProto::set_comment(const char* value) {
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.OpProto.comment)
} }
inline void OpProto::set_comment(const char* value, size_t size) { inline void OpProto::set_comment(const char *value, size_t size) {
set_has_comment(); set_has_comment();
comment_.SetNoArena( comment_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.comment)
} }
inline ::std::string* OpProto::mutable_comment() { inline ::std::string *OpProto::mutable_comment() {
set_has_comment(); set_has_comment();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.comment)
return comment_.MutableNoArena( return comment_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline ::std::string* OpProto::release_comment() { inline ::std::string *OpProto::release_comment() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.comment) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.OpProto.comment)
clear_has_comment(); clear_has_comment();
return comment_.ReleaseNoArena( return comment_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline void OpProto::set_allocated_comment(::std::string* comment) { inline void OpProto::set_allocated_comment(::std::string *comment) {
if (comment != NULL) { if (comment != NULL) {
set_has_comment(); set_has_comment();
} else { } else {
...@@ -3947,12 +3964,12 @@ inline void VarType_TensorDesc::add_dims(::google::protobuf::int64 value) { ...@@ -3947,12 +3964,12 @@ inline void VarType_TensorDesc::add_dims(::google::protobuf::int64 value) {
dims_.Add(value); dims_.Add(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.TensorDesc.dims) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
} }
inline const ::google::protobuf::RepeatedField<::google::protobuf::int64>& inline const ::google::protobuf::RepeatedField<::google::protobuf::int64> &
VarType_TensorDesc::dims() const { VarType_TensorDesc::dims() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
return dims_; return dims_;
} }
inline ::google::protobuf::RepeatedField<::google::protobuf::int64>* inline ::google::protobuf::RepeatedField<::google::protobuf::int64> *
VarType_TensorDesc::mutable_dims() { VarType_TensorDesc::mutable_dims() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
return &dims_; return &dims_;
...@@ -3977,16 +3994,18 @@ inline void VarType_LoDTensorDesc::clear_tensor() { ...@@ -3977,16 +3994,18 @@ inline void VarType_LoDTensorDesc::clear_tensor() {
tensor_->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear(); tensor_->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear();
clear_has_tensor(); clear_has_tensor();
} }
inline const ::paddle_mobile::framework::proto::VarType_TensorDesc& inline const ::paddle_mobile::framework::proto::VarType_TensorDesc &
VarType_LoDTensorDesc::tensor() const { VarType_LoDTensorDesc::tensor() const {
const ::paddle_mobile::framework::proto::VarType_TensorDesc* p = tensor_; const ::paddle_mobile::framework::proto::VarType_TensorDesc *p = tensor_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor)
return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework:: return p != NULL
proto::VarType_TensorDesc*>( ? *p
&::paddle_mobile::framework::proto:: : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType_TensorDesc
*>(&::paddle_mobile::framework::proto::
_VarType_TensorDesc_default_instance_); _VarType_TensorDesc_default_instance_);
} }
inline ::paddle_mobile::framework::proto::VarType_TensorDesc* inline ::paddle_mobile::framework::proto::VarType_TensorDesc *
VarType_LoDTensorDesc::mutable_tensor() { VarType_LoDTensorDesc::mutable_tensor() {
set_has_tensor(); set_has_tensor();
if (tensor_ == NULL) { if (tensor_ == NULL) {
...@@ -3995,16 +4014,16 @@ VarType_LoDTensorDesc::mutable_tensor() { ...@@ -3995,16 +4014,16 @@ VarType_LoDTensorDesc::mutable_tensor() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor)
return tensor_; return tensor_;
} }
inline ::paddle_mobile::framework::proto::VarType_TensorDesc* inline ::paddle_mobile::framework::proto::VarType_TensorDesc *
VarType_LoDTensorDesc::release_tensor() { VarType_LoDTensorDesc::release_tensor() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor)
clear_has_tensor(); clear_has_tensor();
::paddle_mobile::framework::proto::VarType_TensorDesc* temp = tensor_; ::paddle_mobile::framework::proto::VarType_TensorDesc *temp = tensor_;
tensor_ = NULL; tensor_ = NULL;
return temp; return temp;
} }
inline void VarType_LoDTensorDesc::set_allocated_tensor( inline void VarType_LoDTensorDesc::set_allocated_tensor(
::paddle_mobile::framework::proto::VarType_TensorDesc* tensor) { ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor) {
delete tensor_; delete tensor_;
tensor_ = tensor; tensor_ = tensor;
if (tensor) { if (tensor) {
...@@ -4033,8 +4052,8 @@ inline ::google::protobuf::int32 VarType_LoDTensorDesc::lod_level() const { ...@@ -4033,8 +4052,8 @@ inline ::google::protobuf::int32 VarType_LoDTensorDesc::lod_level() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorDesc.lod_level) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorDesc.lod_level)
return lod_level_; return lod_level_;
} }
inline void VarType_LoDTensorDesc::set_lod_level( inline void
::google::protobuf::int32 value) { VarType_LoDTensorDesc::set_lod_level(::google::protobuf::int32 value) {
set_has_lod_level(); set_has_lod_level();
lod_level_ = value; lod_level_ = value;
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarType.LoDTensorDesc.lod_level) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarType.LoDTensorDesc.lod_level)
...@@ -4059,16 +4078,18 @@ inline void VarType_LoDTensorArrayDesc::clear_tensor() { ...@@ -4059,16 +4078,18 @@ inline void VarType_LoDTensorArrayDesc::clear_tensor() {
tensor_->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear(); tensor_->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear();
clear_has_tensor(); clear_has_tensor();
} }
inline const ::paddle_mobile::framework::proto::VarType_TensorDesc& inline const ::paddle_mobile::framework::proto::VarType_TensorDesc &
VarType_LoDTensorArrayDesc::tensor() const { VarType_LoDTensorArrayDesc::tensor() const {
const ::paddle_mobile::framework::proto::VarType_TensorDesc* p = tensor_; const ::paddle_mobile::framework::proto::VarType_TensorDesc *p = tensor_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor)
return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework:: return p != NULL
proto::VarType_TensorDesc*>( ? *p
&::paddle_mobile::framework::proto:: : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType_TensorDesc
*>(&::paddle_mobile::framework::proto::
_VarType_TensorDesc_default_instance_); _VarType_TensorDesc_default_instance_);
} }
inline ::paddle_mobile::framework::proto::VarType_TensorDesc* inline ::paddle_mobile::framework::proto::VarType_TensorDesc *
VarType_LoDTensorArrayDesc::mutable_tensor() { VarType_LoDTensorArrayDesc::mutable_tensor() {
set_has_tensor(); set_has_tensor();
if (tensor_ == NULL) { if (tensor_ == NULL) {
...@@ -4077,16 +4098,16 @@ VarType_LoDTensorArrayDesc::mutable_tensor() { ...@@ -4077,16 +4098,16 @@ VarType_LoDTensorArrayDesc::mutable_tensor() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor)
return tensor_; return tensor_;
} }
inline ::paddle_mobile::framework::proto::VarType_TensorDesc* inline ::paddle_mobile::framework::proto::VarType_TensorDesc *
VarType_LoDTensorArrayDesc::release_tensor() { VarType_LoDTensorArrayDesc::release_tensor() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor)
clear_has_tensor(); clear_has_tensor();
::paddle_mobile::framework::proto::VarType_TensorDesc* temp = tensor_; ::paddle_mobile::framework::proto::VarType_TensorDesc *temp = tensor_;
tensor_ = NULL; tensor_ = NULL;
return temp; return temp;
} }
inline void VarType_LoDTensorArrayDesc::set_allocated_tensor( inline void VarType_LoDTensorArrayDesc::set_allocated_tensor(
::paddle_mobile::framework::proto::VarType_TensorDesc* tensor) { ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor) {
delete tensor_; delete tensor_;
tensor_ = tensor; tensor_ = tensor;
if (tensor) { if (tensor) {
...@@ -4115,8 +4136,8 @@ inline ::google::protobuf::int32 VarType_LoDTensorArrayDesc::lod_level() const { ...@@ -4115,8 +4136,8 @@ inline ::google::protobuf::int32 VarType_LoDTensorArrayDesc::lod_level() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.lod_level) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.lod_level)
return lod_level_; return lod_level_;
} }
inline void VarType_LoDTensorArrayDesc::set_lod_level( inline void
::google::protobuf::int32 value) { VarType_LoDTensorArrayDesc::set_lod_level(::google::protobuf::int32 value) {
set_has_lod_level(); set_has_lod_level();
lod_level_ = value; lod_level_ = value;
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.lod_level) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.lod_level)
...@@ -4131,29 +4152,29 @@ inline int VarType_ReaderDesc::lod_tensor_size() const { ...@@ -4131,29 +4152,29 @@ inline int VarType_ReaderDesc::lod_tensor_size() const {
return lod_tensor_.size(); return lod_tensor_.size();
} }
inline void VarType_ReaderDesc::clear_lod_tensor() { lod_tensor_.Clear(); } inline void VarType_ReaderDesc::clear_lod_tensor() { lod_tensor_.Clear(); }
inline const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc& inline const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc &
VarType_ReaderDesc::lod_tensor(int index) const { VarType_ReaderDesc::lod_tensor(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return lod_tensor_.Get(index); return lod_tensor_.Get(index);
} }
inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *
VarType_ReaderDesc::mutable_lod_tensor(int index) { VarType_ReaderDesc::mutable_lod_tensor(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return lod_tensor_.Mutable(index); return lod_tensor_.Mutable(index);
} }
inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *
VarType_ReaderDesc::add_lod_tensor() { VarType_ReaderDesc::add_lod_tensor() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return lod_tensor_.Add(); return lod_tensor_.Add();
} }
inline ::google::protobuf::RepeatedPtrField< inline ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::VarType_LoDTensorDesc>* ::paddle_mobile::framework::proto::VarType_LoDTensorDesc> *
VarType_ReaderDesc::mutable_lod_tensor() { VarType_ReaderDesc::mutable_lod_tensor() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return &lod_tensor_; return &lod_tensor_;
} }
inline const ::google::protobuf::RepeatedPtrField< inline const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::VarType_LoDTensorDesc>& ::paddle_mobile::framework::proto::VarType_LoDTensorDesc> &
VarType_ReaderDesc::lod_tensor() const { VarType_ReaderDesc::lod_tensor() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return lod_tensor_; return lod_tensor_;
...@@ -4242,12 +4263,12 @@ inline void VarType_Tuple::add_element_type( ...@@ -4242,12 +4263,12 @@ inline void VarType_Tuple::add_element_type(
element_type_.Add(value); element_type_.Add(value);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.Tuple.element_type) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.Tuple.element_type)
} }
inline const ::google::protobuf::RepeatedField<int>& inline const ::google::protobuf::RepeatedField<int> &
VarType_Tuple::element_type() const { VarType_Tuple::element_type() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.Tuple.element_type) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.Tuple.element_type)
return element_type_; return element_type_;
} }
inline ::google::protobuf::RepeatedField<int>* inline ::google::protobuf::RepeatedField<int> *
VarType_Tuple::mutable_element_type() { VarType_Tuple::mutable_element_type() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.Tuple.element_type) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.Tuple.element_type)
return &element_type_; return &element_type_;
...@@ -4271,8 +4292,8 @@ inline ::paddle_mobile::framework::proto::VarType_Type VarType::type() const { ...@@ -4271,8 +4292,8 @@ inline ::paddle_mobile::framework::proto::VarType_Type VarType::type() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.type) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.type)
return static_cast<::paddle_mobile::framework::proto::VarType_Type>(type_); return static_cast<::paddle_mobile::framework::proto::VarType_Type>(type_);
} }
inline void VarType::set_type( inline void
::paddle_mobile::framework::proto::VarType_Type value) { VarType::set_type(::paddle_mobile::framework::proto::VarType_Type value) {
assert(::paddle_mobile::framework::proto::VarType_Type_IsValid(value)); assert(::paddle_mobile::framework::proto::VarType_Type_IsValid(value));
set_has_type(); set_has_type();
type_ = value; type_ = value;
...@@ -4293,17 +4314,19 @@ inline void VarType::clear_selected_rows() { ...@@ -4293,17 +4314,19 @@ inline void VarType::clear_selected_rows() {
->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear(); ->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear();
clear_has_selected_rows(); clear_has_selected_rows();
} }
inline const ::paddle_mobile::framework::proto::VarType_TensorDesc& inline const ::paddle_mobile::framework::proto::VarType_TensorDesc &
VarType::selected_rows() const { VarType::selected_rows() const {
const ::paddle_mobile::framework::proto::VarType_TensorDesc* p = const ::paddle_mobile::framework::proto::VarType_TensorDesc *p =
selected_rows_; selected_rows_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.selected_rows) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.selected_rows)
return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework:: return p != NULL
proto::VarType_TensorDesc*>( ? *p
&::paddle_mobile::framework::proto:: : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType_TensorDesc
*>(&::paddle_mobile::framework::proto::
_VarType_TensorDesc_default_instance_); _VarType_TensorDesc_default_instance_);
} }
inline ::paddle_mobile::framework::proto::VarType_TensorDesc* inline ::paddle_mobile::framework::proto::VarType_TensorDesc *
VarType::mutable_selected_rows() { VarType::mutable_selected_rows() {
set_has_selected_rows(); set_has_selected_rows();
if (selected_rows_ == NULL) { if (selected_rows_ == NULL) {
...@@ -4312,16 +4335,16 @@ VarType::mutable_selected_rows() { ...@@ -4312,16 +4335,16 @@ VarType::mutable_selected_rows() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.selected_rows) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.selected_rows)
return selected_rows_; return selected_rows_;
} }
inline ::paddle_mobile::framework::proto::VarType_TensorDesc* inline ::paddle_mobile::framework::proto::VarType_TensorDesc *
VarType::release_selected_rows() { VarType::release_selected_rows() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.selected_rows) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.selected_rows)
clear_has_selected_rows(); clear_has_selected_rows();
::paddle_mobile::framework::proto::VarType_TensorDesc* temp = selected_rows_; ::paddle_mobile::framework::proto::VarType_TensorDesc *temp = selected_rows_;
selected_rows_ = NULL; selected_rows_ = NULL;
return temp; return temp;
} }
inline void VarType::set_allocated_selected_rows( inline void VarType::set_allocated_selected_rows(
::paddle_mobile::framework::proto::VarType_TensorDesc* selected_rows) { ::paddle_mobile::framework::proto::VarType_TensorDesc *selected_rows) {
delete selected_rows_; delete selected_rows_;
selected_rows_ = selected_rows; selected_rows_ = selected_rows;
if (selected_rows) { if (selected_rows) {
...@@ -4344,17 +4367,17 @@ inline void VarType::clear_lod_tensor() { ...@@ -4344,17 +4367,17 @@ inline void VarType::clear_lod_tensor() {
->::paddle_mobile::framework::proto::VarType_LoDTensorDesc::Clear(); ->::paddle_mobile::framework::proto::VarType_LoDTensorDesc::Clear();
clear_has_lod_tensor(); clear_has_lod_tensor();
} }
inline const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc& inline const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc &
VarType::lod_tensor() const { VarType::lod_tensor() const {
const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* p = const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *p =
lod_tensor_; lod_tensor_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.lod_tensor) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.lod_tensor)
return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework:: return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework::
proto::VarType_LoDTensorDesc*>( proto::VarType_LoDTensorDesc *>(
&::paddle_mobile::framework::proto:: &::paddle_mobile::framework::proto::
_VarType_LoDTensorDesc_default_instance_); _VarType_LoDTensorDesc_default_instance_);
} }
inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *
VarType::mutable_lod_tensor() { VarType::mutable_lod_tensor() {
set_has_lod_tensor(); set_has_lod_tensor();
if (lod_tensor_ == NULL) { if (lod_tensor_ == NULL) {
...@@ -4363,16 +4386,16 @@ VarType::mutable_lod_tensor() { ...@@ -4363,16 +4386,16 @@ VarType::mutable_lod_tensor() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.lod_tensor) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.lod_tensor)
return lod_tensor_; return lod_tensor_;
} }
inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *
VarType::release_lod_tensor() { VarType::release_lod_tensor() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.lod_tensor) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.lod_tensor)
clear_has_lod_tensor(); clear_has_lod_tensor();
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* temp = lod_tensor_; ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *temp = lod_tensor_;
lod_tensor_ = NULL; lod_tensor_ = NULL;
return temp; return temp;
} }
inline void VarType::set_allocated_lod_tensor( inline void VarType::set_allocated_lod_tensor(
::paddle_mobile::framework::proto::VarType_LoDTensorDesc* lod_tensor) { ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *lod_tensor) {
delete lod_tensor_; delete lod_tensor_;
lod_tensor_ = lod_tensor; lod_tensor_ = lod_tensor;
if (lod_tensor) { if (lod_tensor) {
...@@ -4396,18 +4419,18 @@ inline void VarType::clear_tensor_array() { ...@@ -4396,18 +4419,18 @@ inline void VarType::clear_tensor_array() {
VarType_LoDTensorArrayDesc::Clear(); VarType_LoDTensorArrayDesc::Clear();
clear_has_tensor_array(); clear_has_tensor_array();
} }
inline const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc& inline const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc &
VarType::tensor_array() const { VarType::tensor_array() const {
const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* p = const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *p =
tensor_array_; tensor_array_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tensor_array) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tensor_array)
return p != NULL ? *p return p != NULL ? *p
: *reinterpret_cast<const ::paddle_mobile::framework::proto:: : *reinterpret_cast<const ::paddle_mobile::framework::proto::
VarType_LoDTensorArrayDesc*>( VarType_LoDTensorArrayDesc *>(
&::paddle_mobile::framework::proto:: &::paddle_mobile::framework::proto::
_VarType_LoDTensorArrayDesc_default_instance_); _VarType_LoDTensorArrayDesc_default_instance_);
} }
inline ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* inline ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *
VarType::mutable_tensor_array() { VarType::mutable_tensor_array() {
set_has_tensor_array(); set_has_tensor_array();
if (tensor_array_ == NULL) { if (tensor_array_ == NULL) {
...@@ -4417,18 +4440,18 @@ VarType::mutable_tensor_array() { ...@@ -4417,18 +4440,18 @@ VarType::mutable_tensor_array() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.tensor_array) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.tensor_array)
return tensor_array_; return tensor_array_;
} }
inline ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* inline ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *
VarType::release_tensor_array() { VarType::release_tensor_array() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.tensor_array) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.tensor_array)
clear_has_tensor_array(); clear_has_tensor_array();
::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* temp = ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *temp =
tensor_array_; tensor_array_;
tensor_array_ = NULL; tensor_array_ = NULL;
return temp; return temp;
} }
inline void VarType::set_allocated_tensor_array( inline void VarType::set_allocated_tensor_array(
::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc
tensor_array) { *tensor_array) {
delete tensor_array_; delete tensor_array_;
tensor_array_ = tensor_array; tensor_array_ = tensor_array;
if (tensor_array) { if (tensor_array) {
...@@ -4450,16 +4473,18 @@ inline void VarType::clear_reader() { ...@@ -4450,16 +4473,18 @@ inline void VarType::clear_reader() {
reader_->::paddle_mobile::framework::proto::VarType_ReaderDesc::Clear(); reader_->::paddle_mobile::framework::proto::VarType_ReaderDesc::Clear();
clear_has_reader(); clear_has_reader();
} }
inline const ::paddle_mobile::framework::proto::VarType_ReaderDesc& inline const ::paddle_mobile::framework::proto::VarType_ReaderDesc &
VarType::reader() const { VarType::reader() const {
const ::paddle_mobile::framework::proto::VarType_ReaderDesc* p = reader_; const ::paddle_mobile::framework::proto::VarType_ReaderDesc *p = reader_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.reader) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.reader)
return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework:: return p != NULL
proto::VarType_ReaderDesc*>( ? *p
&::paddle_mobile::framework::proto:: : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType_ReaderDesc
*>(&::paddle_mobile::framework::proto::
_VarType_ReaderDesc_default_instance_); _VarType_ReaderDesc_default_instance_);
} }
inline ::paddle_mobile::framework::proto::VarType_ReaderDesc* inline ::paddle_mobile::framework::proto::VarType_ReaderDesc *
VarType::mutable_reader() { VarType::mutable_reader() {
set_has_reader(); set_has_reader();
if (reader_ == NULL) { if (reader_ == NULL) {
...@@ -4468,16 +4493,16 @@ VarType::mutable_reader() { ...@@ -4468,16 +4493,16 @@ VarType::mutable_reader() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.reader) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.reader)
return reader_; return reader_;
} }
inline ::paddle_mobile::framework::proto::VarType_ReaderDesc* inline ::paddle_mobile::framework::proto::VarType_ReaderDesc *
VarType::release_reader() { VarType::release_reader() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.reader) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.reader)
clear_has_reader(); clear_has_reader();
::paddle_mobile::framework::proto::VarType_ReaderDesc* temp = reader_; ::paddle_mobile::framework::proto::VarType_ReaderDesc *temp = reader_;
reader_ = NULL; reader_ = NULL;
return temp; return temp;
} }
inline void VarType::set_allocated_reader( inline void VarType::set_allocated_reader(
::paddle_mobile::framework::proto::VarType_ReaderDesc* reader) { ::paddle_mobile::framework::proto::VarType_ReaderDesc *reader) {
delete reader_; delete reader_;
reader_ = reader; reader_ = reader;
if (reader) { if (reader) {
...@@ -4499,16 +4524,18 @@ inline void VarType::clear_channel() { ...@@ -4499,16 +4524,18 @@ inline void VarType::clear_channel() {
channel_->::paddle_mobile::framework::proto::VarType_ChannelDesc::Clear(); channel_->::paddle_mobile::framework::proto::VarType_ChannelDesc::Clear();
clear_has_channel(); clear_has_channel();
} }
inline const ::paddle_mobile::framework::proto::VarType_ChannelDesc& inline const ::paddle_mobile::framework::proto::VarType_ChannelDesc &
VarType::channel() const { VarType::channel() const {
const ::paddle_mobile::framework::proto::VarType_ChannelDesc* p = channel_; const ::paddle_mobile::framework::proto::VarType_ChannelDesc *p = channel_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.channel) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.channel)
return p != NULL ? *p : *reinterpret_cast<const ::paddle_mobile::framework:: return p != NULL
proto::VarType_ChannelDesc*>( ? *p
&::paddle_mobile::framework::proto:: : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType_ChannelDesc
*>(&::paddle_mobile::framework::proto::
_VarType_ChannelDesc_default_instance_); _VarType_ChannelDesc_default_instance_);
} }
inline ::paddle_mobile::framework::proto::VarType_ChannelDesc* inline ::paddle_mobile::framework::proto::VarType_ChannelDesc *
VarType::mutable_channel() { VarType::mutable_channel() {
set_has_channel(); set_has_channel();
if (channel_ == NULL) { if (channel_ == NULL) {
...@@ -4517,16 +4544,16 @@ VarType::mutable_channel() { ...@@ -4517,16 +4544,16 @@ VarType::mutable_channel() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.channel) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.channel)
return channel_; return channel_;
} }
inline ::paddle_mobile::framework::proto::VarType_ChannelDesc* inline ::paddle_mobile::framework::proto::VarType_ChannelDesc *
VarType::release_channel() { VarType::release_channel() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.channel) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.channel)
clear_has_channel(); clear_has_channel();
::paddle_mobile::framework::proto::VarType_ChannelDesc* temp = channel_; ::paddle_mobile::framework::proto::VarType_ChannelDesc *temp = channel_;
channel_ = NULL; channel_ = NULL;
return temp; return temp;
} }
inline void VarType::set_allocated_channel( inline void VarType::set_allocated_channel(
::paddle_mobile::framework::proto::VarType_ChannelDesc* channel) { ::paddle_mobile::framework::proto::VarType_ChannelDesc *channel) {
delete channel_; delete channel_;
channel_ = channel; channel_ = channel;
if (channel) { if (channel) {
...@@ -4548,18 +4575,18 @@ inline void VarType::clear_tuple() { ...@@ -4548,18 +4575,18 @@ inline void VarType::clear_tuple() {
tuple_->::paddle_mobile::framework::proto::VarType_Tuple::Clear(); tuple_->::paddle_mobile::framework::proto::VarType_Tuple::Clear();
clear_has_tuple(); clear_has_tuple();
} }
inline const ::paddle_mobile::framework::proto::VarType_Tuple& VarType::tuple() inline const ::paddle_mobile::framework::proto::VarType_Tuple &
const { VarType::tuple() const {
const ::paddle_mobile::framework::proto::VarType_Tuple* p = tuple_; const ::paddle_mobile::framework::proto::VarType_Tuple *p = tuple_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tuple) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tuple)
return p != NULL return p != NULL
? *p ? *p
: *reinterpret_cast< : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType_Tuple*>( const ::paddle_mobile::framework::proto::VarType_Tuple *>(
&::paddle_mobile::framework::proto:: &::paddle_mobile::framework::proto::
_VarType_Tuple_default_instance_); _VarType_Tuple_default_instance_);
} }
inline ::paddle_mobile::framework::proto::VarType_Tuple* inline ::paddle_mobile::framework::proto::VarType_Tuple *
VarType::mutable_tuple() { VarType::mutable_tuple() {
set_has_tuple(); set_has_tuple();
if (tuple_ == NULL) { if (tuple_ == NULL) {
...@@ -4568,16 +4595,16 @@ VarType::mutable_tuple() { ...@@ -4568,16 +4595,16 @@ VarType::mutable_tuple() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.tuple) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.tuple)
return tuple_; return tuple_;
} }
inline ::paddle_mobile::framework::proto::VarType_Tuple* inline ::paddle_mobile::framework::proto::VarType_Tuple *
VarType::release_tuple() { VarType::release_tuple() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.tuple) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.tuple)
clear_has_tuple(); clear_has_tuple();
::paddle_mobile::framework::proto::VarType_Tuple* temp = tuple_; ::paddle_mobile::framework::proto::VarType_Tuple *temp = tuple_;
tuple_ = NULL; tuple_ = NULL;
return temp; return temp;
} }
inline void VarType::set_allocated_tuple( inline void VarType::set_allocated_tuple(
::paddle_mobile::framework::proto::VarType_Tuple* tuple) { ::paddle_mobile::framework::proto::VarType_Tuple *tuple) {
delete tuple_; delete tuple_;
tuple_ = tuple; tuple_ = tuple;
if (tuple) { if (tuple) {
...@@ -4603,50 +4630,50 @@ inline void VarDesc::clear_name() { ...@@ -4603,50 +4630,50 @@ inline void VarDesc::clear_name() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name(); clear_has_name();
} }
inline const ::std::string& VarDesc::name() const { inline const ::std::string &VarDesc::name() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarDesc.name)
return name_.GetNoArena(); return name_.GetNoArena();
} }
inline void VarDesc::set_name(const ::std::string& value) { inline void VarDesc::set_name(const ::std::string &value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); value);
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarDesc.name)
} }
#if LANG_CXX11 #if LANG_CXX11
inline void VarDesc::set_name(::std::string&& value) { inline void VarDesc::set_name(::std::string &&value) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::move(value)); ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.VarDesc.name)
} }
#endif #endif
inline void VarDesc::set_name(const char* value) { inline void VarDesc::set_name(const char *value) {
GOOGLE_DCHECK(value != NULL); GOOGLE_DCHECK(value != NULL);
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); ::std::string(value));
// @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_set_char:paddle_mobile.framework.proto.VarDesc.name)
} }
inline void VarDesc::set_name(const char* value, size_t size) { inline void VarDesc::set_name(const char *value, size_t size) {
set_has_name(); set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size)); ::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.VarDesc.name)
} }
inline ::std::string* VarDesc::mutable_name() { inline ::std::string *VarDesc::mutable_name() {
set_has_name(); set_has_name();
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarDesc.name)
return name_.MutableNoArena( return name_.MutableNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline ::std::string* VarDesc::release_name() { inline ::std::string *VarDesc::release_name() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarDesc.name) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarDesc.name)
clear_has_name(); clear_has_name();
return name_.ReleaseNoArena( return name_.ReleaseNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited()); &::google::protobuf::internal::GetEmptyStringAlreadyInited());
} }
inline void VarDesc::set_allocated_name(::std::string* name) { inline void VarDesc::set_allocated_name(::std::string *name) {
if (name != NULL) { if (name != NULL) {
set_has_name(); set_has_name();
} else { } else {
...@@ -4664,19 +4691,20 @@ inline bool VarDesc::has_type() const { ...@@ -4664,19 +4691,20 @@ inline bool VarDesc::has_type() const {
inline void VarDesc::set_has_type() { _has_bits_[0] |= 0x00000002u; } inline void VarDesc::set_has_type() { _has_bits_[0] |= 0x00000002u; }
inline void VarDesc::clear_has_type() { _has_bits_[0] &= ~0x00000002u; } inline void VarDesc::clear_has_type() { _has_bits_[0] &= ~0x00000002u; }
inline void VarDesc::clear_type() { inline void VarDesc::clear_type() {
if (type_ != NULL) type_->::paddle_mobile::framework::proto::VarType::Clear(); if (type_ != NULL)
type_->::paddle_mobile::framework::proto::VarType::Clear();
clear_has_type(); clear_has_type();
} }
inline const ::paddle_mobile::framework::proto::VarType& VarDesc::type() const { inline const ::paddle_mobile::framework::proto::VarType &VarDesc::type() const {
const ::paddle_mobile::framework::proto::VarType* p = type_; const ::paddle_mobile::framework::proto::VarType *p = type_;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarDesc.type) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarDesc.type)
return p != NULL ? *p return p != NULL ? *p
: *reinterpret_cast< : *reinterpret_cast<
const ::paddle_mobile::framework::proto::VarType*>( const ::paddle_mobile::framework::proto::VarType *>(
&::paddle_mobile::framework::proto:: &::paddle_mobile::framework::proto::
_VarType_default_instance_); _VarType_default_instance_);
} }
inline ::paddle_mobile::framework::proto::VarType* VarDesc::mutable_type() { inline ::paddle_mobile::framework::proto::VarType *VarDesc::mutable_type() {
set_has_type(); set_has_type();
if (type_ == NULL) { if (type_ == NULL) {
type_ = new ::paddle_mobile::framework::proto::VarType; type_ = new ::paddle_mobile::framework::proto::VarType;
...@@ -4684,15 +4712,15 @@ inline ::paddle_mobile::framework::proto::VarType* VarDesc::mutable_type() { ...@@ -4684,15 +4712,15 @@ inline ::paddle_mobile::framework::proto::VarType* VarDesc::mutable_type() {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarDesc.type) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarDesc.type)
return type_; return type_;
} }
inline ::paddle_mobile::framework::proto::VarType* VarDesc::release_type() { inline ::paddle_mobile::framework::proto::VarType *VarDesc::release_type() {
// @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarDesc.type) // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarDesc.type)
clear_has_type(); clear_has_type();
::paddle_mobile::framework::proto::VarType* temp = type_; ::paddle_mobile::framework::proto::VarType *temp = type_;
type_ = NULL; type_ = NULL;
return temp; return temp;
} }
inline void VarDesc::set_allocated_type( inline void
::paddle_mobile::framework::proto::VarType* type) { VarDesc::set_allocated_type(::paddle_mobile::framework::proto::VarType *type) {
delete type_; delete type_;
type_ = type; type_ = type;
if (type) { if (type) {
...@@ -4770,28 +4798,28 @@ inline void BlockDesc::set_parent_idx(::google::protobuf::int32 value) { ...@@ -4770,28 +4798,28 @@ inline void BlockDesc::set_parent_idx(::google::protobuf::int32 value) {
// repeated .paddle_mobile.framework.proto.VarDesc vars = 3; // repeated .paddle_mobile.framework.proto.VarDesc vars = 3;
inline int BlockDesc::vars_size() const { return vars_.size(); } inline int BlockDesc::vars_size() const { return vars_.size(); }
inline void BlockDesc::clear_vars() { vars_.Clear(); } inline void BlockDesc::clear_vars() { vars_.Clear(); }
inline const ::paddle_mobile::framework::proto::VarDesc& BlockDesc::vars( inline const ::paddle_mobile::framework::proto::VarDesc &
int index) const { BlockDesc::vars(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.vars) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.vars)
return vars_.Get(index); return vars_.Get(index);
} }
inline ::paddle_mobile::framework::proto::VarDesc* BlockDesc::mutable_vars( inline ::paddle_mobile::framework::proto::VarDesc *
int index) { BlockDesc::mutable_vars(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.vars) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.vars)
return vars_.Mutable(index); return vars_.Mutable(index);
} }
inline ::paddle_mobile::framework::proto::VarDesc* BlockDesc::add_vars() { inline ::paddle_mobile::framework::proto::VarDesc *BlockDesc::add_vars() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.BlockDesc.vars) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.BlockDesc.vars)
return vars_.Add(); return vars_.Add();
} }
inline ::google::protobuf::RepeatedPtrField< inline ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::VarDesc>* ::paddle_mobile::framework::proto::VarDesc> *
BlockDesc::mutable_vars() { BlockDesc::mutable_vars() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.vars) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.vars)
return &vars_; return &vars_;
} }
inline const ::google::protobuf::RepeatedPtrField< inline const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::VarDesc>& ::paddle_mobile::framework::proto::VarDesc> &
BlockDesc::vars() const { BlockDesc::vars() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.vars) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.vars)
return vars_; return vars_;
...@@ -4800,28 +4828,28 @@ BlockDesc::vars() const { ...@@ -4800,28 +4828,28 @@ BlockDesc::vars() const {
// repeated .paddle_mobile.framework.proto.OpDesc ops = 4; // repeated .paddle_mobile.framework.proto.OpDesc ops = 4;
inline int BlockDesc::ops_size() const { return ops_.size(); } inline int BlockDesc::ops_size() const { return ops_.size(); }
inline void BlockDesc::clear_ops() { ops_.Clear(); } inline void BlockDesc::clear_ops() { ops_.Clear(); }
inline const ::paddle_mobile::framework::proto::OpDesc& BlockDesc::ops( inline const ::paddle_mobile::framework::proto::OpDesc &
int index) const { BlockDesc::ops(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.ops) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.ops)
return ops_.Get(index); return ops_.Get(index);
} }
inline ::paddle_mobile::framework::proto::OpDesc* BlockDesc::mutable_ops( inline ::paddle_mobile::framework::proto::OpDesc *
int index) { BlockDesc::mutable_ops(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.ops) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.ops)
return ops_.Mutable(index); return ops_.Mutable(index);
} }
inline ::paddle_mobile::framework::proto::OpDesc* BlockDesc::add_ops() { inline ::paddle_mobile::framework::proto::OpDesc *BlockDesc::add_ops() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.BlockDesc.ops) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.BlockDesc.ops)
return ops_.Add(); return ops_.Add();
} }
inline ::google::protobuf::RepeatedPtrField< inline ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc>* ::paddle_mobile::framework::proto::OpDesc> *
BlockDesc::mutable_ops() { BlockDesc::mutable_ops() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.ops) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.ops)
return &ops_; return &ops_;
} }
inline const ::google::protobuf::RepeatedPtrField< inline const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::OpDesc>& ::paddle_mobile::framework::proto::OpDesc> &
BlockDesc::ops() const { BlockDesc::ops() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.ops) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.ops)
return ops_; return ops_;
...@@ -4858,28 +4886,28 @@ inline void BlockDesc::set_forward_block_idx(::google::protobuf::int32 value) { ...@@ -4858,28 +4886,28 @@ inline void BlockDesc::set_forward_block_idx(::google::protobuf::int32 value) {
// repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1; // repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1;
inline int ProgramDesc::blocks_size() const { return blocks_.size(); } inline int ProgramDesc::blocks_size() const { return blocks_.size(); }
inline void ProgramDesc::clear_blocks() { blocks_.Clear(); } inline void ProgramDesc::clear_blocks() { blocks_.Clear(); }
inline const ::paddle_mobile::framework::proto::BlockDesc& ProgramDesc::blocks( inline const ::paddle_mobile::framework::proto::BlockDesc &
int index) const { ProgramDesc::blocks(int index) const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.ProgramDesc.blocks) // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.ProgramDesc.blocks)
return blocks_.Get(index); return blocks_.Get(index);
} }
inline ::paddle_mobile::framework::proto::BlockDesc* inline ::paddle_mobile::framework::proto::BlockDesc *
ProgramDesc::mutable_blocks(int index) { ProgramDesc::mutable_blocks(int index) {
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.ProgramDesc.blocks) // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.ProgramDesc.blocks)
return blocks_.Mutable(index); return blocks_.Mutable(index);
} }
inline ::paddle_mobile::framework::proto::BlockDesc* ProgramDesc::add_blocks() { inline ::paddle_mobile::framework::proto::BlockDesc *ProgramDesc::add_blocks() {
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.ProgramDesc.blocks) // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.ProgramDesc.blocks)
return blocks_.Add(); return blocks_.Add();
} }
inline ::google::protobuf::RepeatedPtrField< inline ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::BlockDesc>* ::paddle_mobile::framework::proto::BlockDesc> *
ProgramDesc::mutable_blocks() { ProgramDesc::mutable_blocks() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.ProgramDesc.blocks) // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.ProgramDesc.blocks)
return &blocks_; return &blocks_;
} }
inline const ::google::protobuf::RepeatedPtrField< inline const ::google::protobuf::RepeatedPtrField<
::paddle_mobile::framework::proto::BlockDesc>& ::paddle_mobile::framework::proto::BlockDesc> &
ProgramDesc::blocks() const { ProgramDesc::blocks() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.ProgramDesc.blocks) // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.ProgramDesc.blocks)
return blocks_; return blocks_;
......
...@@ -13,10 +13,10 @@ See the License for the specific language governing permissions and ...@@ -13,10 +13,10 @@ See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "lod_tensor.h" #include "lod_tensor.h"
#include <stdint.h>
#include <string.h>
#include <algorithm> #include <algorithm>
#include <iterator> #include <iterator>
#include <stdint.h>
#include <string.h>
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
...@@ -103,7 +103,8 @@ LoD SliceInLevel(const LoD &in, size_t level, size_t elem_begin, ...@@ -103,7 +103,8 @@ LoD SliceInLevel(const LoD &in, size_t level, size_t elem_begin,
LoD ToAbsOffset(const LoD &in) { LoD ToAbsOffset(const LoD &in) {
// the lowest level stores relative offsets // the lowest level stores relative offsets
if (in.empty() || in.size() == 1) return in; if (in.empty() || in.size() == 1)
return in;
LoD result = in; LoD result = in;
for (auto level = static_cast<int>(in.size() - 2); level >= 0; level--) { for (auto level = static_cast<int>(in.size() - 2); level >= 0; level--) {
for (size_t i = 0; i < in[level].size(); ++i) { for (size_t i = 0; i < in[level].size(); ++i) {
...@@ -135,16 +136,20 @@ bool operator==(const LoD &a, const LoD &b) { ...@@ -135,16 +136,20 @@ bool operator==(const LoD &a, const LoD &b) {
} }
bool CheckLoD(const LoD &in, int tensor_height) { bool CheckLoD(const LoD &in, int tensor_height) {
if (in.empty()) return true; if (in.empty())
return true;
for (const auto &level : in) { for (const auto &level : in) {
// check: there should be more than 2 offsets existing in each level. // check: there should be more than 2 offsets existing in each level.
if (level.size() < 2) return false; if (level.size() < 2)
return false;
// check: the first offset(the begin offset) of each level should be 0. // check: the first offset(the begin offset) of each level should be 0.
if (level.front() != 0) return false; if (level.front() != 0)
return false;
// check: all the offsets in a level should be ascending(no same items // check: all the offsets in a level should be ascending(no same items
// allows). // allows).
if (!std::is_sorted(level.begin(), level.begin(), [](size_t a, size_t b) { if (!std::is_sorted(level.begin(), level.begin(), [](size_t a, size_t b) {
if (a < b) return true; if (a < b)
return true;
return false; return false;
})) { })) {
std::cout << "ascending error"; std::cout << "ascending error";
...@@ -161,29 +166,34 @@ bool CheckLoD(const LoD &in, int tensor_height) { ...@@ -161,29 +166,34 @@ bool CheckLoD(const LoD &in, int tensor_height) {
// NOTE LoD store the levels from top to bottom, so the higher level goes // NOTE LoD store the levels from top to bottom, so the higher level goes
// first. // first.
for (size_t level = 0; level < in.size() - 1; level++) { for (size_t level = 0; level < in.size() - 1; level++) {
if (in[level].back() != in[level + 1].size() - 1) return false; if (in[level].back() != in[level + 1].size() - 1)
return false;
} }
return true; return true;
} }
bool CheckAbsLoD(const LoD &in, int tensor_height) { bool CheckAbsLoD(const LoD &in, int tensor_height) {
if (in.empty()) return true; if (in.empty())
return true;
for (const auto &level : in) { for (const auto &level : in) {
// check: all the offsets in a level should be ascending(no same items // check: all the offsets in a level should be ascending(no same items
// allows). // allows).
if (!std::is_sorted(level.begin(), level.begin(), [](size_t a, size_t b) { if (!std::is_sorted(level.begin(), level.begin(), [](size_t a, size_t b) {
if (a < b) return true; if (a < b)
return true;
return false; return false;
})) { })) {
return false; return false;
} }
// check: there should be more than 2 offsets existing in each level. // check: there should be more than 2 offsets existing in each level.
if (level.size() < 2) return false; if (level.size() < 2)
return false;
// check: the first offset of each level should be 0, and the last should be // check: the first offset of each level should be 0, and the last should be
// the same(the height of underlying tensor). // the same(the height of underlying tensor).
if (level.front() != 0) return false; if (level.front() != 0)
return false;
if (tensor_height < 0) { if (tensor_height < 0) {
tensor_height = level.back(); tensor_height = level.back();
} else if ((size_t)tensor_height != level.back()) { } else if ((size_t)tensor_height != level.back()) {
......
...@@ -14,12 +14,12 @@ limitations under the License. */ ...@@ -14,12 +14,12 @@ limitations under the License. */
#pragma once #pragma once
#include "tensor.h"
#include "tensor_util.h"
#include <memory> #include <memory>
#include <string> #include <string>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "tensor.h"
#include "tensor_util.h"
namespace paddle_mobile { namespace paddle_mobile {
...@@ -96,7 +96,7 @@ bool CheckAbsLoD(const LoD &in, int tensor_height = -1); ...@@ -96,7 +96,7 @@ bool CheckAbsLoD(const LoD &in, int tensor_height = -1);
* see https://en.wikipedia.org/wiki/Level_of_details for reference. * see https://en.wikipedia.org/wiki/Level_of_details for reference.
*/ */
class LoDTensor : public Tensor { class LoDTensor : public Tensor {
public: public:
LoDTensor() : Tensor() {} LoDTensor() : Tensor() {}
explicit LoDTensor(const LoD &lod) : lod_(lod) {} explicit LoDTensor(const LoD &lod) : lod_(lod) {}
...@@ -131,7 +131,7 @@ class LoDTensor : public Tensor { ...@@ -131,7 +131,7 @@ class LoDTensor : public Tensor {
return (lod_)[level].size() - 1; return (lod_)[level].size() - 1;
} }
private: private:
LoD lod_; LoD lod_;
}; };
...@@ -181,8 +181,9 @@ LoDTensor LodExpand(const LoDTensor &source, const LoD &lod, size_t level) { ...@@ -181,8 +181,9 @@ LoDTensor LodExpand(const LoDTensor &source, const LoD &lod, size_t level) {
// Returns: // Returns:
// LoD = [[1, 4], [2, 4, 2, 3, 2]] // LoD = [[1, 4], [2, 4, 2, 3, 2]]
// pair<size_t, size_t> = {11, 24} // pair<size_t, size_t> = {11, 24}
std::pair<LoD, std::pair<size_t, size_t>> GetSubLoDAndAbsoluteOffset( std::pair<LoD, std::pair<size_t, size_t>>
const LoD &lod, size_t start_idx, size_t end_idx, size_t start_level); GetSubLoDAndAbsoluteOffset(const LoD &lod, size_t start_idx, size_t end_idx,
size_t start_level);
void AppendLoD(LoD *lod, const LoD &lod_length); void AppendLoD(LoD *lod, const LoD &lod_length);
......
...@@ -26,7 +26,7 @@ namespace paddle_mobile { ...@@ -26,7 +26,7 @@ namespace paddle_mobile {
namespace framework { namespace framework {
class OpDesc : PaddleMobileObject { class OpDesc : PaddleMobileObject {
public: public:
OpDesc(const proto::OpDesc &desc); OpDesc(const proto::OpDesc &desc);
const std::vector<std::string> &Input(const std::string &name) const; const std::vector<std::string> &Input(const std::string &name) const;
const std::vector<std::string> &Output(const std::string &name) const; const std::vector<std::string> &Output(const std::string &name) const;
...@@ -40,7 +40,7 @@ class OpDesc : PaddleMobileObject { ...@@ -40,7 +40,7 @@ class OpDesc : PaddleMobileObject {
const std::string &Type() { return desc_.type(); }; const std::string &Type() { return desc_.type(); };
private: private:
proto::OpDesc desc_; proto::OpDesc desc_;
VariableNameMap inputs_; VariableNameMap inputs_;
VariableNameMap outputs_; VariableNameMap outputs_;
......
...@@ -24,42 +24,38 @@ SOFTWARE. ...@@ -24,42 +24,38 @@ SOFTWARE.
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
template <typename Dtype> template <typename Dtype> struct OpInfo {
struct OpInfo {
OpCreator<Dtype> creator_; OpCreator<Dtype> creator_;
const OpCreator<Dtype>& Creator() const { const OpCreator<Dtype> &Creator() const {
// PADDLE_ENFORCE_NOT_NULL(creator_, // PADDLE_ENFORCE_NOT_NULL(creator_,
// "Operator Creator has not been registered"); // "Operator Creator has not been registered");
return creator_; return creator_;
} }
}; };
template <typename Dtype> template <typename Dtype> class OpInfoMap;
class OpInfoMap;
template <typename Dtype> template <typename Dtype> static OpInfoMap<Dtype> *g_op_info_map = nullptr;
static OpInfoMap<Dtype>* g_op_info_map = nullptr;
template <typename Dtype> template <typename Dtype> class OpInfoMap {
class OpInfoMap { public:
public: static OpInfoMap &Instance() {
static OpInfoMap& Instance() {
if (g_op_info_map<Dtype> == nullptr) { if (g_op_info_map<Dtype> == nullptr) {
g_op_info_map<Dtype> = new OpInfoMap(); g_op_info_map<Dtype> = new OpInfoMap();
} }
return *g_op_info_map<Dtype>; return *g_op_info_map<Dtype>;
}; };
bool Has(const std::string& op_type) const { bool Has(const std::string &op_type) const {
return map_.find(op_type) != map_.end(); return map_.find(op_type) != map_.end();
} }
void Insert(const std::string& type, const OpInfo<Dtype>& info) { void Insert(const std::string &type, const OpInfo<Dtype> &info) {
// PADDLE_ENFORCE(!Has(type), "Operator %s has been registered", type); // PADDLE_ENFORCE(!Has(type), "Operator %s has been registered", type);
map_.insert({type, info}); map_.insert({type, info});
} }
const OpInfo<Dtype>& Get(const std::string& type) const { const OpInfo<Dtype> &Get(const std::string &type) const {
auto op_info_ptr = GetNullable(type); auto op_info_ptr = GetNullable(type);
// PADDLE_ENFORCE_NOT_NULL(op_info_ptr, "Operator %s has not been // PADDLE_ENFORCE_NOT_NULL(op_info_ptr, "Operator %s has not been
// registered", // registered",
...@@ -67,7 +63,7 @@ class OpInfoMap { ...@@ -67,7 +63,7 @@ class OpInfoMap {
return *op_info_ptr; return *op_info_ptr;
} }
const OpInfo<Dtype>* GetNullable(const std::string& type) const { const OpInfo<Dtype> *GetNullable(const std::string &type) const {
auto it = map_.find(type); auto it = map_.find(type);
if (it == map_.end()) { if (it == map_.end()) {
return nullptr; return nullptr;
...@@ -76,15 +72,15 @@ class OpInfoMap { ...@@ -76,15 +72,15 @@ class OpInfoMap {
} }
} }
const std::unordered_map<std::string, OpInfo<Dtype>>& map() const { const std::unordered_map<std::string, OpInfo<Dtype>> &map() const {
return map_; return map_;
} }
std::unordered_map<std::string, OpInfo<Dtype>>* mutable_map() { std::unordered_map<std::string, OpInfo<Dtype>> *mutable_map() {
return &map_; return &map_;
} }
private: private:
OpInfoMap() = default; OpInfoMap() = default;
std::unordered_map<std::string, OpInfo<Dtype>> map_; std::unordered_map<std::string, OpInfo<Dtype>> map_;
......
...@@ -25,7 +25,7 @@ namespace paddle_mobile { ...@@ -25,7 +25,7 @@ namespace paddle_mobile {
namespace framework { namespace framework {
struct OpKernelType { struct OpKernelType {
struct Hash { struct Hash {
size_t operator()(const OpKernelType& key) const { size_t operator()(const OpKernelType &key) const {
int data_type = static_cast<int>(key.data_type_) << LEFT_SHIFT; int data_type = static_cast<int>(key.data_type_) << LEFT_SHIFT;
int data_layout = static_cast<int>(key.data_layout_) << (LEFT_SHIFT * 2); int data_layout = static_cast<int>(key.data_layout_) << (LEFT_SHIFT * 2);
...@@ -44,18 +44,18 @@ struct OpKernelType { ...@@ -44,18 +44,18 @@ struct OpKernelType {
DataLayout data_layout = DataLayout::kAnyLayout) DataLayout data_layout = DataLayout::kAnyLayout)
: data_type_(data_type), data_layout_(data_layout) {} : data_type_(data_type), data_layout_(data_layout) {}
bool operator==(const OpKernelType& o) const { bool operator==(const OpKernelType &o) const {
return data_type_ == o.data_type_ && data_layout_ == o.data_layout_; return data_type_ == o.data_type_ && data_layout_ == o.data_layout_;
} }
bool operator!=(const OpKernelType& o) const { return !(*this == o); } bool operator!=(const OpKernelType &o) const { return !(*this == o); }
}; };
inline bool NeedTransformLayout(const DataLayout& l, const DataLayout& r) { inline bool NeedTransformLayout(const DataLayout &l, const DataLayout &r) {
return l != DataLayout::kAnyLayout && r != DataLayout::kAnyLayout && l != r; return l != DataLayout::kAnyLayout && r != DataLayout::kAnyLayout && l != r;
} }
inline bool TransFromNeeded(const OpKernelType& l, const OpKernelType& r) { inline bool TransFromNeeded(const OpKernelType &l, const OpKernelType &r) {
return (l.data_type_ != r.data_type_) || return (l.data_type_ != r.data_type_) ||
NeedTransformLayout(l.data_layout_, r.data_layout_); NeedTransformLayout(l.data_layout_, r.data_layout_);
} }
......
...@@ -23,23 +23,17 @@ namespace paddle_mobile { ...@@ -23,23 +23,17 @@ namespace paddle_mobile {
namespace framework { namespace framework {
template <typename Dtype> template <typename Dtype>
OperatorBase<Dtype>::OperatorBase(const std::string& type, OperatorBase<Dtype>::OperatorBase(const std::string &type,
const VariableNameMap& inputs, const VariableNameMap &inputs,
const VariableNameMap& outputs, const VariableNameMap &outputs,
const AttributeMap& attrs, const AttributeMap &attrs,
std::shared_ptr<Scope> scope) std::shared_ptr<Scope> scope)
: type_(type), : type_(type), inputs_(inputs), outputs_(outputs), attrs_(attrs),
inputs_(inputs),
outputs_(outputs),
attrs_(attrs),
scope_(scope) { scope_(scope) {
CheckAllInputOutputSet(); CheckAllInputOutputSet();
} }
template <typename Dtype> template <typename Dtype> void OperatorBase<Dtype>::Run() { RunImpl(); }
void OperatorBase<Dtype>::Run() {
RunImpl();
}
template <typename Dtype> template <typename Dtype>
void OperatorBase<Dtype>::CheckAllInputOutputSet() const {} void OperatorBase<Dtype>::CheckAllInputOutputSet() const {}
......
...@@ -35,50 +35,48 @@ SOFTWARE. ...@@ -35,50 +35,48 @@ SOFTWARE.
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
template <typename Dtype> template <typename Dtype> class OperatorBase : PaddleMobileObject {
class OperatorBase : PaddleMobileObject { public:
public: OperatorBase(const std::string &type, const VariableNameMap &inputs,
OperatorBase(const std::string& type, const VariableNameMap& inputs, const VariableNameMap &outputs, const AttributeMap &attrs,
const VariableNameMap& outputs, const AttributeMap& attrs,
std::shared_ptr<Scope> scope); std::shared_ptr<Scope> scope);
virtual ~OperatorBase() {} virtual ~OperatorBase() {}
virtual void Run(); virtual void Run();
const VariableNameMap& Inputs() const { return inputs_; } const VariableNameMap &Inputs() const { return inputs_; }
const VariableNameMap& Outputs() const { return outputs_; } const VariableNameMap &Outputs() const { return outputs_; }
const std::string& Type() const { return type_; } const std::string &Type() const { return type_; }
const AttributeMap& Attrs() const { return attrs_; } const AttributeMap &Attrs() const { return attrs_; }
protected: protected:
std::shared_ptr<Scope> scope_; std::shared_ptr<Scope> scope_;
std::string type_; std::string type_;
VariableNameMap inputs_; VariableNameMap inputs_;
VariableNameMap outputs_; VariableNameMap outputs_;
AttributeMap attrs_; AttributeMap attrs_;
private: private:
void CheckAllInputOutputSet() const; void CheckAllInputOutputSet() const;
virtual void RunImpl() const = 0; virtual void RunImpl() const = 0;
}; };
template <typename Dtype> template <typename Dtype>
class OperatorWithKernel : public OperatorBase<Dtype> { class OperatorWithKernel : public OperatorBase<Dtype> {
public: public:
OperatorWithKernel(const std::string& type, const VariableNameMap& inputs, OperatorWithKernel(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap& outputs, const AttributeMap& attrs, const VariableNameMap &outputs, const AttributeMap &attrs,
std::shared_ptr<Scope> scope) std::shared_ptr<Scope> scope)
: OperatorBase<Dtype>(type, inputs, outputs, attrs, scope) {} : OperatorBase<Dtype>(type, inputs, outputs, attrs, scope) {}
virtual void InferShape() const = 0; virtual void InferShape() const = 0;
protected: protected:
virtual void RunImpl() const = 0; virtual void RunImpl() const = 0;
private: private:
}; };
template <typename Dtype, typename P> template <typename Dtype, typename P> class OpKernelBase : PaddleMobileObject {
class OpKernelBase : PaddleMobileObject { public:
public: virtual void Compute(const P &para) const = 0;
virtual void Compute(const P& para) const = 0;
virtual ~OpKernelBase() = default; virtual ~OpKernelBase() = default;
}; };
......
...@@ -18,19 +18,19 @@ SOFTWARE. ...@@ -18,19 +18,19 @@ SOFTWARE.
#pragma once #pragma once
#include <string>
#include "stdio.h" #include "stdio.h"
#include <string>
namespace paddle_mobile { namespace paddle_mobile {
class PaddleMobileObject { class PaddleMobileObject {
public: public:
virtual inline const std::string& ToString() { virtual inline const std::string &ToString() {
char address[128] = {0}; char address[128] = {0};
sprintf(address, "%p", this); sprintf(address, "%p", this);
return std::string(address); return std::string(address);
} }
private: private:
}; };
} // namespace paddle_mobile } // namespace paddle_mobile
...@@ -28,12 +28,12 @@ namespace framework { ...@@ -28,12 +28,12 @@ namespace framework {
template <typename Dtype, Precision P = Precision::FP32> template <typename Dtype, Precision P = Precision::FP32>
class Program : PaddleMobileObject { class Program : PaddleMobileObject {
public: public:
std::shared_ptr<ProgramDesc> originProgram; std::shared_ptr<ProgramDesc> originProgram;
std::shared_ptr<ProgramDesc> optimizeProgram; std::shared_ptr<ProgramDesc> optimizeProgram;
std::shared_ptr<Scope> scope; std::shared_ptr<Scope> scope;
private: private:
}; };
} // namespace framework } // namespace framework
......
...@@ -28,12 +28,12 @@ namespace paddle_mobile { ...@@ -28,12 +28,12 @@ namespace paddle_mobile {
namespace framework { namespace framework {
class ProgramDesc : PaddleMobileObject { class ProgramDesc : PaddleMobileObject {
public: public:
ProgramDesc(const proto::ProgramDesc &desc); ProgramDesc(const proto::ProgramDesc &desc);
std::shared_ptr<BlockDesc> Block(size_t idx); std::shared_ptr<BlockDesc> Block(size_t idx);
const std::vector<std::shared_ptr<BlockDesc>> &Blocks() { return blocks_; }; const std::vector<std::shared_ptr<BlockDesc>> &Blocks() { return blocks_; };
private: private:
std::vector<std::shared_ptr<BlockDesc>> blocks_; std::vector<std::shared_ptr<BlockDesc>> blocks_;
proto::ProgramDesc desc_; proto::ProgramDesc desc_;
}; };
......
...@@ -18,38 +18,38 @@ SOFTWARE. ...@@ -18,38 +18,38 @@ SOFTWARE.
==============================================================================*/ ==============================================================================*/
#pragma once #pragma once
#include "variable.h"
#include <list> //std::list #include <list> //std::list
#include <mutex> //std::mutex #include <mutex> //std::mutex
#include <unordered_map> //std::unordered_map #include <unordered_map> //std::unordered_map
#include "variable.h"
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
class Scope { class Scope {
public: public:
Scope() {} Scope() {}
~Scope() {} ~Scope() {}
Scope& NewScope() const; Scope &NewScope() const;
/// Create a variable with given name if it doesn't exist. /// Create a variable with given name if it doesn't exist.
Variable* Var(const std::string& name); Variable *Var(const std::string &name);
/// Create a variable with a scope-unique name. /// Create a variable with a scope-unique name.
Variable* Var(std::string* name = nullptr); Variable *Var(std::string *name = nullptr);
void EraseVars(const std::vector<std::string>& var_names); void EraseVars(const std::vector<std::string> &var_names);
/// Find a variable in the scope or any of its ancestors. Returns /// Find a variable in the scope or any of its ancestors. Returns
/// nullptr if cannot find. /// nullptr if cannot find.
Variable* FindVar(const std::string& name) const; Variable *FindVar(const std::string &name) const;
const Scope* parent() const { return parent_; } const Scope *parent() const { return parent_; }
/// Find the scope or an ancestor scope that contains the given variable. /// Find the scope or an ancestor scope that contains the given variable.
const Scope* FindScope(const Variable* var) const; const Scope *FindScope(const Variable *var) const;
void DeleteScope(Scope* scope) const; void DeleteScope(Scope *scope) const;
/// Drop all kids scopes belonged to this scope. /// Drop all kids scopes belonged to this scope.
void DropKids(); void DropKids();
...@@ -58,21 +58,21 @@ class Scope { ...@@ -58,21 +58,21 @@ class Scope {
std::vector<std::string> LocalVarNames() const; std::vector<std::string> LocalVarNames() const;
// Rename variable to a new name // Rename variable to a new name
void Rename(const std::string& origin_name, void Rename(const std::string &origin_name,
const std::string& new_name) const; const std::string &new_name) const;
// Rename variable to a new name and return the new name // Rename variable to a new name and return the new name
std::string Rename(const std::string& origin_name) const; std::string Rename(const std::string &origin_name) const;
Variable* FindVarLocally(const std::string& name) const; Variable *FindVarLocally(const std::string &name) const;
private: private:
// Call Scope::NewScope for a sub-scope. // Call Scope::NewScope for a sub-scope.
explicit Scope(Scope const* parent) : parent_(parent) {} explicit Scope(Scope const *parent) : parent_(parent) {}
mutable std::unordered_map<std::string, Variable*> vars_; mutable std::unordered_map<std::string, Variable *> vars_;
mutable std::list<Scope*> kids_; mutable std::list<Scope *> kids_;
Scope const* parent_{nullptr}; Scope const *parent_{nullptr};
mutable std::mutex mutex_; mutable std::mutex mutex_;
}; };
......
...@@ -27,8 +27,8 @@ namespace paddle_mobile { ...@@ -27,8 +27,8 @@ namespace paddle_mobile {
namespace framework { namespace framework {
class SelectedRows { class SelectedRows {
public: public:
SelectedRows(const std::vector<int64_t>& rows, const int64_t& height) SelectedRows(const std::vector<int64_t> &rows, const int64_t &height)
: rows_(rows), height_(height) { : rows_(rows), height_(height) {
value_.reset(new Tensor()); value_.reset(new Tensor());
} }
...@@ -38,19 +38,19 @@ class SelectedRows { ...@@ -38,19 +38,19 @@ class SelectedRows {
value_.reset(new Tensor()); value_.reset(new Tensor());
} }
const Tensor& value() const { return *value_; } const Tensor &value() const { return *value_; }
Tensor* mutable_value() { return value_.get(); } Tensor *mutable_value() { return value_.get(); }
int64_t height() const { return height_; } int64_t height() const { return height_; }
void set_height(int64_t height) { height_ = height; } void set_height(int64_t height) { height_ = height; }
const std::vector<int64_t>& rows() const { return rows_; } const std::vector<int64_t> &rows() const { return rows_; }
std::vector<int64_t>* mutable_rows() { return &rows_; } std::vector<int64_t> *mutable_rows() { return &rows_; }
void set_rows(const std::vector<int64_t>& rows) { rows_ = rows; } void set_rows(const std::vector<int64_t> &rows) { rows_ = rows; }
/** /**
* get the index of id in rows * get the index of id in rows
...@@ -67,7 +67,7 @@ class SelectedRows { ...@@ -67,7 +67,7 @@ class SelectedRows {
return make_ddim(dims); return make_ddim(dims);
} }
private: private:
// Notice: rows can be duplicate. We can have {0, 4, 7, 0, 5, 7, 9} here. // Notice: rows can be duplicate. We can have {0, 4, 7, 0, 5, 7, 9} here.
// SelectedRows are simply concated when adding together. Until a // SelectedRows are simply concated when adding together. Until a
// SelectedRows add a Tensor, will the duplicate rows be handled. // SelectedRows add a Tensor, will the duplicate rows be handled.
......
...@@ -26,11 +26,9 @@ limitations under the License. */ ...@@ -26,11 +26,9 @@ limitations under the License. */
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
template <typename... T> template <typename... T> struct SizeOfTypeFunctor;
struct SizeOfTypeFunctor;
template <typename T> template <typename T> struct SizeOfTypeFunctor<T> {
struct SizeOfTypeFunctor<T> {
size_t operator()(std::type_index type) const { size_t operator()(std::type_index type) const {
if (typeid(T).hash_code() == type.hash_code()) { if (typeid(T).hash_code() == type.hash_code()) {
return sizeof(T); return sizeof(T);
...@@ -40,8 +38,7 @@ struct SizeOfTypeFunctor<T> { ...@@ -40,8 +38,7 @@ struct SizeOfTypeFunctor<T> {
} }
}; };
template <> template <> struct SizeOfTypeFunctor<> {
struct SizeOfTypeFunctor<> {
size_t operator()(std::type_index type) const { return 0UL; } size_t operator()(std::type_index type) const { return 0UL; }
}; };
...@@ -68,12 +65,11 @@ static inline size_t SizeOfType(std::type_index type) { ...@@ -68,12 +65,11 @@ static inline size_t SizeOfType(std::type_index type) {
class LoDTensor; class LoDTensor;
class Tensor { class Tensor {
public: public:
Tensor() : offset_(0) {} Tensor() : offset_(0) {}
/*! Return a pointer to mutable memory block. */ /*! Return a pointer to mutable memory block. */
template <typename T> template <typename T> inline T *data() {
inline T *data() {
check_memory_size(); check_memory_size();
// PADDLE_ENFORCE(std::is_same<T, void>::value || // PADDLE_ENFORCE(std::is_same<T, void>::value ||
// holder_->type().hash_code() == typeid(T).hash_code(), // holder_->type().hash_code() == typeid(T).hash_code(),
...@@ -84,8 +80,7 @@ class Tensor { ...@@ -84,8 +80,7 @@ class Tensor {
} }
/*! Return a pointer to constant memory block. */ /*! Return a pointer to constant memory block. */
template <typename T> template <typename T> inline const T *data() const {
inline const T *data() const {
check_memory_size(); check_memory_size();
// PADDLE_ENFORCE(std::is_same<T, void>::value || // PADDLE_ENFORCE(std::is_same<T, void>::value ||
// holder_->type().hash_code() == typeid(T).hash_code(), // holder_->type().hash_code() == typeid(T).hash_code(),
...@@ -102,8 +97,7 @@ class Tensor { ...@@ -102,8 +97,7 @@ class Tensor {
* @brief Return a pointer to mutable memory block. * @brief Return a pointer to mutable memory block.
* @note If not exist, then allocation. * @note If not exist, then allocation.
*/ */
template <typename T> template <typename T> inline T *mutable_data() {
inline T *mutable_data() {
static_assert(std::is_pod<T>::value, "T must be POD"); static_assert(std::is_pod<T>::value, "T must be POD");
return reinterpret_cast<T *>(mutable_data(typeid(T))); return reinterpret_cast<T *>(mutable_data(typeid(T)));
} }
...@@ -141,8 +135,7 @@ class Tensor { ...@@ -141,8 +135,7 @@ class Tensor {
* *
* @note If not exist, then allocation. * @note If not exist, then allocation.
*/ */
template <typename T> template <typename T> inline T *mutable_data(DDim dims) {
inline T *mutable_data(DDim dims) {
static_assert(std::is_pod<T>::value, "T must be POD"); static_assert(std::is_pod<T>::value, "T must be POD");
Resize(dims); Resize(dims);
return mutable_data<T>(); return mutable_data<T>();
...@@ -227,7 +220,7 @@ class Tensor { ...@@ -227,7 +220,7 @@ class Tensor {
inline void set_layout(const DataLayout layout) { layout_ = layout; } inline void set_layout(const DataLayout layout) { layout_ = layout; }
private: private:
/** /**
* @note Placeholder hides type T, so it doesn't appear as a template * @note Placeholder hides type T, so it doesn't appear as a template
* parameter of Variable. * parameter of Variable.
...@@ -248,8 +241,7 @@ class Tensor { ...@@ -248,8 +241,7 @@ class Tensor {
PlaceholderImpl(size_t size, std::type_index type) PlaceholderImpl(size_t size, std::type_index type)
: ptr_(static_cast<uint8_t *>(memory::Alloc(size)), : ptr_(static_cast<uint8_t *>(memory::Alloc(size)),
memory::PODDeleter<uint8_t>()), memory::PODDeleter<uint8_t>()),
size_(size), size_(size), type_(type) {
type_(type) {
// PADDLE_ENFORCE_NOT_NULL(ptr_, "Insufficient %s // PADDLE_ENFORCE_NOT_NULL(ptr_, "Insufficient %s
// memory to allocation.", // memory to allocation.",
// (is_cpu_place(place_) ? // (is_cpu_place(place_) ?
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
void TensorCopy(const Tensor& src, Tensor* dst) { void TensorCopy(const Tensor &src, Tensor *dst) {
// VLOG(3) << "TensorCopy " << src.dims() << " from " << src.place() << " to // VLOG(3) << "TensorCopy " << src.dims() << " from " << src.place() << " to
// " // "
// << dst_place; // << dst_place;
...@@ -37,7 +37,7 @@ void TensorCopy(const Tensor& src, Tensor* dst) { ...@@ -37,7 +37,7 @@ void TensorCopy(const Tensor& src, Tensor* dst) {
memory::Copy(dst_ptr, src_ptr, size); memory::Copy(dst_ptr, src_ptr, size);
} }
void TensorCopySync(const Tensor& src, Tensor* dst) { void TensorCopySync(const Tensor &src, Tensor *dst) {
// VLOG(3) << "TensorCopySync " << src.dims() << " from " << src.place() // VLOG(3) << "TensorCopySync " << src.dims() << " from " << src.place()
// << " to " << dst_place; // << " to " << dst_place;
src.check_memory_size(); src.check_memory_size();
...@@ -49,17 +49,15 @@ void TensorCopySync(const Tensor& src, Tensor* dst) { ...@@ -49,17 +49,15 @@ void TensorCopySync(const Tensor& src, Tensor* dst) {
memory::Copy(dst_ptr, src_ptr, size); memory::Copy(dst_ptr, src_ptr, size);
} }
template <typename Predicate> template <typename Predicate> struct AnyDTypeVisitor {
struct AnyDTypeVisitor {
Predicate predicate_; Predicate predicate_;
const Tensor& tensor_; const Tensor &tensor_;
Tensor* out_; Tensor *out_;
AnyDTypeVisitor(Predicate predicate, const Tensor& tensor, Tensor* out) AnyDTypeVisitor(Predicate predicate, const Tensor &tensor, Tensor *out)
: predicate_(predicate), tensor_(tensor), out_(out) {} : predicate_(predicate), tensor_(tensor), out_(out) {}
template <typename T> template <typename T> void operator()() const {
void operator()() const {
// auto t = EigenVector<T>::Flatten(tensor_); // auto t = EigenVector<T>::Flatten(tensor_);
// auto o = EigenScalar<bool>::From(*out_); // auto o = EigenScalar<bool>::From(*out_);
// return any of predicate_(t) is true. // return any of predicate_(t) is true.
...@@ -68,18 +66,17 @@ struct AnyDTypeVisitor { ...@@ -68,18 +66,17 @@ struct AnyDTypeVisitor {
}; };
template <typename Predicate> template <typename Predicate>
inline void AnyImpl(Predicate predicate, const Tensor& tensor, inline void AnyImpl(Predicate predicate, const Tensor &tensor,
framework::Tensor* out) { framework::Tensor *out) {
VisitDataType(ToDataType(tensor.type()), VisitDataType(ToDataType(tensor.type()),
AnyDTypeVisitor<Predicate>(predicate, tensor, out)); AnyDTypeVisitor<Predicate>(predicate, tensor, out));
} }
template <typename Predicate> template <typename Predicate> struct AnyVisitor {
struct AnyVisitor { const framework::Tensor &tensor_;
const framework::Tensor& tensor_;
Predicate predicate_; Predicate predicate_;
AnyVisitor(const framework::Tensor& tensor, Predicate predicate) AnyVisitor(const framework::Tensor &tensor, Predicate predicate)
: tensor_(tensor), predicate_(std::move(predicate)) {} : tensor_(tensor), predicate_(std::move(predicate)) {}
bool operator()(void) const { bool operator()(void) const {
...@@ -90,13 +87,13 @@ struct AnyVisitor { ...@@ -90,13 +87,13 @@ struct AnyVisitor {
return this->GetResult(out); return this->GetResult(out);
} }
bool GetResult(const framework::Tensor& out) const { bool GetResult(const framework::Tensor &out) const {
return *out.data<bool>(); return *out.data<bool>();
} }
}; };
template <typename Predicate> template <typename Predicate>
inline bool Any(const framework::Tensor& tensor, Predicate predicate) { inline bool Any(const framework::Tensor &tensor, Predicate predicate) {
AnyVisitor<Predicate> visitor(tensor, predicate); AnyVisitor<Predicate> visitor(tensor, predicate);
// return platform::VisitPlace(visitor); // return platform::VisitPlace(visitor);
return visitor(); return visitor();
...@@ -104,36 +101,36 @@ inline bool Any(const framework::Tensor& tensor, Predicate predicate) { ...@@ -104,36 +101,36 @@ inline bool Any(const framework::Tensor& tensor, Predicate predicate) {
struct ContainsNANPredicate { struct ContainsNANPredicate {
template <typename T> template <typename T>
auto operator()(const T& eigen_vec) const auto operator()(const T &eigen_vec) const
-> decltype(std::declval<T>().isnan()) { -> decltype(std::declval<T>().isnan()) {
// Cast eigen_vector to vector of bool. true if is inf. // Cast eigen_vector to vector of bool. true if is inf.
return eigen_vec.isnan(); return eigen_vec.isnan();
} }
}; };
bool TensorContainsNAN(const framework::Tensor& tensor) { bool TensorContainsNAN(const framework::Tensor &tensor) {
ContainsNANPredicate predicate; ContainsNANPredicate predicate;
return Any(tensor, predicate); return Any(tensor, predicate);
} }
struct ContainsInfPredicate { struct ContainsInfPredicate {
template <typename T> template <typename T>
auto operator()(const T& eigen_vec) const auto operator()(const T &eigen_vec) const
-> decltype(std::declval<T>().isinf()) { -> decltype(std::declval<T>().isinf()) {
// Cast eigen_vector to vector of bool. true if is inf. // Cast eigen_vector to vector of bool. true if is inf.
return eigen_vec.isinf(); return eigen_vec.isinf();
} }
}; };
bool TensorContainsInf(const framework::Tensor& tensor) { bool TensorContainsInf(const framework::Tensor &tensor) {
ContainsInfPredicate predicate; ContainsInfPredicate predicate;
return Any(tensor, predicate); return Any(tensor, predicate);
} }
void TensorToStream(std::ostream& os, const Tensor& tensor) { void TensorToStream(std::ostream &os, const Tensor &tensor) {
{ // the 1st field, uint32_t version { // the 1st field, uint32_t version
constexpr uint32_t version = 0; constexpr uint32_t version = 0;
os.write(reinterpret_cast<const char*>(&version), sizeof(version)); os.write(reinterpret_cast<const char *>(&version), sizeof(version));
} }
{ // the 2nd field, tensor description { // the 2nd field, tensor description
// int32_t size // int32_t size
...@@ -141,49 +138,48 @@ void TensorToStream(std::ostream& os, const Tensor& tensor) { ...@@ -141,49 +138,48 @@ void TensorToStream(std::ostream& os, const Tensor& tensor) {
proto::VarType::TensorDesc desc; proto::VarType::TensorDesc desc;
desc.set_data_type(framework::ToDataType(tensor.type())); desc.set_data_type(framework::ToDataType(tensor.type()));
auto dims = framework::vectorize(tensor.dims()); auto dims = framework::vectorize(tensor.dims());
auto* pb_dims = desc.mutable_dims(); auto *pb_dims = desc.mutable_dims();
pb_dims->Resize(static_cast<int>(dims.size()), 0); pb_dims->Resize(static_cast<int>(dims.size()), 0);
std::copy(dims.begin(), dims.end(), pb_dims->begin()); std::copy(dims.begin(), dims.end(), pb_dims->begin());
int32_t size = desc.ByteSize(); int32_t size = desc.ByteSize();
os.write(reinterpret_cast<const char*>(&size), sizeof(size)); os.write(reinterpret_cast<const char *>(&size), sizeof(size));
auto out = desc.SerializeAsString(); auto out = desc.SerializeAsString();
os.write(out.data(), size); os.write(out.data(), size);
} }
{ // the 3rd field, tensor data { // the 3rd field, tensor data
uint64_t size = tensor.memory_size(); uint64_t size = tensor.memory_size();
auto* data_ptr = tensor.data<void>(); auto *data_ptr = tensor.data<void>();
// PADDLE_ENFORCE(size < std::numeric_limits<std::streamsize>::max(), // PADDLE_ENFORCE(size < std::numeric_limits<std::streamsize>::max(),
// "Index overflow when writing tensor"); // "Index overflow when writing tensor");
os.write(static_cast<const char*>(data_ptr), os.write(static_cast<const char *>(data_ptr),
static_cast<std::streamsize>(size)); static_cast<std::streamsize>(size));
} }
} }
struct DeserializedDataFunctor { struct DeserializedDataFunctor {
DeserializedDataFunctor(void** buf, Tensor* tensor) DeserializedDataFunctor(void **buf, Tensor *tensor)
: buf_(buf), tensor_(tensor) {} : buf_(buf), tensor_(tensor) {}
template <typename T> template <typename T> void operator()() {
void operator()() {
*buf_ = tensor_->mutable_data<T>(); *buf_ = tensor_->mutable_data<T>();
} }
void** buf_; void **buf_;
Tensor* tensor_; Tensor *tensor_;
}; };
void TensorFromStream(std::istream& is, framework::Tensor* tensor) { void TensorFromStream(std::istream &is, framework::Tensor *tensor) {
uint32_t version; uint32_t version;
is.read(reinterpret_cast<char*>(&version), sizeof(version)); is.read(reinterpret_cast<char *>(&version), sizeof(version));
// PADDLE_ENFORCE_EQ(version, 0U, "Only version 0 is supported"); // PADDLE_ENFORCE_EQ(version, 0U, "Only version 0 is supported");
proto::VarType::TensorDesc desc; proto::VarType::TensorDesc desc;
{ // int32_t size { // int32_t size
// proto buffer // proto buffer
int32_t size; int32_t size;
is.read(reinterpret_cast<char*>(&size), sizeof(size)); is.read(reinterpret_cast<char *>(&size), sizeof(size));
std::unique_ptr<char[]> buf(new char[size]); std::unique_ptr<char[]> buf(new char[size]);
is.read(reinterpret_cast<char*>(buf.get()), size); is.read(reinterpret_cast<char *>(buf.get()), size);
// PADDLE_ENFORCE(desc.ParseFromArray(buf.get(), size), // PADDLE_ENFORCE(desc.ParseFromArray(buf.get(), size),
// "Cannot parse tensor desc"); // "Cannot parse tensor desc");
} }
...@@ -192,11 +188,11 @@ void TensorFromStream(std::istream& is, framework::Tensor* tensor) { ...@@ -192,11 +188,11 @@ void TensorFromStream(std::istream& is, framework::Tensor* tensor) {
dims.reserve(static_cast<size_t>(desc.dims().size())); dims.reserve(static_cast<size_t>(desc.dims().size()));
std::copy(desc.dims().begin(), desc.dims().end(), std::back_inserter(dims)); std::copy(desc.dims().begin(), desc.dims().end(), std::back_inserter(dims));
tensor->Resize(framework::make_ddim(dims)); tensor->Resize(framework::make_ddim(dims));
void* buf; void *buf;
framework::VisitDataType(desc.data_type(), framework::VisitDataType(desc.data_type(),
DeserializedDataFunctor(&buf, tensor)); DeserializedDataFunctor(&buf, tensor));
is.read(static_cast<char*>(buf), tensor->memory_size()); is.read(static_cast<char *>(buf), tensor->memory_size());
} }
} }
......
...@@ -13,51 +13,51 @@ See the License for the specific language governing permissions and ...@@ -13,51 +13,51 @@ See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#pragma once #pragma once
#include <vector>
#include "framework.pb.h" #include "framework.pb.h"
#include "memory/t_malloc.h" #include "memory/t_malloc.h"
#include "platform/data_type.h" #include "platform/data_type.h"
#include "tensor.h" #include "tensor.h"
#include <vector>
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
void TensorCopy(const Tensor& src, Tensor* dst); void TensorCopy(const Tensor &src, Tensor *dst);
void TensorCopySync(const Tensor& src, Tensor* dst); void TensorCopySync(const Tensor &src, Tensor *dst);
template <typename T> template <typename T>
void TensorFromVector(const std::vector<T>& src, Tensor* dst); void TensorFromVector(const std::vector<T> &src, Tensor *dst);
template <typename T> template <typename T>
void TesnorToVector(const Tensor& src, std::vector<T>* dst); void TesnorToVector(const Tensor &src, std::vector<T> *dst);
bool TensorContainsNAN(const framework::Tensor& tensor); bool TensorContainsNAN(const framework::Tensor &tensor);
bool TensorContainsInf(const framework::Tensor& tensor); bool TensorContainsInf(const framework::Tensor &tensor);
void TensorToStream(std::ostream& os, const Tensor& tensor); void TensorToStream(std::ostream &os, const Tensor &tensor);
void TensorFromStream(std::istream& is, Tensor* tensor); void TensorFromStream(std::istream &is, Tensor *tensor);
// //
// The implementation of template functions. // The implementation of template functions.
// //
template <typename T> template <typename T>
void TensorFromVector(const std::vector<T>& src, Tensor* dst) { void TensorFromVector(const std::vector<T> &src, Tensor *dst) {
auto src_ptr = static_cast<const void*>(src.data()); auto src_ptr = static_cast<const void *>(src.data());
dst->Resize({static_cast<int64_t>(src.size())}); dst->Resize({static_cast<int64_t>(src.size())});
auto dst_ptr = static_cast<void*>(dst->mutable_data<T>()); auto dst_ptr = static_cast<void *>(dst->mutable_data<T>());
auto size = src.size() * sizeof(T); auto size = src.size() * sizeof(T);
memory::Copy(dst_ptr, src_ptr, size); memory::Copy(dst_ptr, src_ptr, size);
} }
template <typename T> template <typename T>
void TensorToVector(const Tensor& src, std::vector<T>* dst) { void TensorToVector(const Tensor &src, std::vector<T> *dst) {
auto src_ptr = static_cast<const void*>(src.data<T>()); auto src_ptr = static_cast<const void *>(src.data<T>());
auto size = src.numel() * sizeof(T); auto size = src.numel() * sizeof(T);
dst->resize(src.numel()); dst->resize(src.numel());
auto dst_ptr = static_cast<void*>(dst->data()); auto dst_ptr = static_cast<void *>(dst->data());
memory::Copy(dst_ptr, src_ptr, size); memory::Copy(dst_ptr, src_ptr, size);
} }
......
...@@ -25,7 +25,7 @@ namespace paddle_mobile { ...@@ -25,7 +25,7 @@ namespace paddle_mobile {
namespace framework { namespace framework {
class VarDesc { class VarDesc {
public: public:
VarDesc(const proto::VarDesc &desc); VarDesc(const proto::VarDesc &desc);
std::string Name() const { return desc_.name(); } std::string Name() const { return desc_.name(); }
...@@ -80,7 +80,7 @@ class VarDesc { ...@@ -80,7 +80,7 @@ class VarDesc {
return this->RepeatedToVector(tensor_desc().dims()); return this->RepeatedToVector(tensor_desc().dims());
} }
private: private:
proto::VarDesc desc_; proto::VarDesc desc_;
}; };
......
...@@ -18,42 +18,39 @@ SOFTWARE. ...@@ -18,42 +18,39 @@ SOFTWARE.
==============================================================================*/ ==============================================================================*/
#pragma once #pragma once
#include "paddle_mobile_object.h"
#include <iostream> #include <iostream>
#include <memory> #include <memory>
#include <string> #include <string>
#include <typeindex> #include <typeindex>
#include <typeinfo> #include <typeinfo>
#include "paddle_mobile_object.h"
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
class Variable : public PaddleMobileObject { class Variable : public PaddleMobileObject {
public: public:
Variable() {} Variable() {}
~Variable() {} ~Variable() {}
template <typename T> template <typename T> const T *Get() const {
const T* Get() const { return static_cast<const T *>(holder_->Ptr());
return static_cast<const T*>(holder_->Ptr());
} }
bool IsInitialized() const { return holder_ != nullptr; } bool IsInitialized() const { return holder_ != nullptr; }
const std::string* Name() { return name_; } const std::string *Name() { return name_; }
template <typename T> template <typename T> T *GetMutable() {
T* GetMutable() {
if (!IsType<T>()) { if (!IsType<T>()) {
if (*Name() == "pixel") { if (*Name() == "pixel") {
// std::cout << " reset " << *Name() << std::endl; // std::cout << " reset " << *Name() << std::endl;
} }
holder_.reset(new PlaceholderImp<T>(new T())); holder_.reset(new PlaceholderImp<T>(new T()));
} }
return static_cast<T*>(holder_->Ptr()); return static_cast<T *>(holder_->Ptr());
} }
template <typename T> template <typename T> bool IsType() const {
bool IsType() const {
if (holder_) { if (holder_) {
// printf("not null \n"); // printf("not null \n");
printf(" holder type : %s, this type %s \n", holder_->Type().name(), printf(" holder type : %s, this type %s \n", holder_->Type().name(),
...@@ -69,33 +66,32 @@ class Variable : public PaddleMobileObject { ...@@ -69,33 +66,32 @@ class Variable : public PaddleMobileObject {
std::type_index Type() const { return holder_->Type(); } std::type_index Type() const { return holder_->Type(); }
void SetName(const std::string* name) { name_ = name; } void SetName(const std::string *name) { name_ = name; }
private: private:
struct Placeholder { struct Placeholder {
Placeholder() = default; Placeholder() = default;
virtual ~Placeholder() = default; virtual ~Placeholder() = default;
virtual const std::type_info& Type() const = 0; virtual const std::type_info &Type() const = 0;
virtual void* Ptr() const = 0; virtual void *Ptr() const = 0;
}; };
template <typename T> template <typename T> struct PlaceholderImp : public Placeholder {
struct PlaceholderImp : public Placeholder { explicit PlaceholderImp(T *ptr) : ptr_(ptr), type_(typeid(T)) {}
explicit PlaceholderImp(T* ptr) : ptr_(ptr), type_(typeid(T)) {}
virtual const std::type_info& Type() const { return type_; } virtual const std::type_info &Type() const { return type_; }
virtual void* Ptr() const override { virtual void *Ptr() const override {
return static_cast<void*>(ptr_.get()); return static_cast<void *>(ptr_.get());
} }
std::unique_ptr<T> ptr_; std::unique_ptr<T> ptr_;
const std::type_info& type_; const std::type_info &type_;
}; };
std::unique_ptr<Placeholder> holder_; std::unique_ptr<Placeholder> holder_;
friend class Scope; friend class Scope;
const std::string* name_; const std::string *name_;
}; };
} // namespace framework } // namespace framework
} // namespace paddle_mobile } // namespace paddle_mobile
...@@ -143,8 +143,8 @@ void Loader<Dtype, P>::LoadVar(framework::LoDTensor *tensor, ...@@ -143,8 +143,8 @@ void Loader<Dtype, P>::LoadVar(framework::LoDTensor *tensor,
}; };
template <typename Dtype, Precision P> template <typename Dtype, Precision P>
const framework::Program<Dtype, P> Loader<Dtype, P>::Load( const framework::Program<Dtype, P>
const std::string &dirname) { Loader<Dtype, P>::Load(const std::string &dirname) {
std::string model_filename = dirname + "/__model__"; std::string model_filename = dirname + "/__model__";
std::string program_desc_str; std::string program_desc_str;
ReadBinaryFile(model_filename, &program_desc_str); ReadBinaryFile(model_filename, &program_desc_str);
......
...@@ -29,10 +29,10 @@ namespace paddle_mobile { ...@@ -29,10 +29,10 @@ namespace paddle_mobile {
template <typename Dtype, Precision P = Precision::FP32> template <typename Dtype, Precision P = Precision::FP32>
class Loader : PaddleMobileObject { class Loader : PaddleMobileObject {
public: public:
const framework::Program<Dtype, P> Load(const std::string &dirname); const framework::Program<Dtype, P> Load(const std::string &dirname);
private: private:
void LoadVar(framework::LoDTensor *tensor, const std::string &file_path); void LoadVar(framework::LoDTensor *tensor, const std::string &file_path);
}; };
......
...@@ -37,11 +37,10 @@ void Free(void *ptr); ...@@ -37,11 +37,10 @@ void Free(void *ptr);
* std::unique_ptr<T> in tensor.h. * std::unique_ptr<T> in tensor.h.
* static_cast * static_cast
*/ */
template <typename T> template <typename T> class PODDeleter {
class PODDeleter {
static_assert(std::is_pod<T>::value, "T must be POD"); static_assert(std::is_pod<T>::value, "T must be POD");
public: public:
explicit PODDeleter(){}; explicit PODDeleter(){};
void operator()(T *ptr) { Free(static_cast<void *>(ptr)); } void operator()(T *ptr) { Free(static_cast<void *>(ptr)); }
...@@ -55,9 +54,8 @@ class PODDeleter { ...@@ -55,9 +54,8 @@ class PODDeleter {
* std::unique_ptr<T> in tensor.h. * std::unique_ptr<T> in tensor.h.
* reinterpret_cast * reinterpret_cast
*/ */
template <typename T> template <typename T> class PlainDeleter {
class PlainDeleter { public:
public:
explicit PlainDeleter(){}; explicit PlainDeleter(){};
void operator()(T *ptr) { Free(reinterpret_cast<void *>(ptr)); } void operator()(T *ptr) { Free(reinterpret_cast<void *>(ptr)); }
......
...@@ -28,9 +28,9 @@ using namespace framework; ...@@ -28,9 +28,9 @@ using namespace framework;
template <typename DeviceType, typename T> template <typename DeviceType, typename T>
class ConvOp : public framework::OperatorWithKernel<DeviceType> { class ConvOp : public framework::OperatorWithKernel<DeviceType> {
public: public:
ConvOp(const std::string& type, const VariableNameMap& inputs, ConvOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap& outputs, const framework::AttributeMap& attrs, const VariableNameMap &outputs, const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope) std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType>(type, inputs, outputs, attrs, : framework::OperatorWithKernel<DeviceType>(type, inputs, outputs, attrs,
scope), scope),
...@@ -39,7 +39,7 @@ class ConvOp : public framework::OperatorWithKernel<DeviceType> { ...@@ -39,7 +39,7 @@ class ConvOp : public framework::OperatorWithKernel<DeviceType> {
using framework::OperatorWithKernel<DeviceType>::OperatorWithKernel; using framework::OperatorWithKernel<DeviceType>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
void RunImpl() const { void RunImpl() const {
operators::ConvKernel<DeviceType, T, ConvParam> kernel; operators::ConvKernel<DeviceType, T, ConvParam> kernel;
kernel.Compute(param_); kernel.Compute(param_);
......
...@@ -21,9 +21,9 @@ SOFTWARE. ...@@ -21,9 +21,9 @@ SOFTWARE.
namespace paddle_mobile { namespace paddle_mobile {
namespace operators { namespace operators {
bool IsExpand(const std::vector<int64_t>& filter_dim, bool IsExpand(const std::vector<int64_t> &filter_dim,
const std::vector<int>& strides, const std::vector<int>& paddings, const std::vector<int> &strides, const std::vector<int> &paddings,
const std::vector<int>& dilations) { const std::vector<int> &dilations) {
bool filter_1 = true, strides_1 = true, padding_0 = true, dilation_1 = true; bool filter_1 = true, strides_1 = true, padding_0 = true, dilation_1 = true;
for (size_t j = 0; j < strides.size(); ++j) { for (size_t j = 0; j < strides.size(); ++j) {
filter_1 = filter_1 && (static_cast<int>(filter_dim[j + 2]) == 1); filter_1 = filter_1 && (static_cast<int>(filter_dim[j + 2]) == 1);
...@@ -35,8 +35,8 @@ bool IsExpand(const std::vector<int64_t>& filter_dim, ...@@ -35,8 +35,8 @@ bool IsExpand(const std::vector<int64_t>& filter_dim,
} }
template <> template <>
void ConvKernel<CPU, float, ConvParam>::Compute(const ConvParam& param) const { void ConvKernel<CPU, float, ConvParam>::Compute(const ConvParam &param) const {
const Tensor* input = param.Input(); const Tensor *input = param.Input();
std::cout << " conv param " << param << std::endl; std::cout << " conv param " << param << std::endl;
...@@ -45,7 +45,7 @@ void ConvKernel<CPU, float, ConvParam>::Compute(const ConvParam& param) const { ...@@ -45,7 +45,7 @@ void ConvKernel<CPU, float, ConvParam>::Compute(const ConvParam& param) const {
// that avoids modifying the variable in the Scope. // that avoids modifying the variable in the Scope.
Tensor filter = *param.Filter(); Tensor filter = *param.Filter();
Tensor* output = param.Output(); Tensor *output = param.Output();
// output->mutable_data<T>(context.GetPlace()); // output->mutable_data<T>(context.GetPlace());
int groups = param.Groups(); int groups = param.Groups();
......
...@@ -31,7 +31,7 @@ using namespace framework; ...@@ -31,7 +31,7 @@ using namespace framework;
template <typename DeviceType, typename T, typename P> template <typename DeviceType, typename T, typename P>
class ConvKernel : public framework::OpKernelBase<DeviceType, ConvParam> { class ConvKernel : public framework::OpKernelBase<DeviceType, ConvParam> {
public: public:
void Compute(const ConvParam &param) const; void Compute(const ConvParam &param) const;
}; };
} }
......
...@@ -24,12 +24,11 @@ namespace math { ...@@ -24,12 +24,11 @@ namespace math {
* col = * col =
* [input_channels, filter_height, filter_width, output_height, output_width] * [input_channels, filter_height, filter_width, output_height, output_width]
*/ */
template <class T> template <class T> class Im2ColFunctor<ColFormat::kCFO, CPU, T> {
class Im2ColFunctor<ColFormat::kCFO, CPU, T> { public:
public: void operator()(const framework::Tensor &im, const std::vector<int> &dilation,
void operator()(const framework::Tensor& im, const std::vector<int>& dilation, const std::vector<int> &stride,
const std::vector<int>& stride, const std::vector<int> &padding, framework::Tensor *col) {
const std::vector<int>& padding, framework::Tensor* col) {
// PADDLE_ENFORCE(im.dims().size() == 3); // PADDLE_ENFORCE(im.dims().size() == 3);
// PADDLE_ENFORCE(col->dims().size() == 5); // PADDLE_ENFORCE(col->dims().size() == 5);
...@@ -58,8 +57,8 @@ class Im2ColFunctor<ColFormat::kCFO, CPU, T> { ...@@ -58,8 +57,8 @@ class Im2ColFunctor<ColFormat::kCFO, CPU, T> {
int channels_col = im_channels * filter_height * filter_width; int channels_col = im_channels * filter_height * filter_width;
const T* im_data = im.data<T>(); const T *im_data = im.data<T>();
T* col_data = col->data<T>(); T *col_data = col->data<T>();
for (int c = 0; c < channels_col; ++c) { for (int c = 0; c < channels_col; ++c) {
int w_offset = c % filter_width; int w_offset = c % filter_width;
int h_offset = (c / filter_width) % filter_height; int h_offset = (c / filter_width) % filter_height;
...@@ -86,13 +85,12 @@ class Im2ColFunctor<ColFormat::kCFO, CPU, T> { ...@@ -86,13 +85,12 @@ class Im2ColFunctor<ColFormat::kCFO, CPU, T> {
* col = * col =
* [input_channels, filter_height, filter_width, output_height, output_width] * [input_channels, filter_height, filter_width, output_height, output_width]
*/ */
template <class T> template <class T> class Col2ImFunctor<ColFormat::kCFO, CPU, T> {
class Col2ImFunctor<ColFormat::kCFO, CPU, T> { public:
public: void operator()(const framework::Tensor &col,
void operator()(const framework::Tensor& col, const std::vector<int> &dilation,
const std::vector<int>& dilation, const std::vector<int> &stride,
const std::vector<int>& stride, const std::vector<int> &padding, framework::Tensor *im) {
const std::vector<int>& padding, framework::Tensor* im) {
// PADDLE_ENFORCE(im->dims().size() == 3); // PADDLE_ENFORCE(im->dims().size() == 3);
// PADDLE_ENFORCE(col.dims().size() == 5); // PADDLE_ENFORCE(col.dims().size() == 5);
int im_channels = im->dims()[0]; int im_channels = im->dims()[0];
...@@ -120,8 +118,8 @@ class Col2ImFunctor<ColFormat::kCFO, CPU, T> { ...@@ -120,8 +118,8 @@ class Col2ImFunctor<ColFormat::kCFO, CPU, T> {
int channels_col = im_channels * filter_height * filter_width; int channels_col = im_channels * filter_height * filter_width;
T* im_data = im->data<T>(); T *im_data = im->data<T>();
const T* col_data = col.data<T>(); const T *col_data = col.data<T>();
for (int c = 0; c < channels_col; ++c) { for (int c = 0; c < channels_col; ++c) {
int w_offset = c % filter_width; int w_offset = c % filter_width;
...@@ -152,12 +150,11 @@ template class Col2ImFunctor<ColFormat::kCFO, CPU, double>; ...@@ -152,12 +150,11 @@ template class Col2ImFunctor<ColFormat::kCFO, CPU, double>;
* col = * col =
* [output_height, output_width, input_channels, filter_height, filter_width] * [output_height, output_width, input_channels, filter_height, filter_width]
*/ */
template <class T> template <class T> class Im2ColFunctor<ColFormat::kOCF, CPU, T> {
class Im2ColFunctor<ColFormat::kOCF, CPU, T> { public:
public: void operator()(const framework::Tensor &im, const std::vector<int> &dilation,
void operator()(const framework::Tensor& im, const std::vector<int>& dilation, const std::vector<int> &stride,
const std::vector<int>& stride, const std::vector<int> &padding, framework::Tensor *col) {
const std::vector<int>& padding, framework::Tensor* col) {
// PADDLE_ENFORCE(im.dims().size() == 3); // PADDLE_ENFORCE(im.dims().size() == 3);
// PADDLE_ENFORCE(col->dims().size() == 5); // PADDLE_ENFORCE(col->dims().size() == 5);
int im_channels = im.dims()[0]; int im_channels = im.dims()[0];
...@@ -177,8 +174,8 @@ class Im2ColFunctor<ColFormat::kOCF, CPU, T> { ...@@ -177,8 +174,8 @@ class Im2ColFunctor<ColFormat::kOCF, CPU, T> {
// 1, col_width, "col_width and padding(padding_left, padding_right) // 1, col_width, "col_width and padding(padding_left, padding_right)
// are " "inconsistent."); // are " "inconsistent.");
const T* im_data = im.data<T>(); const T *im_data = im.data<T>();
T* col_data = col->data<T>(); T *col_data = col->data<T>();
for (int col_row_idx = 0; col_row_idx < col_height; ++col_row_idx) { for (int col_row_idx = 0; col_row_idx < col_height; ++col_row_idx) {
for (int col_col_idx = 0; col_col_idx < col_width; ++col_col_idx) { for (int col_col_idx = 0; col_col_idx < col_width; ++col_col_idx) {
...@@ -220,13 +217,12 @@ class Im2ColFunctor<ColFormat::kOCF, CPU, T> { ...@@ -220,13 +217,12 @@ class Im2ColFunctor<ColFormat::kOCF, CPU, T> {
* col = * col =
* [output_height, output_width, input_channels, filter_height, filter_width] * [output_height, output_width, input_channels, filter_height, filter_width]
*/ */
template <class T> template <class T> class Col2ImFunctor<ColFormat::kOCF, CPU, T> {
class Col2ImFunctor<ColFormat::kOCF, CPU, T> { public:
public: void operator()(const framework::Tensor &col,
void operator()(const framework::Tensor& col, const std::vector<int> &dilation,
const std::vector<int>& dilation, const std::vector<int> &stride,
const std::vector<int>& stride, const std::vector<int> &padding, framework::Tensor *im) {
const std::vector<int>& padding, framework::Tensor* im) {
// PADDLE_ENFORCE(im->dims().size() == 3); // PADDLE_ENFORCE(im->dims().size() == 3);
// PADDLE_ENFORCE(col.dims().size() == 5); // PADDLE_ENFORCE(col.dims().size() == 5);
int im_channels = im->dims()[0]; int im_channels = im->dims()[0];
...@@ -246,8 +242,8 @@ class Col2ImFunctor<ColFormat::kOCF, CPU, T> { ...@@ -246,8 +242,8 @@ class Col2ImFunctor<ColFormat::kOCF, CPU, T> {
// 1, col_width, "col_width and padding(padding_left, padding_right) // 1, col_width, "col_width and padding(padding_left, padding_right)
// are " "inconsistent."); // are " "inconsistent.");
T* im_data = im->data<T>(); T *im_data = im->data<T>();
const T* col_data = col.data<T>(); const T *col_data = col.data<T>();
for (int col_row_idx = 0; col_row_idx < col_height; ++col_row_idx) { for (int col_row_idx = 0; col_row_idx < col_height; ++col_row_idx) {
for (int col_col_idx = 0; col_col_idx < col_width; ++col_col_idx) { for (int col_col_idx = 0; col_col_idx < col_width; ++col_col_idx) {
......
...@@ -79,19 +79,19 @@ enum class ColFormat { kCFO = 0, kOCF = 1 }; ...@@ -79,19 +79,19 @@ enum class ColFormat { kCFO = 0, kOCF = 1 };
*/ */
template <ColFormat Format, typename DeviceType, typename T> template <ColFormat Format, typename DeviceType, typename T>
class Im2ColFunctor { class Im2ColFunctor {
public: public:
void operator()(const framework::Tensor& im, const std::vector<int>& dilation, void operator()(const framework::Tensor &im, const std::vector<int> &dilation,
const std::vector<int>& stride, const std::vector<int> &stride,
const std::vector<int>& padding, framework::Tensor* col); const std::vector<int> &padding, framework::Tensor *col);
}; };
template <ColFormat Format, typename DeviceType, typename T> template <ColFormat Format, typename DeviceType, typename T>
class Col2ImFunctor { class Col2ImFunctor {
public: public:
void operator()(const framework::Tensor& col, void operator()(const framework::Tensor &col,
const std::vector<int>& dilation, const std::vector<int> &dilation,
const std::vector<int>& stride, const std::vector<int> &stride,
const std::vector<int>& padding, framework::Tensor* im); const std::vector<int> &padding, framework::Tensor *im);
}; };
} // namespace math } // namespace math
......
...@@ -21,7 +21,7 @@ namespace math { ...@@ -21,7 +21,7 @@ namespace math {
template <> template <>
void gemm<float>(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB, void gemm<float>(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB,
const int M, const int N, const int K, const float alpha, const int M, const int N, const int K, const float alpha,
const float* A, const float* B, const float beta, float* C) { const float *A, const float *B, const float beta, float *C) {
int lda = (transA == CblasNoTrans) ? K : M; int lda = (transA == CblasNoTrans) ? K : M;
int ldb = (transB == CblasNoTrans) ? N : K; int ldb = (transB == CblasNoTrans) ? N : K;
int ldc = N; int ldc = N;
...@@ -32,8 +32,8 @@ void gemm<float>(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB, ...@@ -32,8 +32,8 @@ void gemm<float>(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB,
template <> template <>
void gemm<double>(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB, void gemm<double>(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB,
const int M, const int N, const int K, const double alpha, const int M, const int N, const int K, const double alpha,
const double* A, const double* B, const double beta, const double *A, const double *B, const double beta,
double* C) { double *C) {
int lda = (transA == CblasNoTrans) ? K : M; int lda = (transA == CblasNoTrans) ? K : M;
int ldb = (transB == CblasNoTrans) ? N : K; int ldb = (transB == CblasNoTrans) ? N : K;
int ldc = N; int ldc = N;
...@@ -43,8 +43,8 @@ void gemm<double>(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB, ...@@ -43,8 +43,8 @@ void gemm<double>(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB,
template <> template <>
void gemm<float>(const bool transA, const bool transB, const int M, const int N, void gemm<float>(const bool transA, const bool transB, const int M, const int N,
const int K, const float alpha, const float* A, const int lda, const int K, const float alpha, const float *A, const int lda,
const float* B, const int ldb, const float beta, float* C, const float *B, const int ldb, const float beta, float *C,
const int ldc) { const int ldc) {
cblas_sgemm(CblasRowMajor, transA == false ? CblasNoTrans : CblasTrans, cblas_sgemm(CblasRowMajor, transA == false ? CblasNoTrans : CblasTrans,
transB == false ? CblasNoTrans : CblasTrans, M, N, K, alpha, A, transB == false ? CblasNoTrans : CblasTrans, M, N, K, alpha, A,
...@@ -53,18 +53,18 @@ void gemm<float>(const bool transA, const bool transB, const int M, const int N, ...@@ -53,18 +53,18 @@ void gemm<float>(const bool transA, const bool transB, const int M, const int N,
template <> template <>
void gemm<double>(const bool transA, const bool transB, const int M, void gemm<double>(const bool transA, const bool transB, const int M,
const int N, const int K, const double alpha, const double* A, const int N, const int K, const double alpha, const double *A,
const int lda, const double* B, const int ldb, const int lda, const double *B, const int ldb,
const double beta, double* C, const int ldc) { const double beta, double *C, const int ldc) {
cblas_dgemm(CblasRowMajor, transA == false ? CblasNoTrans : CblasTrans, cblas_dgemm(CblasRowMajor, transA == false ? CblasNoTrans : CblasTrans,
transB == false ? CblasNoTrans : CblasTrans, M, N, K, alpha, A, transB == false ? CblasNoTrans : CblasTrans, M, N, K, alpha, A,
lda, B, ldb, beta, C, ldc); lda, B, ldb, beta, C, ldc);
} }
template <> template <>
void matmul<float>(const framework::Tensor& matrix_a, bool trans_a, void matmul<float>(const framework::Tensor &matrix_a, bool trans_a,
const framework::Tensor& matrix_b, bool trans_b, float alpha, const framework::Tensor &matrix_b, bool trans_b, float alpha,
framework::Tensor* matrix_out, float beta) { framework::Tensor *matrix_out, float beta) {
auto dim_a = matrix_a.dims(); auto dim_a = matrix_a.dims();
auto dim_b = matrix_b.dims(); auto dim_b = matrix_b.dims();
auto dim_out = matrix_out->dims(); auto dim_out = matrix_out->dims();
...@@ -89,9 +89,9 @@ void matmul<float>(const framework::Tensor& matrix_a, bool trans_a, ...@@ -89,9 +89,9 @@ void matmul<float>(const framework::Tensor& matrix_a, bool trans_a,
} }
template <> template <>
void matmul<double>(const framework::Tensor& matrix_a, bool trans_a, void matmul<double>(const framework::Tensor &matrix_a, bool trans_a,
const framework::Tensor& matrix_b, bool trans_b, const framework::Tensor &matrix_b, bool trans_b,
double alpha, framework::Tensor* matrix_out, double beta) { double alpha, framework::Tensor *matrix_out, double beta) {
auto dim_a = matrix_a.dims(); auto dim_a = matrix_a.dims();
auto dim_b = matrix_b.dims(); auto dim_b = matrix_b.dims();
auto dim_out = matrix_out->dims(); auto dim_out = matrix_out->dims();
......
...@@ -14,9 +14,9 @@ limitations under the License. */ ...@@ -14,9 +14,9 @@ limitations under the License. */
#pragma once #pragma once
#include "framework/tensor.h"
#include <cblas.h> #include <cblas.h>
#include <cmath> #include <cmath>
#include "framework/tensor.h"
namespace paddle_mobile { namespace paddle_mobile {
namespace operators { namespace operators {
...@@ -24,19 +24,19 @@ namespace math { ...@@ -24,19 +24,19 @@ namespace math {
template <typename T> template <typename T>
void gemm(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB, void gemm(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB,
const int M, const int N, const int K, const T alpha, const T* A, const int M, const int N, const int K, const T alpha, const T *A,
const T* B, const T beta, T* C); const T *B, const T beta, T *C);
template <typename T> template <typename T>
void gemm(const bool transA, const bool transB, const int M, const int N, void gemm(const bool transA, const bool transB, const int M, const int N,
const int K, const T alpha, const T* A, const int lda, const T* B, const int K, const T alpha, const T *A, const int lda, const T *B,
const int ldb, const T beta, T* C, const int ldc); const int ldb, const T beta, T *C, const int ldc);
// matrix multiply with continuous memory // matrix multiply with continuous memory
template <typename T> template <typename T>
void matmul(const framework::Tensor& matrix_a, bool trans_a, void matmul(const framework::Tensor &matrix_a, bool trans_a,
const framework::Tensor& matrix_b, bool trans_b, T alpha, const framework::Tensor &matrix_b, bool trans_b, T alpha,
framework::Tensor* matrix_out, T beta); framework::Tensor *matrix_out, T beta);
} // namespace math } // namespace math
} // namespace operators } // namespace operators
} // namespace paddle_mobile } // namespace paddle_mobile
...@@ -25,12 +25,11 @@ using Tensor = paddle_mobile::framework::Tensor; ...@@ -25,12 +25,11 @@ using Tensor = paddle_mobile::framework::Tensor;
* [input_channels, filter_depth, filter_height, filter_width, * [input_channels, filter_depth, filter_height, filter_width,
* output_depth, output_height, output_width] * output_depth, output_height, output_width]
*/ */
template <typename T> template <typename T> class Vol2ColFunctor<CPU, T> {
class Vol2ColFunctor<CPU, T> { public:
public: void operator()(const Tensor &vol, const std::vector<int> &dilations,
void operator()(const Tensor& vol, const std::vector<int>& dilations, const std::vector<int> &strides,
const std::vector<int>& strides, const std::vector<int> &paddings, Tensor *col) const {
const std::vector<int>& paddings, Tensor* col) const {
// PADDLE_ENFORCE(vol.dims().size() == 4); // PADDLE_ENFORCE(vol.dims().size() == 4);
// PADDLE_ENFORCE(col->dims().size() == 7); // PADDLE_ENFORCE(col->dims().size() == 7);
...@@ -69,8 +68,8 @@ class Vol2ColFunctor<CPU, T> { ...@@ -69,8 +68,8 @@ class Vol2ColFunctor<CPU, T> {
// "input_width and output_width are " // "input_width and output_width are "
// "mismatching."); // "mismatching.");
const T* vol_data = vol.data<T>(); const T *vol_data = vol.data<T>();
T* col_data = col->data<T>(); T *col_data = col->data<T>();
for (int c = 0; c < channels_col; ++c) { for (int c = 0; c < channels_col; ++c) {
int w_offset = c % filter_width; int w_offset = c % filter_width;
...@@ -108,12 +107,11 @@ class Vol2ColFunctor<CPU, T> { ...@@ -108,12 +107,11 @@ class Vol2ColFunctor<CPU, T> {
* [input_channels, filter_depth, filter_height, filter_width, * [input_channels, filter_depth, filter_height, filter_width,
* output_depth, output_height, output_width] * output_depth, output_height, output_width]
*/ */
template <typename T> template <typename T> class Col2VolFunctor<CPU, T> {
class Col2VolFunctor<CPU, T> { public:
public: void operator()(const Tensor &col, const std::vector<int> &dilations,
void operator()(const Tensor& col, const std::vector<int>& dilations, const std::vector<int> &strides,
const std::vector<int>& strides, const std::vector<int> &paddings, Tensor *vol) const {
const std::vector<int>& paddings, Tensor* vol) const {
// PADDLE_ENFORCE(vol->dims().size() == 4); // PADDLE_ENFORCE(vol->dims().size() == 4);
// PADDLE_ENFORCE(col.dims().size() == 7); // PADDLE_ENFORCE(col.dims().size() == 7);
...@@ -151,8 +149,8 @@ class Col2VolFunctor<CPU, T> { ...@@ -151,8 +149,8 @@ class Col2VolFunctor<CPU, T> {
// output_width, // output_width,
// "input_width and output_width are " // "input_width and output_width are "
// "mismatching."); // "mismatching.");
T* vol_data = vol->data<T>(); T *vol_data = vol->data<T>();
const T* col_data = col.data<T>(); const T *col_data = col.data<T>();
for (int c = 0; c < channels_col; ++c) { for (int c = 0; c < channels_col; ++c) {
int w_offset = c % filter_width; int w_offset = c % filter_width;
......
...@@ -64,20 +64,18 @@ namespace math { ...@@ -64,20 +64,18 @@ namespace math {
*/ */
using Tensor = paddle_mobile::framework::Tensor; using Tensor = paddle_mobile::framework::Tensor;
template <typename DeviceType, typename T> template <typename DeviceType, typename T> class Vol2ColFunctor {
class Vol2ColFunctor { public:
public: void operator()(const Tensor &vol, const std::vector<int> &dilations,
void operator()(const Tensor& vol, const std::vector<int>& dilations, const std::vector<int> &strides,
const std::vector<int>& strides, const std::vector<int> &paddings, Tensor *col) const;
const std::vector<int>& paddings, Tensor* col) const;
}; };
template <typename DeviceType, typename T> template <typename DeviceType, typename T> class Col2VolFunctor {
class Col2VolFunctor { public:
public: void operator()(const Tensor &col, const std::vector<int> &dilations,
void operator()(const Tensor& col, const std::vector<int>& dilations, const std::vector<int> &strides,
const std::vector<int>& strides, const std::vector<int> &paddings, Tensor *vol) const;
const std::vector<int>& paddings, Tensor* vol) const;
}; };
} // namespace math } // namespace math
......
...@@ -21,7 +21,7 @@ SOFTWARE. ...@@ -21,7 +21,7 @@ SOFTWARE.
namespace paddle_mobile { namespace paddle_mobile {
namespace operators { namespace operators {
std::ostream& operator<<(std::ostream& os, const ConvParam& conv_param) { std::ostream &operator<<(std::ostream &os, const ConvParam &conv_param) {
os << "parameter of conv: " << std::endl; os << "parameter of conv: " << std::endl;
os << " stride: " os << " stride: "
<< " (" << conv_param.Strides()[0] << conv_param.Strides()[1] << ") " << " (" << conv_param.Strides()[0] << conv_param.Strides()[1] << ") "
......
...@@ -30,8 +30,8 @@ namespace operators { ...@@ -30,8 +30,8 @@ namespace operators {
using namespace framework; using namespace framework;
class OpParam : PaddleMobileObject { class OpParam : PaddleMobileObject {
public: public:
protected: protected:
template <typename T> template <typename T>
static T *InputFrom(const VariableNameMap &inputs, const Scope &scope) { static T *InputFrom(const VariableNameMap &inputs, const Scope &scope) {
return GetVarValue<T>("Input", inputs, scope); return GetVarValue<T>("Input", inputs, scope);
...@@ -67,7 +67,7 @@ class OpParam : PaddleMobileObject { ...@@ -67,7 +67,7 @@ class OpParam : PaddleMobileObject {
}; };
class ConvParam : OpParam { class ConvParam : OpParam {
public: public:
ConvParam(const VariableNameMap &inputs, const VariableNameMap &outputs, ConvParam(const VariableNameMap &inputs, const VariableNameMap &outputs,
const framework::AttributeMap &attrs, const framework::AttributeMap &attrs,
const framework::Scope &scope) { const framework::Scope &scope) {
...@@ -94,7 +94,7 @@ class ConvParam : OpParam { ...@@ -94,7 +94,7 @@ class ConvParam : OpParam {
const int &Groups() const { return groups; } const int &Groups() const { return groups; }
private: private:
Tensor *input_; Tensor *input_;
Tensor *output_; Tensor *output_;
LoDTensor *filter_; LoDTensor *filter_;
......
...@@ -14,9 +14,9 @@ limitations under the License. */ ...@@ -14,9 +14,9 @@ limitations under the License. */
#pragma once #pragma once
#include "framework/framework.pb.h"
#include <string> #include <string>
#include <typeindex> #include <typeindex>
#include "framework/framework.pb.h"
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
......
...@@ -17,9 +17,9 @@ limitations under the License. */ ...@@ -17,9 +17,9 @@ limitations under the License. */
// Disable the copy and assignment operator for a class. // Disable the copy and assignment operator for a class.
#ifndef DISABLE_COPY_AND_ASSIGN #ifndef DISABLE_COPY_AND_ASSIGN
#define DISABLE_COPY_AND_ASSIGN(classname) \ #define DISABLE_COPY_AND_ASSIGN(classname) \
private: \ private: \
classname(const classname&) = delete; \ classname(const classname &) = delete; \
classname(classname&&) = delete; \ classname(classname &&) = delete; \
classname& operator=(const classname&) = delete; \ classname &operator=(const classname &) = delete; \
classname& operator=(classname&&) = delete classname &operator=(classname &&) = delete
#endif #endif
...@@ -50,14 +50,14 @@ int main() { ...@@ -50,14 +50,14 @@ int main() {
paddle_mobile::Loader<paddle_mobile::CPU> loader; paddle_mobile::Loader<paddle_mobile::CPU> loader;
auto program = loader.Load(std::string( auto program = loader.Load(std::string(
"../test/models/image_classification_resnet.inference.model")); "../../test/models/image_classification_resnet.inference.model"));
paddle_mobile::framework::Executor<paddle_mobile::CPU> executor(program); paddle_mobile::framework::Executor<paddle_mobile::CPU> executor(program);
paddle_mobile::framework::Tensor input; paddle_mobile::framework::Tensor input;
SetupTensor<float>(&input, {1, 3, 32, 32}, static_cast<float>(0), SetupTensor<float>(&input, {1, 3, 32, 32}, static_cast<float>(0),
static_cast<float>(1)); static_cast<float>(1));
float* input_ptr = input.data<float>(); float *input_ptr = input.data<float>();
for (int i = 0; i < input.numel(); ++i) { for (int i = 0; i < input.numel(); ++i) {
// std::cout << input_ptr[i] << std::endl; // std::cout << input_ptr[i] << std::endl;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册