From d2f8befaab08a6986d44207b417b3d27e453a854 Mon Sep 17 00:00:00 2001 From: liuruilong Date: Wed, 16 May 2018 14:24:16 +0800 Subject: [PATCH] format files --- src/common/type_define.h | 27 +- src/common/types.h | 3 +- src/common/variant.h | 34 +- src/framework/attribute.cpp | 2 +- src/framework/attribute.h | 133 +- src/framework/block_desc.cpp | 4 +- src/framework/block_desc.h | 13 +- src/framework/data_layout.h | 28 +- src/framework/data_transform.cpp | 16 +- src/framework/data_transform.h | 14 +- src/framework/data_type.h | 2 +- src/framework/ddim.cc | 167 +- src/framework/ddim.h | 16 +- src/framework/dim.h | 134 +- src/framework/executor.cpp | 4 +- src/framework/executor.h | 11 +- src/framework/framework.pb.cpp | 3461 +++++++++++----------- src/framework/framework.pb.h | 1996 +++++++------ src/framework/lod_tensor.cc | 42 +- src/framework/lod_tensor.h | 17 +- src/framework/op_desc.cpp | 4 +- src/framework/op_desc.h | 8 +- src/framework/op_info.h | 36 +- src/framework/op_kernel_type.h | 14 +- src/framework/op_proto_maker.h | 4 +- src/framework/operator.cpp | 22 +- src/framework/operator.h | 42 +- src/framework/paddle_mobile_object.h | 10 +- src/framework/program.cpp | 2 +- src/framework/program.h | 8 +- src/framework/program_desc.cpp | 4 +- src/framework/program_desc.h | 8 +- src/framework/scope.cc | 4 +- src/framework/scope.h | 46 +- src/framework/selected_rows.h | 20 +- src/framework/tensor.h | 32 +- src/framework/tensor_util.cc | 92 +- src/framework/tensor_util.h | 34 +- src/framework/var_desc.cpp | 4 +- src/framework/var_desc.h | 42 +- src/framework/var_type.h | 4 +- src/framework/variable.h | 46 +- src/io.cpp | 198 +- src/io.h | 6 +- src/memory/t_malloc.cc | 4 +- src/memory/t_malloc.h | 14 +- src/operators/conv_op.cpp | 4 +- src/operators/conv_op.h | 12 +- src/operators/kernel/arm/conv_kernel.cpp | 16 +- src/operators/kernel/conv_kernel.h | 2 +- src/operators/math/im2col.cc | 70 +- src/operators/math/im2col.h | 24 +- src/operators/math/math_function.cc | 34 +- src/operators/math/math_function.h | 22 +- src/operators/math/vol2col.cc | 36 +- src/operators/math/vol2col.h | 28 +- src/operators/op_param.cpp | 6 +- src/operators/op_param.h | 12 +- src/platform/data_type.h | 112 +- src/platform/macros.h | 12 +- 60 files changed, 3606 insertions(+), 3616 deletions(-) diff --git a/src/common/type_define.h b/src/common/type_define.h index 27929cd963..e59748612b 100644 --- a/src/common/type_define.h +++ b/src/common/type_define.h @@ -17,15 +17,14 @@ SOFTWARE. ==============================================================================*/ #pragma once; +#include "framework/attribute.h" #include #include -#include "framework/attribute.h" namespace paddle_mobile { namespace framework { -template -class OperatorBase; +template class OperatorBase; class OpDesc; class BlockDesc; class InferShapeContext; @@ -34,20 +33,20 @@ class InferShapeContext; using VariableNameMap = std::map>; template -using OpCreator = std::function*( - const std::string& /*type*/, const VariableNameMap& /*inputs*/, - const VariableNameMap& /*outputs*/, - const framework::AttributeMap& /*attrs*/)>; +using OpCreator = std::function *( + const std::string & /*type*/, const VariableNameMap & /*inputs*/, + const VariableNameMap & /*outputs*/, + const framework::AttributeMap & /*attrs*/)>; using GradOpMakerFN = std::function>( - const framework::OpDesc&, - const std::unordered_set& /*no_grad_set*/, - std::unordered_map* /*grad_to_var*/, - const std::vector& grad_block)>; + const framework::OpDesc &, + const std::unordered_set & /*no_grad_set*/, + std::unordered_map * /*grad_to_var*/, + const std::vector &grad_block)>; -using InferVarTypeFN = std::function; +using InferVarTypeFN = std::function; -using InferShapeFN = std::function; +using InferShapeFN = std::function; }; diff --git a/src/common/types.h b/src/common/types.h index 6ed1aad6c1..75f830a0e4 100644 --- a/src/common/types.h +++ b/src/common/types.h @@ -24,8 +24,7 @@ enum class Precision : int { FP32 = 0 }; //! device type enum DeviceTypeEnum { kINVALID = -1, kCPU = 0, kFPGA = 1, kGPU_MALI = 2 }; -template -struct DeviceType {}; +template struct DeviceType {}; typedef DeviceType CPU; typedef DeviceType FPGA; diff --git a/src/common/variant.h b/src/common/variant.h index b1b924059d..24eee64ff3 100644 --- a/src/common/variant.h +++ b/src/common/variant.h @@ -21,13 +21,9 @@ SOFTWARE. #pragma once namespace paddle_mobile { -template -struct IDToType { - typedef Type type_t; -}; +template struct IDToType { typedef Type type_t; }; -template -struct VariantHelper { +template struct VariantHelper { static const size_t size = sizeof(F) > VariantHelper::size ? sizeof(F) : VariantHelper::size; @@ -41,8 +37,7 @@ struct VariantHelper { } }; -template -struct VariantHelper { +template struct VariantHelper { static const size_t size = sizeof(F); inline static void Destroy(size_t id, void *data) { if (id == typeid(F).hash_code()) { @@ -53,9 +48,8 @@ struct VariantHelper { } }; -template -class RawData { - public: +template class RawData { +public: char data[size]; RawData() {} RawData(const RawData &raw_data) { strcpy(data, raw_data.data); } @@ -64,8 +58,7 @@ class RawData { // } }; -template -struct Variant { +template struct Variant { Variant(const Variant &variant) { // std::cout << " 赋值构造函数 " << std::endl; type_id = variant.type_id; @@ -77,15 +70,13 @@ struct Variant { // helper::Destroy(type_id, &data); } - template - void Set(Args &&... args) { + template void Set(Args &&... args) { helper::Destroy(type_id, &data); new (&data) T(std::forward(args)...); type_id = typeid(T).hash_code(); } - template - T &Get() const { + template T &Get() const { if (type_id == typeid(T).hash_code()) { return *const_cast(reinterpret_cast(&data)); } else { @@ -96,16 +87,13 @@ struct Variant { size_t TypeId() const { return type_id; } - private: +private: static inline size_t invalid_type() { return typeid(void).hash_code(); } typedef VariantHelper helper; size_t type_id; RawData data; }; -template -struct Vistor { - typedef T type_t; -}; +template struct Vistor { typedef T type_t; }; -} // namespace paddle_mobile +} // namespace paddle_mobile diff --git a/src/framework/attribute.cpp b/src/framework/attribute.cpp index f35cc3b7a7..2fa533167b 100644 --- a/src/framework/attribute.cpp +++ b/src/framework/attribute.cpp @@ -20,4 +20,4 @@ SOFTWARE. namespace paddle_mobile { namespace framework {} -} // namespace paddle_mobile +} // namespace paddle_mobile diff --git a/src/framework/attribute.h b/src/framework/attribute.h index 6b49c1ac15..f51ff03cec 100644 --- a/src/framework/attribute.h +++ b/src/framework/attribute.h @@ -27,86 +27,82 @@ namespace framework { class BlockDesc; class Attribute { - public: - static Attribute GetAttrValue(const proto::OpDesc::Attr& attr_desc) { +public: + static Attribute GetAttrValue(const proto::OpDesc::Attr &attr_desc) { // std::cout << "begin get attr value" << std::endl; Attribute attr; switch (attr_desc.type()) { - case proto::AttrType::BOOLEAN: { - attr.Set(attr_desc.b()); - break; - } - case proto::AttrType::INT: { - attr.Set(attr_desc.i()); - break; - } - case proto::AttrType::FLOAT: { - attr.Set(attr_desc.f()); - break; - } - case proto::AttrType::STRING: { - attr.Set(attr_desc.s()); - break; - } - case proto::AttrType::BOOLEANS: { - std::vector val(attr_desc.bools_size()); - for (int i = 0; i < attr_desc.bools_size(); ++i) { - val[i] = attr_desc.bools(i); - } - attr.Set>(val); - break; - } - case proto::AttrType::INTS: { - std::vector val(attr_desc.ints_size()); - for (int i = 0; i < attr_desc.ints_size(); ++i) { - val[i] = attr_desc.ints(i); - } - attr.Set>(val); - break; + case proto::AttrType::BOOLEAN: { + attr.Set(attr_desc.b()); + break; + } + case proto::AttrType::INT: { + attr.Set(attr_desc.i()); + break; + } + case proto::AttrType::FLOAT: { + attr.Set(attr_desc.f()); + break; + } + case proto::AttrType::STRING: { + attr.Set(attr_desc.s()); + break; + } + case proto::AttrType::BOOLEANS: { + std::vector val(attr_desc.bools_size()); + for (int i = 0; i < attr_desc.bools_size(); ++i) { + val[i] = attr_desc.bools(i); } - case proto::AttrType::FLOATS: { - std::vector val(attr_desc.floats_size()); - for (int i = 0; i < attr_desc.floats_size(); ++i) { - val[i] = attr_desc.floats(i); - } - attr.Set>(val); - break; + attr.Set>(val); + break; + } + case proto::AttrType::INTS: { + std::vector val(attr_desc.ints_size()); + for (int i = 0; i < attr_desc.ints_size(); ++i) { + val[i] = attr_desc.ints(i); } - case proto::AttrType::STRINGS: { - std::vector val(attr_desc.strings_size()); - for (int i = 0; i < attr_desc.strings_size(); ++i) { - val[i] = attr_desc.strings(i); - } - attr.Set>(val); - break; + attr.Set>(val); + break; + } + case proto::AttrType::FLOATS: { + std::vector val(attr_desc.floats_size()); + for (int i = 0; i < attr_desc.floats_size(); ++i) { + val[i] = attr_desc.floats(i); } - case proto::AttrType::LONG: { - attr.Set(attr_desc.l()); - break; + attr.Set>(val); + break; + } + case proto::AttrType::STRINGS: { + std::vector val(attr_desc.strings_size()); + for (int i = 0; i < attr_desc.strings_size(); ++i) { + val[i] = attr_desc.strings(i); } - default: - // std::cout << " not support " << std::endl; - break; + attr.Set>(val); + break; + } + case proto::AttrType::LONG: { + attr.Set(attr_desc.l()); + break; + } + default: + // std::cout << " not support " << std::endl; + break; } // std::cout << "end get attr value" << std::endl; return attr; } Attribute() {} - template - Attribute& Set(Args&&... args) { + template Attribute &Set(Args &&... args) { variant_.Set(args...); return *this; } - template - T& Get() const { - return variant_.Get(); - } + template T &Get() const { return variant_.Get(); } - private: +private: Variant, std::vector, - std::vector, bool, std::vector, BlockDesc*, + std::vector, bool, std::vector, BlockDesc *, int64_t> variant_; }; @@ -114,20 +110,19 @@ class Attribute { using AttributeMap = std::unordered_map; class AttrReader { - public: - explicit AttrReader(const AttributeMap& attrs) : attrs_(attrs) {} +public: + explicit AttrReader(const AttributeMap &attrs) : attrs_(attrs) {} - template - inline T Get(const std::string& name) const { + template inline T Get(const std::string &name) const { // PADDLE_ENFORCE(attrs_.count(name) != 0, "%s should be in // AttributeMap", // name); return ((Attribute)attrs_.at(name)).Get(); } - private: - const AttributeMap& attrs_; +private: + const AttributeMap &attrs_; }; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/block_desc.cpp b/src/framework/block_desc.cpp index 5f7c1295f1..ed7e25478f 100644 --- a/src/framework/block_desc.cpp +++ b/src/framework/block_desc.cpp @@ -46,5 +46,5 @@ BlockDesc::BlockDesc(const proto::BlockDesc &desc) : desc_(desc) { } } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/block_desc.h b/src/framework/block_desc.h index 02ff14e52e..4a71c1b7a0 100644 --- a/src/framework/block_desc.h +++ b/src/framework/block_desc.h @@ -27,7 +27,7 @@ namespace paddle_mobile { namespace framework { class BlockDesc : PaddleMobileObject { - public: +public: BlockDesc(const proto::BlockDesc &desc); const int &ID() const { return desc_.idx(); } @@ -45,19 +45,18 @@ class BlockDesc : PaddleMobileObject { std::vector> Vars() const; std::vector> Ops() const; - private: +private: proto::BlockDesc desc_; std::vector> ops_; std::unordered_map> vars_; }; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile namespace std { -template <> -struct hash { +template <> struct hash { typedef paddle_mobile::framework::BlockDesc argument_type; typedef std::size_t result_type; result_type operator()(argument_type const &s) const noexcept { @@ -67,4 +66,4 @@ struct hash { } }; -} // namespace std +} // namespace std diff --git a/src/framework/data_layout.h b/src/framework/data_layout.h index 8719913aea..bb76f224a8 100644 --- a/src/framework/data_layout.h +++ b/src/framework/data_layout.h @@ -27,7 +27,7 @@ enum class DataLayout { kAnyLayout = 2, }; -inline DataLayout StringToDataLayout(const std::string& str) { +inline DataLayout StringToDataLayout(const std::string &str) { std::string s(str); for (size_t i = 0; i < s.size(); ++i) { s[i] = toupper(s[i]); @@ -44,24 +44,24 @@ 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) { - case DataLayout::kNHWC: - return "NHWC"; - case DataLayout::kNCHW: - return "NCHW"; - case DataLayout::kAnyLayout: - return "ANY_LAYOUT"; - default: - break; - // std::cout << "unknown DataLayou %d", data_layout; + case DataLayout::kNHWC: + return "NHWC"; + case DataLayout::kNCHW: + return "NCHW"; + case DataLayout::kAnyLayout: + return "ANY_LAYOUT"; + default: + break; + // std::cout << "unknown DataLayou %d", 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); return out; } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/data_transform.cpp b/src/framework/data_transform.cpp index 321a2cd358..cdb184c3c2 100644 --- a/src/framework/data_transform.cpp +++ b/src/framework/data_transform.cpp @@ -23,14 +23,14 @@ SOFTWARE. namespace paddle_mobile { namespace framework { -static void PassTensorData(Tensor* from, Tensor* to) { +static void PassTensorData(Tensor *from, Tensor *to) { to->ShareDataWith(*from); *from = Tensor(); } -void DataTransform(const OpKernelType& expected_kernel_type, - const OpKernelType& kernel_type_for_var, - const Tensor& input_tensor, Tensor* output_tensor) { +void DataTransform(const OpKernelType &expected_kernel_type, + const OpKernelType &kernel_type_for_var, + const Tensor &input_tensor, Tensor *output_tensor) { bool transformed = false; Tensor in; in.ShareDataWith(input_tensor); @@ -64,8 +64,8 @@ void DataTransform(const OpKernelType& expected_kernel_type, output_tensor->ShareDataWith(in); } -void CopyVariableWithTensor(const Variable& in_var, const Tensor& tensor, - Variable& out_var) { +void CopyVariableWithTensor(const Variable &in_var, const Tensor &tensor, + Variable &out_var) { // if (in_var.IsType()) { // auto& in_lod_tensor = in_var.Get(); // auto* tran_lod_tensor = out_var.GetMutable(); @@ -83,5 +83,5 @@ void CopyVariableWithTensor(const Variable& in_var, const Tensor& tensor, // } } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/data_transform.h b/src/framework/data_transform.h index c5b4ef3730..13ffdfb39d 100644 --- a/src/framework/data_transform.h +++ b/src/framework/data_transform.h @@ -30,12 +30,12 @@ SOFTWARE. namespace paddle_mobile { namespace framework { -void DataTransform(const OpKernelType& expected_kernel_type, - const OpKernelType& kernel_type_for_var, - const Tensor& input_tensor, Tensor* out); +void DataTransform(const OpKernelType &expected_kernel_type, + const OpKernelType &kernel_type_for_var, + const Tensor &input_tensor, Tensor *out); -void CopyVariableWithTensor(const Variable& in_var, const Tensor& tensor, - Variable& out_var); +void CopyVariableWithTensor(const Variable &in_var, const Tensor &tensor, + Variable &out_var); -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/data_type.h b/src/framework/data_type.h index 8a77fc193c..9593c60ed0 100644 --- a/src/framework/data_type.h +++ b/src/framework/data_type.h @@ -40,4 +40,4 @@ namespace framework { // } // } } -} // namespace paddle_mobile +} // namespace paddle_mobile diff --git a/src/framework/ddim.cc b/src/framework/ddim.cc index b55f8ff974..ae368bdd75 100644 --- a/src/framework/ddim.cc +++ b/src/framework/ddim.cc @@ -19,52 +19,48 @@ namespace framework { /// @cond HIDDEN -template -Dim make_dim(const int64_t* d) { +template Dim make_dim(const int64_t *d) { return Dim(*d, make_dim(d + 1)); } -template <> -Dim<0> make_dim<0>(const int64_t* d) { - return Dim<0>(*d); -} +template <> 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) { - case 0: - ddim = make_dim<0>(dims); - break; - case 1: - ddim = make_dim<1>(dims); - break; - case 2: - ddim = make_dim<2>(dims); - break; - case 3: - ddim = make_dim<3>(dims); - break; - case 4: - ddim = make_dim<4>(dims); - break; - case 5: - ddim = make_dim<5>(dims); - break; - case 6: - ddim = make_dim<6>(dims); - break; - case 7: - ddim = make_dim<7>(dims); - break; - case 8: - ddim = make_dim<8>(dims); - break; - case 9: - ddim = make_dim<9>(dims); - break; - default: - // std::cout << "Dynamic dimensions must have between [1, 9] - // dimensions."; - break; + case 0: + ddim = make_dim<0>(dims); + break; + case 1: + ddim = make_dim<1>(dims); + break; + case 2: + ddim = make_dim<2>(dims); + break; + case 3: + ddim = make_dim<3>(dims); + break; + case 4: + ddim = make_dim<4>(dims); + break; + case 5: + ddim = make_dim<5>(dims); + break; + case 6: + ddim = make_dim<6>(dims); + break; + case 7: + ddim = make_dim<7>(dims); + break; + case 8: + ddim = make_dim<8>(dims); + break; + case 9: + ddim = make_dim<9>(dims); + break; + default: + // std::cout << "Dynamic dimensions must have between [1, 9] + // dimensions."; + break; } } @@ -76,13 +72,13 @@ DDim make_ddim(std::initializer_list dims) { return result; } -DDim make_ddim(const std::vector& dims) { +DDim make_ddim(const std::vector &dims) { DDim result(make_dim(0)); make_ddim(result, &dims[0], dims.size()); return result; } -DDim make_ddim(const std::vector& dims) { +DDim make_ddim(const std::vector &dims) { std::vector res(dims.size()); std::transform(dims.begin(), dims.end(), res.begin(), [](int d) { return static_cast(d); }); @@ -91,35 +87,31 @@ DDim make_ddim(const std::vector& dims) { /// @cond HIDDEN // XXX For some reason, putting this in an anonymous namespace causes errors -struct DynamicMutableIndexer : Vistor { - public: +struct DynamicMutableIndexer : Vistor { +public: explicit DynamicMutableIndexer(int idx) : idx_(idx) {} - template - int64_t& operator()(Dim& dim) const { - return dim[idx_]; - } + template int64_t &operator()(Dim &dim) const { return dim[idx_]; } - private: +private: int idx_; }; struct DynamicConstIndexer : public Vistor { - public: +public: explicit DynamicConstIndexer(int idx) : idx_(idx) {} - template - int64_t operator()(const Dim& dim) const { + template int64_t operator()(const Dim &dim) const { return dim[idx_]; } - private: +private: int idx_; }; /// @endcond -int64_t& DDim::operator[](int idx) { +int64_t &DDim::operator[](int idx) { return DDim::ApplyVistor(DynamicMutableIndexer(idx), *this); } @@ -178,27 +170,26 @@ DDim DDim::operator*(DDim d) const { 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 struct VectorizeVisitor : Vistor { - std::vector& vector; + std::vector &vector; - explicit VectorizeVisitor(std::vector& v) : vector(v) {} + explicit VectorizeVisitor(std::vector &v) : vector(v) {} - template - void operator()(const T& t) { + template void operator()(const T &t) { vector.push_back(t.head); this->operator()(t.tail); } - void operator()(const Dim<0>& t) {} + void operator()(const Dim<0> &t) {} }; /// @endcond -std::vector vectorize(const DDim& ddim) { +std::vector vectorize(const DDim &ddim) { std::vector result; VectorizeVisitor visitor(result); DDim::ApplyVistor(visitor, ddim); @@ -207,30 +198,29 @@ std::vector vectorize(const DDim& ddim) { // NOTE: framework::vectorize converts to type int64_t // which does not fit cudnn inputs. -std::vector vectorize2int(const DDim& ddim) { +std::vector vectorize2int(const DDim &ddim) { std::vector temp = vectorize(ddim); std::vector result(temp.begin(), temp.end()); return result; } struct ProductVisitor : Vistor { - template - int64_t operator()(const Dim& dim) { + template int64_t operator()(const Dim &dim) { return product(dim); } }; -int64_t product(const DDim& ddim) { +int64_t product(const DDim &ddim) { ProductVisitor visitor; return DDim::ApplyVistor(visitor, ddim); } struct SliceVectorizeVisitor : Vistor { - std::vector& vector; + std::vector &vector; int begin; int end; - SliceVectorizeVisitor(std::vector& v, int b, int e) + SliceVectorizeVisitor(std::vector &v, int b, int e) : vector(v), begin(b), end(e) { // PADDLE_ENFORCE(begin < end, // "Begin index must be less than end index in ddim @@ -239,8 +229,7 @@ struct SliceVectorizeVisitor : Vistor { // "Begin index can't be less than zero in ddim slice."); } - template - void operator()(const Dim& dim) { + template void operator()(const Dim &dim) { if (begin == 0) { vector.push_back(dim.head); } else { @@ -252,12 +241,12 @@ struct SliceVectorizeVisitor : Vistor { } } - 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."); } }; -DDim slice_ddim(const DDim& ddim, int begin, int end) { +DDim slice_ddim(const DDim &ddim, int begin, int end) { std::vector vec; vec.reserve(end - begin); SliceVectorizeVisitor visitor(vec, begin, end); @@ -270,15 +259,12 @@ DDim slice_ddim(const DDim& ddim, int begin, int end) { /// \cond HIDDEN struct ArityVisitor : Vistor { - template - int operator()(Dim) const { - return D; - } + template int operator()(Dim) const { return D; } }; /// \endcond -int arity(const DDim& d) { +int arity(const DDim &d) { ArityVisitor arityVisitor = ArityVisitor(); return DDim::ApplyVistor(arityVisitor, d); // return arityVisitor(d.var.Get>()); @@ -288,19 +274,18 @@ int arity(const DDim& d) { /// \endcond -struct OSVistor : Vistor { - OSVistor(std::ostream& os) : os_(os) {} +struct OSVistor : Vistor { + OSVistor(std::ostream &os) : os_(os) {} - template - std::ostream& operator()(Dim dim) const { + template std::ostream &operator()(Dim dim) const { return os_ << dim; } - private: - std::ostream& os_; +private: + 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); DDim::ApplyVistor(vistor, ddim); return os; @@ -310,15 +295,15 @@ DDim::DDim(std::initializer_list 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(); return make_ddim({product(slice_ddim(src, 0, num_col_dims)), 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 strides(ddim.size()); strides[ddim.size() - 1] = 1; for (int i = ddim.size() - 2; i >= 0; --i) { @@ -327,7 +312,7 @@ DDim stride(const DDim& ddim) { return framework::make_ddim(strides); } -DDim stride_numel(const framework::DDim& ddim) { +DDim stride_numel(const framework::DDim &ddim) { std::vector strides(ddim.size()); strides[ddim.size() - 1] = ddim[ddim.size() - 1]; for (int i = ddim.size() - 2; i >= 0; --i) { @@ -336,5 +321,5 @@ DDim stride_numel(const framework::DDim& ddim) { return framework::make_ddim(strides); } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/ddim.h b/src/framework/ddim.h index fdcef43aa5..8378c77de5 100644 --- a/src/framework/ddim.h +++ b/src/framework/ddim.h @@ -14,12 +14,12 @@ limitations under the License. */ #pragma once +#include "common/variant.h" +#include "dim.h" #include #include #include #include -#include "common/variant.h" -#include "dim.h" namespace paddle_mobile { namespace framework { @@ -66,15 +66,11 @@ struct DDim { DDim() { var.Set>(Dim<1>()); } - template - explicit DDim(const Dim &in) { - var.Set>(in); - } + template explicit DDim(const Dim &in) { var.Set>(in); } /*implicit*/ DDim(std::initializer_list init_list); - template - DDim &operator=(const Dim &in) { + template DDim &operator=(const Dim &in) { var.Set>(in); return *this; } @@ -161,5 +157,5 @@ DDim flatten_to_1d(const DDim &src); DDim stride(const DDim &ddim); DDim stride_numel(const DDim &ddim); -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/dim.h b/src/framework/dim.h index 292bed1edf..6525d468f6 100644 --- a/src/framework/dim.h +++ b/src/framework/dim.h @@ -24,8 +24,7 @@ namespace paddle_mobile { namespace framework { // Statically sized, statically indexed dimension -template -struct Dim { +template struct Dim { static constexpr int dimensions = i; template @@ -35,7 +34,7 @@ struct Dim { } HOSTDEVICE - Dim(int64_t _head, const Dim& _tail) : head(_head), tail(_tail) {} + Dim(int64_t _head, const Dim &_tail) : head(_head), tail(_tail) {} HOSTDEVICE Dim() : head(0), tail() {} @@ -43,7 +42,7 @@ struct Dim { /** Construct a Dim from a linear index and size. Uses Fortran order * indexing. */ HOSTDEVICE - Dim(int64_t idx, const Dim& size) + Dim(int64_t idx, const Dim &size) : head(idx % size.head), tail(idx / size.head, size.tail) {} /** Construct a Dim with each dimension set to the given index */ @@ -51,15 +50,15 @@ struct Dim { Dim(int64_t idx) : head(idx), tail(idx) {} HOSTDEVICE - bool operator==(const Dim& o) const { + bool operator==(const Dim &o) const { return (head == o.head) && (tail == o.tail); } HOSTDEVICE - bool operator!=(const Dim& o) const { return !(*this == o); } + bool operator!=(const Dim &o) const { return !(*this == o); } HOSTDEVICE - int64_t& operator[](int idx); + int64_t &operator[](int idx); HOSTDEVICE int64_t operator[](int idx) const; @@ -70,8 +69,7 @@ struct Dim { }; // Base case specialization -template <> -struct Dim<0> { +template <> struct Dim<0> { static constexpr int dimensions = 0; HOSTDEVICE @@ -81,7 +79,7 @@ struct Dim<0> { Dim() {} HOSTDEVICE - Dim(int idx, const Dim<0>& size) { + Dim(int idx, const Dim<0> &size) { #ifndef __CUDA_ARCH__ if (idx > 0) { throw std::invalid_argument("Index out of range."); @@ -92,13 +90,13 @@ struct Dim<0> { } HOSTDEVICE - bool operator==(const Dim<0>& o) const { return true; } + bool operator==(const Dim<0> &o) const { return true; } HOSTDEVICE - bool operator!=(const Dim<0>& o) const { return false; } + bool operator!=(const Dim<0> &o) const { return false; } HOSTDEVICE - int64_t& operator[](int idx); + int64_t &operator[](int idx); HOSTDEVICE int64_t operator[](int idx) const; }; @@ -106,37 +104,28 @@ struct Dim<0> { namespace { // Helper for accessing Dim classes -template -struct DimGetter { +template struct DimGetter { // Return a copy if Dim is const - template - HOSTDEVICE static int64_t impl(const D& d) { + template HOSTDEVICE static int64_t impl(const D &d) { return DimGetter::impl(d.tail); } // Return a reference if Dim is mutable - template - HOSTDEVICE static int64_t& impl(D& d) { + template HOSTDEVICE static int64_t &impl(D &d) { return DimGetter::impl(d.tail); } }; // Eureka! We found the element! -template <> -struct DimGetter<0> { +template <> struct DimGetter<0> { // Return a copy if Dim is const - template - HOSTDEVICE static int64_t impl(const D& d) { + template HOSTDEVICE static int64_t impl(const D &d) { return d.head; } // Return a reference if Dim is mutable - template - HOSTDEVICE static int64_t& impl(D& d) { - return d.head; - } + template HOSTDEVICE static int64_t &impl(D &d) { return d.head; } }; -template -HOSTDEVICE int64_t& indexer(Dim& dim, int idx) { +template HOSTDEVICE int64_t &indexer(Dim &dim, int idx) { #ifndef __CUDA_ARCH__ if (idx < 0) { throw std::invalid_argument("Tried to access a negative dimension"); @@ -150,8 +139,7 @@ HOSTDEVICE int64_t& indexer(Dim& dim, int idx) { return indexer(dim.tail, idx - 1); } -template <> -HOSTDEVICE int64_t& indexer<0>(Dim<0>& dim, int idx) { +template <> HOSTDEVICE int64_t &indexer<0>(Dim<0> &dim, int idx) { #ifndef __CUDA_ARCH__ throw std::invalid_argument("Invalid index"); #else @@ -167,8 +155,7 @@ HOSTDEVICE int64_t& indexer<0>(Dim<0>& dim, int idx) { #endif } -template -HOSTDEVICE int64_t indexer(const Dim& dim, int idx) { +template HOSTDEVICE int64_t indexer(const Dim &dim, int idx) { #ifndef __CUDA_ARCH__ if (idx < 0) { throw std::invalid_argument("Tried to access a negative dimension"); @@ -182,8 +169,7 @@ HOSTDEVICE int64_t indexer(const Dim& dim, int idx) { return indexer(dim.tail, idx - 1); } -template <> -HOSTDEVICE int64_t indexer<0>(const Dim<0>& dim, int idx) { +template <> HOSTDEVICE int64_t indexer<0>(const Dim<0> &dim, int idx) { #ifndef __CUDA_ARCH__ throw std::invalid_argument("Invalid index"); #else @@ -199,29 +185,25 @@ HOSTDEVICE int64_t indexer<0>(const Dim<0>& dim, int idx) { #endif } -} // namespace +} // namespace // Static access to constant Dim -template -HOSTDEVICE int64_t get(const Dim& d) { +template HOSTDEVICE int64_t get(const Dim &d) { return DimGetter::impl(d); } // Static access to mutable Dim -template -HOSTDEVICE int64_t& get(Dim& d) { +template HOSTDEVICE int64_t &get(Dim &d) { return DimGetter::impl(d); } // Dynamic access to constant Dim -template -HOSTDEVICE int64_t Dim::operator[](int i) const { +template HOSTDEVICE int64_t Dim::operator[](int i) const { // std::cout << "l: " << l << std::endl; return indexer(*this, i); } // Dynamic access to mutable Dim -template -HOSTDEVICE int64_t& Dim::operator[](int i) { +template HOSTDEVICE int64_t &Dim::operator[](int i) { return indexer(*this, i); } @@ -231,54 +213,52 @@ inline HOSTDEVICE int64_t Dim<0>::operator[](int i) const { } // 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); } // Dynamic access to constant Dim // without std::enable_if will try to instantiate this on get<0>(d) template -HOSTDEVICE typename std::enable_if<(l > 0), int64_t>::type get(const Dim& d, +HOSTDEVICE typename std::enable_if<(l > 0), int64_t>::type get(const Dim &d, int i) { return d[i]; } // Dynamic access to mutable Dim template -HOSTDEVICE typename std::enable_if<(l > 0), int64_t&>::type get(Dim& d, - int i) { +HOSTDEVICE typename std::enable_if<(l > 0), int64_t &>::type get(Dim &d, + int i) { return d[i]; } // Dot product of two dims template -HOSTDEVICE int64_t linearize(const Dim& a, const Dim& b) { +HOSTDEVICE int64_t linearize(const Dim &a, const Dim &b) { return a.head * b.head + linearize(a.tail, b.tail); } // Base case dot product of two Dims // Notice it is inline because it is no longer a 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; } // Product of a Dim -template -HOSTDEVICE int64_t product(const Dim& a, int prod = 1) { +template HOSTDEVICE int64_t product(const Dim &a, int prod = 1) { return prod * a.head * product(a.tail); } // Base case product of a Dim // Notice it is inline because it is no longer a template -template <> -HOSTDEVICE inline int64_t product(const Dim<0>& a, int prod) { +template <> HOSTDEVICE inline int64_t product(const Dim<0> &a, int prod) { return prod; } // Is 0 <= idx_i < size_i for all i? template -HOSTDEVICE bool contained(const Dim& idx, const Dim& size) { +HOSTDEVICE bool contained(const Dim &idx, const Dim &size) { return ((0 <= idx.head) && (idx.head < size.head) && contained(idx.tail, size.tail)); } @@ -286,7 +266,7 @@ HOSTDEVICE bool contained(const Dim& idx, const Dim& size) { // Base case of is 0 <= idx_i < size_i ? // Notice it is inline because it is no longer a 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; } @@ -294,15 +274,14 @@ HOSTDEVICE inline bool contained(const Dim<0>& idx, const Dim<0>& size) { * \brief Compute exclusive prefix-multiply of a Dim. */ template -HOSTDEVICE Dim ex_prefix_mul(const Dim& src, int mul = 1) { +HOSTDEVICE Dim ex_prefix_mul(const Dim &src, int mul = 1) { return Dim(mul, ex_prefix_mul(src.tail, mul * src.head)); } ///\cond HIDDEN // Base case of ex_prefix_mul // Notice it is inline because it is no longer a template -template <> -HOSTDEVICE inline Dim<0> ex_prefix_mul(const Dim<0>& src, int mul) { +template <> HOSTDEVICE inline Dim<0> ex_prefix_mul(const Dim<0> &src, int mul) { return Dim<0>(); } ///\endcond @@ -310,38 +289,36 @@ HOSTDEVICE inline Dim<0> ex_prefix_mul(const Dim<0>& src, int mul) { /** * Add two dimensions together */ -template -HOSTDEVICE Dim dim_plus(const Dim& a, const Dim& b) { +template HOSTDEVICE Dim dim_plus(const Dim &a, const Dim &b) { return Dim(a.head + b.head, dim_plus(a.tail, b.tail)); } // Base case 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>(); } template -HOSTDEVICE Dim operator+(const Dim& lhs, const Dim& rhs) { +HOSTDEVICE Dim operator+(const Dim &lhs, const Dim &rhs) { return dim_plus(lhs, rhs); } /** * Multiply two dimensions together */ -template -HOSTDEVICE Dim dim_mult(const Dim& a, const Dim& b) { +template HOSTDEVICE Dim dim_mult(const Dim &a, const Dim &b) { return Dim(a.head * b.head, dim_mult(a.tail, b.tail)); } // Base case 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>(); } template -HOSTDEVICE Dim operator*(const Dim& lhs, const Dim& rhs) { +HOSTDEVICE Dim operator*(const Dim &lhs, const Dim &rhs) { return dim_mult(lhs, rhs); } @@ -356,7 +333,7 @@ HOSTDEVICE Dim operator*(const Dim& lhs, const Dim& rhs) { */ template -HOSTDEVICE Dim normalize_strides(const Dim& size, const Dim& stride) { +HOSTDEVICE Dim normalize_strides(const Dim &size, const Dim &stride) { int norm_stride = size.head == 1 ? 0 : stride.head; return Dim(norm_stride, normalize_strides(size.tail, stride.tail)); } @@ -364,8 +341,8 @@ HOSTDEVICE Dim normalize_strides(const Dim& size, const Dim& stride) { ///\cond HIDDEN template <> -HOSTDEVICE inline Dim<0> normalize_strides(const Dim<0>& size, - const Dim<0>& stride) { +HOSTDEVICE inline Dim<0> normalize_strides(const Dim<0> &size, + const Dim<0> &stride) { return Dim<0>(); } @@ -386,8 +363,8 @@ HOSTDEVICE Dim make_dim(Args... idxes) { // Allows us to output a Dim // XXX For some reason, overloading fails to resolve this correctly template -typename std::enable_if<(i > 1), std::ostream&>::type operator<<( - std::ostream& os, const Dim& d) { +typename std::enable_if<(i > 1), std::ostream &>::type +operator<<(std::ostream &os, const Dim &d) { os << d.head << ", " << d.tail; return os; } @@ -395,18 +372,17 @@ typename std::enable_if<(i > 1), std::ostream&>::type operator<<( // Base case that allows us to output a Dim // XXX I wish this could be an overload instead of a template template -typename std::enable_if<(i == 1), std::ostream&>::type operator<<( - std::ostream& os, const Dim& d) { +typename std::enable_if<(i == 1), std::ostream &>::type +operator<<(std::ostream &os, const Dim &d) { os << d.head; 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; } -template -HOST std::string Dim::to_string() const { +template HOST std::string Dim::to_string() const { std::stringstream stream; stream << *this; @@ -428,5 +404,5 @@ HOSTDEVICE Dim linear_to_dimension(int linear_index, Dim extents) { return result; } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/executor.cpp b/src/framework/executor.cpp index 9e83561e88..1459f04de5 100644 --- a/src/framework/executor.cpp +++ b/src/framework/executor.cpp @@ -102,5 +102,5 @@ void Executor::predict(const Tensor &t, int block_id) { template class Executor; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/executor.h b/src/framework/executor.h index ecaa0c0a48..0e6d9a566e 100644 --- a/src/framework/executor.h +++ b/src/framework/executor.h @@ -34,13 +34,12 @@ SOFTWARE. namespace paddle_mobile { namespace framework { -template -class Executor { - public: +template class Executor { +public: Executor(const Program p); std::shared_ptr predict(Tensor &t); - private: +private: const framework::Program program_; std::shared_ptr to_predict_program_; void predict(const Tensor &t, int block_id); @@ -50,5 +49,5 @@ class Executor { bool use_optimize_ = false; }; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/framework.pb.cpp b/src/framework/framework.pb.cpp index 6d46113493..0039b030c1 100644 --- a/src/framework/framework.pb.cpp +++ b/src/framework/framework.pb.cpp @@ -18,73 +18,73 @@ namespace paddle_mobile { namespace framework { namespace proto { class OpDesc_AttrDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _OpDesc_Attr_default_instance_; class OpDesc_VarDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _OpDesc_Var_default_instance_; class OpDescDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _OpDesc_default_instance_; class OpProto_VarDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _OpProto_Var_default_instance_; class OpProto_AttrDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _OpProto_Attr_default_instance_; class OpProtoDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _OpProto_default_instance_; class VarType_TensorDescDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _VarType_TensorDesc_default_instance_; class VarType_LoDTensorDescDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _VarType_LoDTensorDesc_default_instance_; class VarType_LoDTensorArrayDescDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed< VarType_LoDTensorArrayDesc> _instance; } _VarType_LoDTensorArrayDesc_default_instance_; class VarType_ReaderDescDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _VarType_ReaderDesc_default_instance_; class VarType_ChannelDescDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _VarType_ChannelDesc_default_instance_; class VarType_TupleDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _VarType_Tuple_default_instance_; class VarTypeDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _VarType_default_instance_; class VarDescDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _VarDesc_default_instance_; class BlockDescDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _BlockDesc_default_instance_; class ProgramDescDefaultTypeInternal { - public: +public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _ProgramDesc_default_instance_; @@ -173,41 +173,41 @@ void TableStruct::InitDefaultsImpl() { ::google::protobuf::internal::OnShutdownDestroyMessage( &_ProgramDesc_default_instance_); _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:: internal_default_instance()); _VarType_LoDTensorArrayDesc_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:: internal_default_instance()); _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:: internal_default_instance()); _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:: internal_default_instance()); _VarType_default_instance_._instance.get_mutable()->tensor_array_ = const_cast< - ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc*>( + ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *>( ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc:: internal_default_instance()); _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:: internal_default_instance()); _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:: internal_default_instance()); _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:: internal_default_instance()); _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()); } @@ -217,39 +217,39 @@ void InitDefaults() { } namespace { void AddDescriptorsImpl() { InitDefaults(); } -} // anonymous namespace +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -} // namespace protobuf_framework_2eproto +} // namespace protobuf_framework_2eproto bool VarType_Type_IsValid(int value) { switch (value) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - return true; - default: - return false; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + return true; + default: + return false; } } @@ -276,22 +276,22 @@ const VarType_Type VarType::TUPLE; const VarType_Type VarType::Type_MIN; const VarType_Type VarType::Type_MAX; const int VarType::Type_ARRAYSIZE; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 bool AttrType_IsValid(int value) { switch (value) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - return true; - default: - return false; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + return true; + default: + return false; } } @@ -310,7 +310,7 @@ const int OpDesc_Attr::kBFieldNumber; const int OpDesc_Attr::kBoolsFieldNumber; const int OpDesc_Attr::kBlockIdxFieldNumber; const int OpDesc_Attr::kLFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 OpDesc_Attr::OpDesc_Attr() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -320,15 +320,10 @@ OpDesc_Attr::OpDesc_Attr() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc.Attr) } -OpDesc_Attr::OpDesc_Attr(const OpDesc_Attr& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0), - ints_(from.ints_), - floats_(from.floats_), - strings_(from.strings_), - bools_(from.bools_) { +OpDesc_Attr::OpDesc_Attr(const OpDesc_Attr &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0), ints_(from.ints_), + floats_(from.floats_), strings_(from.strings_), bools_(from.bools_) { _internal_metadata_.MergeFrom(from._internal_metadata_); name_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -344,8 +339,8 @@ OpDesc_Attr::OpDesc_Attr(const OpDesc_Attr& from) &::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_); } ::memcpy(&type_, &from.type_, - static_cast(reinterpret_cast(&block_idx_) - - reinterpret_cast(&type_)) + + static_cast(reinterpret_cast(&block_idx_) - + reinterpret_cast(&type_)) + sizeof(block_idx_)); // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.OpDesc.Attr) } @@ -356,9 +351,10 @@ void OpDesc_Attr::SharedCtor() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); s_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&type_, 0, static_cast(reinterpret_cast(&block_idx_) - - reinterpret_cast(&type_)) + - sizeof(block_idx_)); + ::memset(&type_, 0, + static_cast(reinterpret_cast(&block_idx_) - + reinterpret_cast(&type_)) + + sizeof(block_idx_)); } OpDesc_Attr::~OpDesc_Attr() { @@ -378,13 +374,13 @@ void OpDesc_Attr::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const OpDesc_Attr& OpDesc_Attr::default_instance() { +const OpDesc_Attr &OpDesc_Attr::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -OpDesc_Attr* OpDesc_Attr::New(::google::protobuf::Arena* arena) const { - OpDesc_Attr* n = new OpDesc_Attr; +OpDesc_Attr *OpDesc_Attr::New(::google::protobuf::Arena *arena) const { + OpDesc_Attr *n = new OpDesc_Attr; if (arena != NULL) { arena->Own(n); } @@ -416,8 +412,8 @@ void OpDesc_Attr::Clear() { } if (cached_has_bits & 252u) { ::memset(&type_, 0, - static_cast(reinterpret_cast(&block_idx_) - - reinterpret_cast(&type_)) + + static_cast(reinterpret_cast(&block_idx_) - + reinterpret_cast(&type_)) + sizeof(block_idx_)); } _has_bits_.Clear(); @@ -425,9 +421,10 @@ void OpDesc_Attr::Clear() { } bool OpDesc_Attr::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -441,222 +438,215 @@ bool OpDesc_Attr::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - } else { - goto handle_unusual; - } - break; + // required string name = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + } else { + goto handle_unusual; } + break; + } - // required .paddle_mobile.framework.proto.AttrType type = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::paddle_mobile::framework::proto::AttrType_IsValid(value)) { - set_type(static_cast<::paddle_mobile::framework::proto::AttrType>( - value)); - } else { - unknown_fields_stream.WriteVarint32(16u); - unknown_fields_stream.WriteVarint32( - static_cast<::google::protobuf::uint32>(value)); - } + // required .paddle_mobile.framework.proto.AttrType type = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::paddle_mobile::framework::proto::AttrType_IsValid(value)) { + set_type( + static_cast<::paddle_mobile::framework::proto::AttrType>(value)); } else { - goto handle_unusual; + unknown_fields_stream.WriteVarint32(16u); + unknown_fields_stream.WriteVarint32( + static_cast<::google::protobuf::uint32>(value)); } - break; + } else { + goto handle_unusual; } + break; + } - // optional int32 i = 3; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { - set_has_i(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(input, - &i_))); - } else { - goto handle_unusual; - } - break; + // optional int32 i = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { + set_has_i(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(input, + &i_))); + } else { + goto handle_unusual; } + break; + } - // optional float f = 4; - case 4: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(37u /* 37 & 0xFF */)) { - set_has_f(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( - input, &f_))); - } else { - goto handle_unusual; - } - break; + // optional float f = 4; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(37u /* 37 & 0xFF */)) { + set_has_f(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &f_))); + } else { + goto handle_unusual; } + break; + } - // optional string s = 5; - case 5: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_s())); - } else { - goto handle_unusual; - } - break; + // optional string s = 5; + case 5: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_s())); + } else { + goto handle_unusual; } + break; + } - // repeated int32 ints = 6; - case 6: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(48u /* 48 & 0xFF */)) { - DO_(( - ::google::protobuf::internal::WireFormatLite:: - ReadRepeatedPrimitive< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - 1, 48u, input, this->mutable_ints()))); - } else if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>( - 50u /* 50 & 0xFF */)) { - DO_(( - ::google::protobuf::internal::WireFormatLite:: - ReadPackedPrimitiveNoInline< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, this->mutable_ints()))); - } else { - goto handle_unusual; - } - break; + // repeated int32 ints = 6; + case 6: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(48u /* 48 & 0xFF */)) { + DO_(( + ::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 48u, input, this->mutable_ints()))); + } else if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite:: + ReadPackedPrimitiveNoInline< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_ints()))); + } else { + goto handle_unusual; } + break; + } - // repeated float floats = 7; - case 7: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(61u /* 61 & 0xFF */)) { - DO_(( - ::google::protobuf::internal::WireFormatLite:: - ReadRepeatedPrimitive< - float, - ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( - 1, 61u, input, this->mutable_floats()))); - } else if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>( - 58u /* 58 & 0xFF */)) { - DO_(( - ::google::protobuf::internal::WireFormatLite:: - ReadPackedPrimitiveNoInline< - float, - ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( - input, this->mutable_floats()))); - } else { - goto handle_unusual; - } - break; + // repeated float floats = 7; + case 7: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(61u /* 61 & 0xFF */)) { + DO_(( + ::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + float, + ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + 1, 61u, input, this->mutable_floats()))); + } else if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite:: + ReadPackedPrimitiveNoInline< + float, + ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, this->mutable_floats()))); + } else { + goto handle_unusual; } + break; + } - // repeated string strings = 8; - case 8: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->add_strings())); - } else { - goto handle_unusual; - } - break; + // repeated string strings = 8; + case 8: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_strings())); + } else { + goto handle_unusual; } + break; + } - // optional bool b = 10; - case 10: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(80u /* 80 & 0xFF */)) { - set_has_b(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &b_))); - } else { - goto handle_unusual; - } - break; + // optional bool b = 10; + case 10: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(80u /* 80 & 0xFF */)) { + set_has_b(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &b_))); + } else { + goto handle_unusual; } + break; + } - // repeated bool bools = 11; - case 11: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(88u /* 88 & 0xFF */)) { - DO_((::google::protobuf::internal::WireFormatLite:: - ReadRepeatedPrimitive< - bool, - ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - 1, 88u, input, this->mutable_bools()))); - } else if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>( - 90u /* 90 & 0xFF */)) { - DO_((::google::protobuf::internal::WireFormatLite:: - ReadPackedPrimitiveNoInline< - bool, - ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, this->mutable_bools()))); - } else { - goto handle_unusual; - } - break; + // repeated bool bools = 11; + case 11: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(88u /* 88 & 0xFF */)) { + DO_(( + ::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + 1, 88u, input, this->mutable_bools()))); + } else if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(90u /* 90 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite:: + ReadPackedPrimitiveNoInline< + bool, + ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, this->mutable_bools()))); + } else { + goto handle_unusual; } + break; + } - // optional int32 block_idx = 12; - case 12: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(96u /* 96 & 0xFF */)) { - set_has_block_idx(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &block_idx_))); - } else { - goto handle_unusual; - } - break; + // optional int32 block_idx = 12; + case 12: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(96u /* 96 & 0xFF */)) { + set_has_block_idx(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &block_idx_))); + } else { + goto handle_unusual; } + break; + } - // optional int64 l = 13; - case 13: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(104u /* 104 & 0xFF */)) { - set_has_l(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int64, - ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(input, - &l_))); - } else { - goto handle_unusual; - } - break; + // optional int64 l = 13; + case 13: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(104u /* 104 & 0xFF */)) { + set_has_l(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, + ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(input, + &l_))); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -669,7 +659,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -778,7 +768,7 @@ size_t OpDesc_Attr::ByteSizeLong() const { total_size += _internal_metadata_.unknown_fields().size(); if (((_has_bits_[0] & 0x00000005) ^ 0x00000005) == - 0) { // All required fields are present. + 0) { // All required fields are present. // required string name = 1; total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); @@ -868,11 +858,11 @@ size_t OpDesc_Attr::ByteSizeLong() const { } void OpDesc_Attr::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } bool OpDesc_Attr::IsInitialized() const { - if ((_has_bits_[0] & 0x00000005) != 0x00000005) return false; + if ((_has_bits_[0] & 0x00000005) != 0x00000005) + return false; return true; } -void OpDesc_Attr::Swap(OpDesc_Attr* other) { - if (other == this) return; +void OpDesc_Attr::Swap(OpDesc_Attr *other) { + if (other == this) + return; InternalSwap(other); } -void OpDesc_Attr::InternalSwap(OpDesc_Attr* other) { +void OpDesc_Attr::InternalSwap(OpDesc_Attr *other) { using std::swap; ints_.InternalSwap(&other->ints_); floats_.InternalSwap(&other->floats_); @@ -972,50 +965,50 @@ void OpDesc_Attr::clear_name() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return name_.GetNoArena(); } -void OpDesc_Attr::set_name(const ::std::string& value) { +void OpDesc_Attr::set_name(const ::std::string &value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.name) } #if LANG_CXX11 -void OpDesc_Attr::set_name(::std::string&& value) { +void OpDesc_Attr::set_name(::std::string &&value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Attr.name) } #endif -void OpDesc_Attr::set_name(const char* value) { +void OpDesc_Attr::set_name(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.name) return name_.MutableNoArena( &::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) clear_has_name(); return name_.ReleaseNoArena( &::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) { set_has_name(); } else { @@ -1092,50 +1085,50 @@ void OpDesc_Attr::clear_s() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return s_.GetNoArena(); } -void OpDesc_Attr::set_s(const ::std::string& value) { +void OpDesc_Attr::set_s(const ::std::string &value) { set_has_s(); s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.s) } #if LANG_CXX11 -void OpDesc_Attr::set_s(::std::string&& value) { +void OpDesc_Attr::set_s(::std::string &&value) { set_has_s(); s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Attr.s) } #endif -void OpDesc_Attr::set_s(const char* value) { +void OpDesc_Attr::set_s(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_s(); s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.s) return s_.MutableNoArena( &::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) clear_has_s(); return s_.ReleaseNoArena( &::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) { set_has_s(); } else { @@ -1161,12 +1154,12 @@ void OpDesc_Attr::add_ints(::google::protobuf::int32 value) { ints_.Add(value); // @@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 { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.ints) return ints_; } -::google::protobuf::RepeatedField<::google::protobuf::int32>* +::google::protobuf::RepeatedField<::google::protobuf::int32> * OpDesc_Attr::mutable_ints() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.ints) return &ints_; @@ -1187,11 +1180,11 @@ void OpDesc_Attr::add_floats(float value) { floats_.Add(value); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.floats) } -const ::google::protobuf::RepeatedField& OpDesc_Attr::floats() const { +const ::google::protobuf::RepeatedField &OpDesc_Attr::floats() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.floats) return floats_; } -::google::protobuf::RepeatedField* OpDesc_Attr::mutable_floats() { +::google::protobuf::RepeatedField *OpDesc_Attr::mutable_floats() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.floats) return &floats_; } @@ -1199,62 +1192,62 @@ const ::google::protobuf::RepeatedField& OpDesc_Attr::floats() const { // repeated string strings = 8; int OpDesc_Attr::strings_size() const { return strings_.size(); } 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) 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) 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) strings_.Mutable(index)->assign(value); } #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) strings_.Mutable(index)->assign(std::move(value)); } #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); strings_.Mutable(index)->assign(value); // @@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) { - strings_.Mutable(index)->assign(reinterpret_cast(value), size); +void OpDesc_Attr::set_strings(int index, const char *value, size_t size) { + strings_.Mutable(index)->assign(reinterpret_cast(value), size); // @@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) 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); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.strings) } #if LANG_CXX11 -void OpDesc_Attr::add_strings(::std::string&& value) { +void OpDesc_Attr::add_strings(::std::string &&value) { strings_.Add(std::move(value)); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.strings) } #endif -void OpDesc_Attr::add_strings(const char* value) { +void OpDesc_Attr::add_strings(const char *value) { GOOGLE_DCHECK(value != NULL); strings_.Add()->assign(value); // @@protoc_insertion_point(field_add_char:paddle_mobile.framework.proto.OpDesc.Attr.strings) } -void OpDesc_Attr::add_strings(const char* value, size_t size) { - strings_.Add()->assign(reinterpret_cast(value), size); +void OpDesc_Attr::add_strings(const char *value, size_t size) { + strings_.Add()->assign(reinterpret_cast(value), size); // @@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 { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.strings) return strings_; } -::google::protobuf::RepeatedPtrField<::std::string>* +::google::protobuf::RepeatedPtrField<::std::string> * OpDesc_Attr::mutable_strings() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.strings) return &strings_; @@ -1293,11 +1286,11 @@ void OpDesc_Attr::add_bools(bool value) { bools_.Add(value); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.bools) } -const ::google::protobuf::RepeatedField& OpDesc_Attr::bools() const { +const ::google::protobuf::RepeatedField &OpDesc_Attr::bools() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.bools) return bools_; } -::google::protobuf::RepeatedField* OpDesc_Attr::mutable_bools() { +::google::protobuf::RepeatedField *OpDesc_Attr::mutable_bools() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.bools) return &bools_; } @@ -1340,14 +1333,14 @@ void OpDesc_Attr::set_l(::google::protobuf::int64 value) { // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.l) } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int OpDesc_Var::kParameterFieldNumber; const int OpDesc_Var::kArgumentsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 OpDesc_Var::OpDesc_Var() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -1357,11 +1350,9 @@ OpDesc_Var::OpDesc_Var() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc.Var) } -OpDesc_Var::OpDesc_Var(const OpDesc_Var& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0), +OpDesc_Var::OpDesc_Var(const OpDesc_Var &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0), arguments_(from.arguments_) { _internal_metadata_.MergeFrom(from._internal_metadata_); parameter_.UnsafeSetDefault( @@ -1395,13 +1386,13 @@ void OpDesc_Var::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const OpDesc_Var& OpDesc_Var::default_instance() { +const OpDesc_Var &OpDesc_Var::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -OpDesc_Var* OpDesc_Var::New(::google::protobuf::Arena* arena) const { - OpDesc_Var* n = new OpDesc_Var; +OpDesc_Var *OpDesc_Var::New(::google::protobuf::Arena *arena) const { + OpDesc_Var *n = new OpDesc_Var; if (arena != NULL) { arena->Own(n); } @@ -1425,9 +1416,10 @@ void OpDesc_Var::Clear() { } bool OpDesc_Var::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -1441,42 +1433,43 @@ bool OpDesc_Var::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string parameter = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_parameter())); - } else { - goto handle_unusual; - } - break; + // required string parameter = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_parameter())); + } else { + goto handle_unusual; } + break; + } - // repeated string arguments = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->add_arguments())); - } else { - goto handle_unusual; - } - break; + // repeated string arguments = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_arguments())); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -1489,7 +1482,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -1540,11 +1533,11 @@ size_t OpDesc_Var::ByteSizeLong() const { } void OpDesc_Var::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } bool OpDesc_Var::IsInitialized() const { - if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + if ((_has_bits_[0] & 0x00000001) != 0x00000001) + return false; return true; } -void OpDesc_Var::Swap(OpDesc_Var* other) { - if (other == this) return; +void OpDesc_Var::Swap(OpDesc_Var *other) { + if (other == this) + return; InternalSwap(other); } -void OpDesc_Var::InternalSwap(OpDesc_Var* other) { +void OpDesc_Var::InternalSwap(OpDesc_Var *other) { using std::swap; arguments_.InternalSwap(&other->arguments_); parameter_.Swap(&other->parameter_); @@ -1603,18 +1599,18 @@ void OpDesc_Var::clear_parameter() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return parameter_.GetNoArena(); } -void OpDesc_Var::set_parameter(const ::std::string& value) { +void OpDesc_Var::set_parameter(const ::std::string &value) { set_has_parameter(); parameter_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.parameter) } #if LANG_CXX11 -void OpDesc_Var::set_parameter(::std::string&& value) { +void OpDesc_Var::set_parameter(::std::string &&value) { set_has_parameter(); parameter_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -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) } #endif -void OpDesc_Var::set_parameter(const char* value) { +void OpDesc_Var::set_parameter(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_parameter(); parameter_.SetNoArena( @@ -1630,26 +1626,26 @@ void OpDesc_Var::set_parameter(const char* value) { ::std::string(value)); // @@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(); parameter_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Var.parameter) return parameter_.MutableNoArena( &::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) clear_has_parameter(); return parameter_.ReleaseNoArena( &::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) { set_has_parameter(); } else { @@ -1663,68 +1659,69 @@ void OpDesc_Var::set_allocated_parameter(::std::string* parameter) { // repeated string arguments = 2; int OpDesc_Var::arguments_size() const { return arguments_.size(); } 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) 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) 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) arguments_.Mutable(index)->assign(value); } #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) arguments_.Mutable(index)->assign(std::move(value)); } #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); arguments_.Mutable(index)->assign(value); // @@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) { - arguments_.Mutable(index)->assign(reinterpret_cast(value), size); +void OpDesc_Var::set_arguments(int index, const char *value, size_t size) { + arguments_.Mutable(index)->assign(reinterpret_cast(value), + size); // @@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) 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); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Var.arguments) } #if LANG_CXX11 -void OpDesc_Var::add_arguments(::std::string&& value) { +void OpDesc_Var::add_arguments(::std::string &&value) { arguments_.Add(std::move(value)); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Var.arguments) } #endif -void OpDesc_Var::add_arguments(const char* value) { +void OpDesc_Var::add_arguments(const char *value) { GOOGLE_DCHECK(value != NULL); arguments_.Add()->assign(value); // @@protoc_insertion_point(field_add_char:paddle_mobile.framework.proto.OpDesc.Var.arguments) } -void OpDesc_Var::add_arguments(const char* value, size_t size) { - arguments_.Add()->assign(reinterpret_cast(value), size); +void OpDesc_Var::add_arguments(const char *value, size_t size) { + arguments_.Add()->assign(reinterpret_cast(value), size); // @@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 { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Var.arguments) return arguments_; } -::google::protobuf::RepeatedPtrField<::std::string>* +::google::protobuf::RepeatedPtrField<::std::string> * OpDesc_Var::mutable_arguments() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Var.arguments) return &arguments_; } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== @@ -1734,7 +1731,7 @@ const int OpDesc::kInputsFieldNumber; const int OpDesc::kOutputsFieldNumber; const int OpDesc::kAttrsFieldNumber; const int OpDesc::kIsTargetFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 OpDesc::OpDesc() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -1744,14 +1741,10 @@ OpDesc::OpDesc() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc) } -OpDesc::OpDesc(const OpDesc& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0), - inputs_(from.inputs_), - outputs_(from.outputs_), - attrs_(from.attrs_) { +OpDesc::OpDesc(const OpDesc &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0), inputs_(from.inputs_), + outputs_(from.outputs_), attrs_(from.attrs_) { _internal_metadata_.MergeFrom(from._internal_metadata_); type_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -1786,13 +1779,13 @@ void OpDesc::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const OpDesc& OpDesc::default_instance() { +const OpDesc &OpDesc::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -OpDesc* OpDesc::New(::google::protobuf::Arena* arena) const { - OpDesc* n = new OpDesc; +OpDesc *OpDesc::New(::google::protobuf::Arena *arena) const { + OpDesc *n = new OpDesc; if (arena != NULL) { arena->Own(n); } @@ -1819,9 +1812,10 @@ void OpDesc::Clear() { } bool OpDesc::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -1835,80 +1829,81 @@ bool OpDesc::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, add_inputs())); - } else { - goto handle_unusual; - } - break; + // repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_inputs())); + } else { + goto handle_unusual; } + break; + } - // repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, add_outputs())); - } else { - goto handle_unusual; - } - break; + // repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_outputs())); + } else { + goto handle_unusual; } + break; + } - // required string type = 3; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_type())); - } else { - goto handle_unusual; - } - break; + // required string type = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_type())); + } else { + goto handle_unusual; } + break; + } - // repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4; - case 4: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, add_attrs())); - } else { - goto handle_unusual; - } - break; + // repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_attrs())); + } else { + goto handle_unusual; } + break; + } - // optional bool is_target = 5 [default = false]; - case 5: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { - set_has_is_target(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &is_target_))); - } else { - goto handle_unusual; - } - break; + // optional bool is_target = 5 [default = false]; + case 5: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { + set_has_is_target(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &is_target_))); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -1921,7 +1916,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -2023,11 +2018,11 @@ size_t OpDesc::ByteSizeLong() const { } void OpDesc::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } 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())) return false; if (!::google::protobuf::internal::AllAreInitialized(this->outputs())) @@ -2070,11 +2067,12 @@ bool OpDesc::IsInitialized() const { return true; } -void OpDesc::Swap(OpDesc* other) { - if (other == this) return; +void OpDesc::Swap(OpDesc *other) { + if (other == this) + return; InternalSwap(other); } -void OpDesc::InternalSwap(OpDesc* other) { +void OpDesc::InternalSwap(OpDesc *other) { using std::swap; inputs_.InternalSwap(&other->inputs_); outputs_.InternalSwap(&other->outputs_); @@ -2102,50 +2100,50 @@ void OpDesc::clear_type() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return type_.GetNoArena(); } -void OpDesc::set_type(const ::std::string& value) { +void OpDesc::set_type(const ::std::string &value) { set_has_type(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.type) } #if LANG_CXX11 -void OpDesc::set_type(::std::string&& value) { +void OpDesc::set_type(::std::string &&value) { set_has_type(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.type) } #endif -void OpDesc::set_type(const char* value) { +void OpDesc::set_type(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_type(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.type) return type_.MutableNoArena( &::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) clear_has_type(); return type_.ReleaseNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void OpDesc::set_allocated_type(::std::string* type) { +void OpDesc::set_allocated_type(::std::string *type) { if (type != NULL) { set_has_type(); } else { @@ -2159,28 +2157,28 @@ void OpDesc::set_allocated_type(::std::string* type) { // repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1; int OpDesc::inputs_size() const { return inputs_.size(); } void OpDesc::clear_inputs() { inputs_.Clear(); } -const ::paddle_mobile::framework::proto::OpDesc_Var& OpDesc::inputs( - int index) const { +const ::paddle_mobile::framework::proto::OpDesc_Var & +OpDesc::inputs(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.inputs) return inputs_.Get(index); } -::paddle_mobile::framework::proto::OpDesc_Var* OpDesc::mutable_inputs( - int index) { +::paddle_mobile::framework::proto::OpDesc_Var * +OpDesc::mutable_inputs(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.inputs) 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) return inputs_.Add(); } ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Var>* + ::paddle_mobile::framework::proto::OpDesc_Var> * OpDesc::mutable_inputs() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.inputs) return &inputs_; } const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Var>& + ::paddle_mobile::framework::proto::OpDesc_Var> & OpDesc::inputs() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.inputs) return inputs_; @@ -2189,28 +2187,28 @@ OpDesc::inputs() const { // repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2; int OpDesc::outputs_size() const { return outputs_.size(); } void OpDesc::clear_outputs() { outputs_.Clear(); } -const ::paddle_mobile::framework::proto::OpDesc_Var& OpDesc::outputs( - int index) const { +const ::paddle_mobile::framework::proto::OpDesc_Var & +OpDesc::outputs(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.outputs) return outputs_.Get(index); } -::paddle_mobile::framework::proto::OpDesc_Var* OpDesc::mutable_outputs( - int index) { +::paddle_mobile::framework::proto::OpDesc_Var * +OpDesc::mutable_outputs(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.outputs) 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) return outputs_.Add(); } ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Var>* + ::paddle_mobile::framework::proto::OpDesc_Var> * OpDesc::mutable_outputs() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.outputs) return &outputs_; } const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Var>& + ::paddle_mobile::framework::proto::OpDesc_Var> & OpDesc::outputs() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.outputs) return outputs_; @@ -2219,28 +2217,28 @@ OpDesc::outputs() const { // repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4; int OpDesc::attrs_size() const { return attrs_.size(); } void OpDesc::clear_attrs() { attrs_.Clear(); } -const ::paddle_mobile::framework::proto::OpDesc_Attr& OpDesc::attrs( - int index) const { +const ::paddle_mobile::framework::proto::OpDesc_Attr & +OpDesc::attrs(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.attrs) return attrs_.Get(index); } -::paddle_mobile::framework::proto::OpDesc_Attr* OpDesc::mutable_attrs( - int index) { +::paddle_mobile::framework::proto::OpDesc_Attr * +OpDesc::mutable_attrs(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.attrs) 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) return attrs_.Add(); } ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Attr>* + ::paddle_mobile::framework::proto::OpDesc_Attr> * OpDesc::mutable_attrs() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.attrs) return &attrs_; } const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Attr>& + ::paddle_mobile::framework::proto::OpDesc_Attr> & OpDesc::attrs() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.attrs) return attrs_; @@ -2266,7 +2264,7 @@ void OpDesc::set_is_target(bool value) { // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.is_target) } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== @@ -2276,7 +2274,7 @@ const int OpProto_Var::kCommentFieldNumber; const int OpProto_Var::kDuplicableFieldNumber; const int OpProto_Var::kIntermediateFieldNumber; const int OpProto_Var::kDispensableFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 OpProto_Var::OpProto_Var() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -2286,11 +2284,9 @@ OpProto_Var::OpProto_Var() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto.Var) } -OpProto_Var::OpProto_Var(const OpProto_Var& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0) { +OpProto_Var::OpProto_Var(const OpProto_Var &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); name_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -2307,8 +2303,8 @@ OpProto_Var::OpProto_Var(const OpProto_Var& from) from.comment_); } ::memcpy(&duplicable_, &from.duplicable_, - static_cast(reinterpret_cast(&dispensable_) - - reinterpret_cast(&duplicable_)) + + static_cast(reinterpret_cast(&dispensable_) - + reinterpret_cast(&duplicable_)) + sizeof(dispensable_)); // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.OpProto.Var) } @@ -2320,8 +2316,8 @@ void OpProto_Var::SharedCtor() { comment_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&duplicable_, 0, - static_cast(reinterpret_cast(&dispensable_) - - reinterpret_cast(&duplicable_)) + + static_cast(reinterpret_cast(&dispensable_) - + reinterpret_cast(&duplicable_)) + sizeof(dispensable_)); } @@ -2342,13 +2338,13 @@ void OpProto_Var::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const OpProto_Var& OpProto_Var::default_instance() { +const OpProto_Var &OpProto_Var::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -OpProto_Var* OpProto_Var::New(::google::protobuf::Arena* arena) const { - OpProto_Var* n = new OpProto_Var; +OpProto_Var *OpProto_Var::New(::google::protobuf::Arena *arena) const { + OpProto_Var *n = new OpProto_Var; if (arena != NULL) { arena->Own(n); } @@ -2376,8 +2372,8 @@ void OpProto_Var::Clear() { } if (cached_has_bits & 28u) { ::memset(&duplicable_, 0, - static_cast(reinterpret_cast(&dispensable_) - - reinterpret_cast(&duplicable_)) + + static_cast(reinterpret_cast(&dispensable_) - + reinterpret_cast(&duplicable_)) + sizeof(dispensable_)); } _has_bits_.Clear(); @@ -2385,9 +2381,10 @@ void OpProto_Var::Clear() { } bool OpProto_Var::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -2401,84 +2398,85 @@ bool OpProto_Var::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - } else { - goto handle_unusual; - } - break; + // required string name = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + } else { + goto handle_unusual; } + break; + } - // required string comment = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_comment())); - } else { - goto handle_unusual; - } - break; + // required string comment = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_comment())); + } else { + goto handle_unusual; } + break; + } - // optional bool duplicable = 3 [default = false]; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { - set_has_duplicable(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &duplicable_))); - } else { - goto handle_unusual; - } - break; + // optional bool duplicable = 3 [default = false]; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { + set_has_duplicable(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &duplicable_))); + } else { + goto handle_unusual; } + break; + } - // optional bool intermediate = 4 [default = false]; - case 4: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { - set_has_intermediate(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &intermediate_))); - } else { - goto handle_unusual; - } - break; + // optional bool intermediate = 4 [default = false]; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { + set_has_intermediate(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &intermediate_))); + } else { + goto handle_unusual; } + break; + } - // optional bool dispensable = 5 [default = false]; - case 5: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { - set_has_dispensable(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &dispensable_))); - } else { - goto handle_unusual; - } - break; + // optional bool dispensable = 5 [default = false]; + case 5: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { + set_has_dispensable(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &dispensable_))); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -2491,7 +2489,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -2558,7 +2556,7 @@ size_t OpProto_Var::ByteSizeLong() const { total_size += _internal_metadata_.unknown_fields().size(); if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == - 0) { // All required fields are present. + 0) { // All required fields are present. // required string name = 1; total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); @@ -2594,11 +2592,11 @@ size_t OpProto_Var::ByteSizeLong() const { } void OpProto_Var::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } bool OpProto_Var::IsInitialized() const { - if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + if ((_has_bits_[0] & 0x00000003) != 0x00000003) + return false; return true; } -void OpProto_Var::Swap(OpProto_Var* other) { - if (other == this) return; +void OpProto_Var::Swap(OpProto_Var *other) { + if (other == this) + return; InternalSwap(other); } -void OpProto_Var::InternalSwap(OpProto_Var* other) { +void OpProto_Var::InternalSwap(OpProto_Var *other) { using std::swap; name_.Swap(&other->name_); comment_.Swap(&other->comment_); @@ -2678,50 +2679,50 @@ void OpProto_Var::clear_name() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return name_.GetNoArena(); } -void OpProto_Var::set_name(const ::std::string& value) { +void OpProto_Var::set_name(const ::std::string &value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Var.name) } #if LANG_CXX11 -void OpProto_Var::set_name(::std::string&& value) { +void OpProto_Var::set_name(::std::string &&value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Var.name) } #endif -void OpProto_Var::set_name(const char* value) { +void OpProto_Var::set_name(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Var.name) return name_.MutableNoArena( &::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) clear_has_name(); return name_.ReleaseNoArena( &::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) { set_has_name(); } else { @@ -2743,18 +2744,18 @@ void OpProto_Var::clear_comment() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return comment_.GetNoArena(); } -void OpProto_Var::set_comment(const ::std::string& value) { +void OpProto_Var::set_comment(const ::std::string &value) { set_has_comment(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Var.comment) } #if LANG_CXX11 -void OpProto_Var::set_comment(::std::string&& value) { +void OpProto_Var::set_comment(::std::string &&value) { set_has_comment(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -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) } #endif -void OpProto_Var::set_comment(const char* value) { +void OpProto_Var::set_comment(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_comment(); comment_.SetNoArena( @@ -2770,26 +2771,26 @@ void OpProto_Var::set_comment(const char* value) { ::std::string(value)); // @@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(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Var.comment) return comment_.MutableNoArena( &::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) clear_has_comment(); return comment_.ReleaseNoArena( &::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) { set_has_comment(); } else { @@ -2860,7 +2861,7 @@ void OpProto_Var::set_dispensable(bool value) { // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Var.dispensable) } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== @@ -2869,7 +2870,7 @@ const int OpProto_Attr::kNameFieldNumber; const int OpProto_Attr::kTypeFieldNumber; const int OpProto_Attr::kCommentFieldNumber; const int OpProto_Attr::kGeneratedFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 OpProto_Attr::OpProto_Attr() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -2879,11 +2880,9 @@ OpProto_Attr::OpProto_Attr() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto.Attr) } -OpProto_Attr::OpProto_Attr(const OpProto_Attr& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0) { +OpProto_Attr::OpProto_Attr(const OpProto_Attr &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); name_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -2900,8 +2899,8 @@ OpProto_Attr::OpProto_Attr(const OpProto_Attr& from) from.comment_); } ::memcpy(&type_, &from.type_, - static_cast(reinterpret_cast(&generated_) - - reinterpret_cast(&type_)) + + static_cast(reinterpret_cast(&generated_) - + reinterpret_cast(&type_)) + sizeof(generated_)); // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.OpProto.Attr) } @@ -2912,9 +2911,10 @@ void OpProto_Attr::SharedCtor() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); comment_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&type_, 0, static_cast(reinterpret_cast(&generated_) - - reinterpret_cast(&type_)) + - sizeof(generated_)); + ::memset(&type_, 0, + static_cast(reinterpret_cast(&generated_) - + reinterpret_cast(&type_)) + + sizeof(generated_)); } OpProto_Attr::~OpProto_Attr() { @@ -2934,13 +2934,13 @@ void OpProto_Attr::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const OpProto_Attr& OpProto_Attr::default_instance() { +const OpProto_Attr &OpProto_Attr::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -OpProto_Attr* OpProto_Attr::New(::google::protobuf::Arena* arena) const { - OpProto_Attr* n = new OpProto_Attr; +OpProto_Attr *OpProto_Attr::New(::google::protobuf::Arena *arena) const { + OpProto_Attr *n = new OpProto_Attr; if (arena != NULL) { arena->Own(n); } @@ -2968,8 +2968,8 @@ void OpProto_Attr::Clear() { } if (cached_has_bits & 12u) { ::memset(&type_, 0, - static_cast(reinterpret_cast(&generated_) - - reinterpret_cast(&type_)) + + static_cast(reinterpret_cast(&generated_) - + reinterpret_cast(&type_)) + sizeof(generated_)); } _has_bits_.Clear(); @@ -2977,9 +2977,10 @@ void OpProto_Attr::Clear() { } bool OpProto_Attr::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -2993,78 +2994,79 @@ bool OpProto_Attr::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - } else { - goto handle_unusual; - } - break; + // required string name = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + } else { + goto handle_unusual; } + break; + } - // required .paddle_mobile.framework.proto.AttrType type = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::paddle_mobile::framework::proto::AttrType_IsValid(value)) { - set_type(static_cast<::paddle_mobile::framework::proto::AttrType>( - value)); - } else { - unknown_fields_stream.WriteVarint32(16u); - unknown_fields_stream.WriteVarint32( - static_cast<::google::protobuf::uint32>(value)); - } + // required .paddle_mobile.framework.proto.AttrType type = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::paddle_mobile::framework::proto::AttrType_IsValid(value)) { + set_type( + static_cast<::paddle_mobile::framework::proto::AttrType>(value)); } else { - goto handle_unusual; + unknown_fields_stream.WriteVarint32(16u); + unknown_fields_stream.WriteVarint32( + static_cast<::google::protobuf::uint32>(value)); } - break; + } else { + goto handle_unusual; } + break; + } - // required string comment = 3; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_comment())); - } else { - goto handle_unusual; - } - break; + // required string comment = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_comment())); + } else { + goto handle_unusual; } + break; + } - // optional bool generated = 4 [default = false]; - case 4: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { - set_has_generated(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &generated_))); - } else { - goto handle_unusual; - } - break; + // optional bool generated = 4 [default = false]; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { + set_has_generated(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &generated_))); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -3077,7 +3079,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -3144,7 +3146,7 @@ size_t OpProto_Attr::ByteSizeLong() const { total_size += _internal_metadata_.unknown_fields().size(); if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == - 0) { // All required fields are present. + 0) { // All required fields are present. // required string name = 1; total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); @@ -3173,11 +3175,11 @@ size_t OpProto_Attr::ByteSizeLong() const { } void OpProto_Attr::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } bool OpProto_Attr::IsInitialized() const { - if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; + if ((_has_bits_[0] & 0x00000007) != 0x00000007) + return false; return true; } -void OpProto_Attr::Swap(OpProto_Attr* other) { - if (other == this) return; +void OpProto_Attr::Swap(OpProto_Attr *other) { + if (other == this) + return; InternalSwap(other); } -void OpProto_Attr::InternalSwap(OpProto_Attr* other) { +void OpProto_Attr::InternalSwap(OpProto_Attr *other) { using std::swap; name_.Swap(&other->name_); comment_.Swap(&other->comment_); @@ -3253,50 +3258,50 @@ void OpProto_Attr::clear_name() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return name_.GetNoArena(); } -void OpProto_Attr::set_name(const ::std::string& value) { +void OpProto_Attr::set_name(const ::std::string &value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Attr.name) } #if LANG_CXX11 -void OpProto_Attr::set_name(::std::string&& value) { +void OpProto_Attr::set_name(::std::string &&value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Attr.name) } #endif -void OpProto_Attr::set_name(const char* value) { +void OpProto_Attr::set_name(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Attr.name) return name_.MutableNoArena( &::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) clear_has_name(); return name_.ReleaseNoArena( &::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) { set_has_name(); } else { @@ -3339,18 +3344,18 @@ void OpProto_Attr::clear_comment() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return comment_.GetNoArena(); } -void OpProto_Attr::set_comment(const ::std::string& value) { +void OpProto_Attr::set_comment(const ::std::string &value) { set_has_comment(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Attr.comment) } #if LANG_CXX11 -void OpProto_Attr::set_comment(::std::string&& value) { +void OpProto_Attr::set_comment(::std::string &&value) { set_has_comment(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -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) } #endif -void OpProto_Attr::set_comment(const char* value) { +void OpProto_Attr::set_comment(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_comment(); comment_.SetNoArena( @@ -3366,26 +3371,26 @@ void OpProto_Attr::set_comment(const char* value) { ::std::string(value)); // @@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(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Attr.comment) return comment_.MutableNoArena( &::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) clear_has_comment(); return comment_.ReleaseNoArena( &::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) { set_has_comment(); } else { @@ -3416,7 +3421,7 @@ void OpProto_Attr::set_generated(bool value) { // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Attr.generated) } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== @@ -3426,7 +3431,7 @@ const int OpProto::kInputsFieldNumber; const int OpProto::kOutputsFieldNumber; const int OpProto::kAttrsFieldNumber; const int OpProto::kCommentFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 OpProto::OpProto() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -3436,14 +3441,10 @@ OpProto::OpProto() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto) } -OpProto::OpProto(const OpProto& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0), - inputs_(from.inputs_), - outputs_(from.outputs_), - attrs_(from.attrs_) { +OpProto::OpProto(const OpProto &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0), inputs_(from.inputs_), + outputs_(from.outputs_), attrs_(from.attrs_) { _internal_metadata_.MergeFrom(from._internal_metadata_); type_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -3487,13 +3488,13 @@ void OpProto::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const OpProto& OpProto::default_instance() { +const OpProto &OpProto::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -OpProto* OpProto::New(::google::protobuf::Arena* arena) const { - OpProto* n = new OpProto; +OpProto *OpProto::New(::google::protobuf::Arena *arena) const { + OpProto *n = new OpProto; if (arena != NULL) { arena->Own(n); } @@ -3527,9 +3528,10 @@ void OpProto::Clear() { } bool OpProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -3543,78 +3545,79 @@ bool OpProto::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string type = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_type())); - } else { - goto handle_unusual; - } - break; + // required string type = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_type())); + } else { + goto handle_unusual; } + break; + } - // repeated .paddle_mobile.framework.proto.OpProto.Var inputs = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, add_inputs())); - } else { - goto handle_unusual; - } - break; + // repeated .paddle_mobile.framework.proto.OpProto.Var inputs = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_inputs())); + } else { + goto handle_unusual; } + break; + } - // repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, add_outputs())); - } else { - goto handle_unusual; - } - break; + // repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_outputs())); + } else { + goto handle_unusual; } + break; + } - // repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4; - case 4: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, add_attrs())); - } else { - goto handle_unusual; - } - break; + // repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_attrs())); + } else { + goto handle_unusual; } + break; + } - // required string comment = 5; - case 5: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_comment())); - } else { - goto handle_unusual; - } - break; + // required string comment = 5; + case 5: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_comment())); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -3627,7 +3630,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -3697,7 +3700,7 @@ size_t OpProto::ByteSizeLong() const { total_size += _internal_metadata_.unknown_fields().size(); if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == - 0) { // All required fields are present. + 0) { // All required fields are present. // required string type = 1; total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->type()); @@ -3750,11 +3753,11 @@ size_t OpProto::ByteSizeLong() const { } void OpProto::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } 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())) return false; if (!::google::protobuf::internal::AllAreInitialized(this->outputs())) @@ -3799,11 +3804,12 @@ bool OpProto::IsInitialized() const { return true; } -void OpProto::Swap(OpProto* other) { - if (other == this) return; +void OpProto::Swap(OpProto *other) { + if (other == this) + return; InternalSwap(other); } -void OpProto::InternalSwap(OpProto* other) { +void OpProto::InternalSwap(OpProto *other) { using std::swap; inputs_.InternalSwap(&other->inputs_); outputs_.InternalSwap(&other->outputs_); @@ -3831,50 +3837,50 @@ void OpProto::clear_type() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return type_.GetNoArena(); } -void OpProto::set_type(const ::std::string& value) { +void OpProto::set_type(const ::std::string &value) { set_has_type(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.type) } #if LANG_CXX11 -void OpProto::set_type(::std::string&& value) { +void OpProto::set_type(::std::string &&value) { set_has_type(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.type) } #endif -void OpProto::set_type(const char* value) { +void OpProto::set_type(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_type(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.type) return type_.MutableNoArena( &::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) clear_has_type(); return type_.ReleaseNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void OpProto::set_allocated_type(::std::string* type) { +void OpProto::set_allocated_type(::std::string *type) { if (type != NULL) { set_has_type(); } else { @@ -3888,28 +3894,28 @@ void OpProto::set_allocated_type(::std::string* type) { // repeated .paddle_mobile.framework.proto.OpProto.Var inputs = 2; int OpProto::inputs_size() const { return inputs_.size(); } void OpProto::clear_inputs() { inputs_.Clear(); } -const ::paddle_mobile::framework::proto::OpProto_Var& OpProto::inputs( - int index) const { +const ::paddle_mobile::framework::proto::OpProto_Var & +OpProto::inputs(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.inputs) return inputs_.Get(index); } -::paddle_mobile::framework::proto::OpProto_Var* OpProto::mutable_inputs( - int index) { +::paddle_mobile::framework::proto::OpProto_Var * +OpProto::mutable_inputs(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.inputs) 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) return inputs_.Add(); } ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Var>* + ::paddle_mobile::framework::proto::OpProto_Var> * OpProto::mutable_inputs() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.inputs) return &inputs_; } const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Var>& + ::paddle_mobile::framework::proto::OpProto_Var> & OpProto::inputs() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.inputs) return inputs_; @@ -3918,28 +3924,28 @@ OpProto::inputs() const { // repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3; int OpProto::outputs_size() const { return outputs_.size(); } void OpProto::clear_outputs() { outputs_.Clear(); } -const ::paddle_mobile::framework::proto::OpProto_Var& OpProto::outputs( - int index) const { +const ::paddle_mobile::framework::proto::OpProto_Var & +OpProto::outputs(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.outputs) return outputs_.Get(index); } -::paddle_mobile::framework::proto::OpProto_Var* OpProto::mutable_outputs( - int index) { +::paddle_mobile::framework::proto::OpProto_Var * +OpProto::mutable_outputs(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.outputs) 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) return outputs_.Add(); } ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Var>* + ::paddle_mobile::framework::proto::OpProto_Var> * OpProto::mutable_outputs() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.outputs) return &outputs_; } const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Var>& + ::paddle_mobile::framework::proto::OpProto_Var> & OpProto::outputs() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.outputs) return outputs_; @@ -3948,28 +3954,28 @@ OpProto::outputs() const { // repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4; int OpProto::attrs_size() const { return attrs_.size(); } void OpProto::clear_attrs() { attrs_.Clear(); } -const ::paddle_mobile::framework::proto::OpProto_Attr& OpProto::attrs( - int index) const { +const ::paddle_mobile::framework::proto::OpProto_Attr & +OpProto::attrs(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.attrs) return attrs_.Get(index); } -::paddle_mobile::framework::proto::OpProto_Attr* OpProto::mutable_attrs( - int index) { +::paddle_mobile::framework::proto::OpProto_Attr * +OpProto::mutable_attrs(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.attrs) 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) return attrs_.Add(); } ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Attr>* + ::paddle_mobile::framework::proto::OpProto_Attr> * OpProto::mutable_attrs() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.attrs) return &attrs_; } const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Attr>& + ::paddle_mobile::framework::proto::OpProto_Attr> & OpProto::attrs() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.attrs) return attrs_; @@ -3984,18 +3990,18 @@ void OpProto::clear_comment() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return comment_.GetNoArena(); } -void OpProto::set_comment(const ::std::string& value) { +void OpProto::set_comment(const ::std::string &value) { set_has_comment(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.comment) } #if LANG_CXX11 -void OpProto::set_comment(::std::string&& value) { +void OpProto::set_comment(::std::string &&value) { set_has_comment(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -4003,7 +4009,7 @@ void OpProto::set_comment(::std::string&& value) { // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.comment) } #endif -void OpProto::set_comment(const char* value) { +void OpProto::set_comment(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_comment(); comment_.SetNoArena( @@ -4011,26 +4017,26 @@ void OpProto::set_comment(const char* value) { ::std::string(value)); // @@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(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.comment) return comment_.MutableNoArena( &::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) clear_has_comment(); return comment_.ReleaseNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void OpProto::set_allocated_comment(::std::string* comment) { +void OpProto::set_allocated_comment(::std::string *comment) { if (comment != NULL) { set_has_comment(); } else { @@ -4041,14 +4047,14 @@ void OpProto::set_allocated_comment(::std::string* comment) { // @@protoc_insertion_point(field_set_allocated:paddle_mobile.framework.proto.OpProto.comment) } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int VarType_TensorDesc::kDataTypeFieldNumber; const int VarType_TensorDesc::kDimsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 VarType_TensorDesc::VarType_TensorDesc() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -4058,12 +4064,9 @@ VarType_TensorDesc::VarType_TensorDesc() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.TensorDesc) } -VarType_TensorDesc::VarType_TensorDesc(const VarType_TensorDesc& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0), - dims_(from.dims_) { +VarType_TensorDesc::VarType_TensorDesc(const VarType_TensorDesc &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0), dims_(from.dims_) { _internal_metadata_.MergeFrom(from._internal_metadata_); data_type_ = from.data_type_; // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.TensorDesc) @@ -4086,14 +4089,14 @@ void VarType_TensorDesc::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const VarType_TensorDesc& VarType_TensorDesc::default_instance() { +const VarType_TensorDesc &VarType_TensorDesc::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -VarType_TensorDesc* VarType_TensorDesc::New( - ::google::protobuf::Arena* arena) const { - VarType_TensorDesc* n = new VarType_TensorDesc; +VarType_TensorDesc * +VarType_TensorDesc::New(::google::protobuf::Arena *arena) const { + VarType_TensorDesc *n = new VarType_TensorDesc; if (arena != NULL) { arena->Own(n); } @@ -4113,9 +4116,10 @@ void VarType_TensorDesc::Clear() { } bool VarType_TensorDesc::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -4129,66 +4133,64 @@ bool VarType_TensorDesc::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required .paddle_mobile.framework.proto.VarType.Type data_type = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::paddle_mobile::framework::proto::VarType_Type_IsValid(value)) { - set_data_type( - static_cast<::paddle_mobile::framework::proto::VarType_Type>( - value)); - } else { - unknown_fields_stream.WriteVarint32(8u); - unknown_fields_stream.WriteVarint32( - static_cast<::google::protobuf::uint32>(value)); - } + // required .paddle_mobile.framework.proto.VarType.Type data_type = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::paddle_mobile::framework::proto::VarType_Type_IsValid(value)) { + set_data_type( + static_cast<::paddle_mobile::framework::proto::VarType_Type>( + value)); } else { - goto handle_unusual; + unknown_fields_stream.WriteVarint32(8u); + unknown_fields_stream.WriteVarint32( + static_cast<::google::protobuf::uint32>(value)); } - break; + } else { + goto handle_unusual; } + break; + } - // repeated int64 dims = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { - DO_(( - ::google::protobuf::internal::WireFormatLite:: - ReadRepeatedPrimitive< - ::google::protobuf::int64, - ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( - 1, 16u, input, this->mutable_dims()))); - } else if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>( - 18u /* 18 & 0xFF */)) { - DO_(( - ::google::protobuf::internal::WireFormatLite:: - ReadPackedPrimitiveNoInline< - ::google::protobuf::int64, - ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( - input, this->mutable_dims()))); - } else { - goto handle_unusual; - } - break; + // repeated int64 dims = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + DO_(( + ::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::int64, + ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + 1, 16u, input, this->mutable_dims()))); + } else if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite:: + ReadPackedPrimitiveNoInline< + ::google::protobuf::int64, + ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, this->mutable_dims()))); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -4201,7 +4203,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -4253,11 +4255,11 @@ size_t VarType_TensorDesc::ByteSizeLong() const { } void VarType_TensorDesc::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } bool VarType_TensorDesc::IsInitialized() const { - if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + if ((_has_bits_[0] & 0x00000001) != 0x00000001) + return false; return true; } -void VarType_TensorDesc::Swap(VarType_TensorDesc* other) { - if (other == this) return; +void VarType_TensorDesc::Swap(VarType_TensorDesc *other) { + if (other == this) + return; InternalSwap(other); } -void VarType_TensorDesc::InternalSwap(VarType_TensorDesc* other) { +void VarType_TensorDesc::InternalSwap(VarType_TensorDesc *other) { using std::swap; dims_.InternalSwap(&other->dims_); swap(data_type_, other->data_type_); @@ -4314,8 +4319,8 @@ void VarType_TensorDesc::clear_data_type() { data_type_ = 0; clear_has_data_type(); } -::paddle_mobile::framework::proto::VarType_Type VarType_TensorDesc::data_type() - const { +::paddle_mobile::framework::proto::VarType_Type +VarType_TensorDesc::data_type() const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.TensorDesc.data_type) return static_cast<::paddle_mobile::framework::proto::VarType_Type>( data_type_); @@ -4343,25 +4348,25 @@ void VarType_TensorDesc::add_dims(::google::protobuf::int64 value) { dims_.Add(value); // @@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 { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims) return dims_; } -::google::protobuf::RepeatedField<::google::protobuf::int64>* +::google::protobuf::RepeatedField<::google::protobuf::int64> * VarType_TensorDesc::mutable_dims() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims) return &dims_; } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int VarType_LoDTensorDesc::kTensorFieldNumber; const int VarType_LoDTensorDesc::kLodLevelFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 VarType_LoDTensorDesc::VarType_LoDTensorDesc() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -4371,11 +4376,9 @@ VarType_LoDTensorDesc::VarType_LoDTensorDesc() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.LoDTensorDesc) } -VarType_LoDTensorDesc::VarType_LoDTensorDesc(const VarType_LoDTensorDesc& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0) { +VarType_LoDTensorDesc::VarType_LoDTensorDesc(const VarType_LoDTensorDesc &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_tensor()) { tensor_ = new ::paddle_mobile::framework::proto::VarType_TensorDesc( @@ -4390,8 +4393,8 @@ VarType_LoDTensorDesc::VarType_LoDTensorDesc(const VarType_LoDTensorDesc& from) void VarType_LoDTensorDesc::SharedCtor() { _cached_size_ = 0; ::memset(&tensor_, 0, - static_cast(reinterpret_cast(&lod_level_) - - reinterpret_cast(&tensor_)) + + static_cast(reinterpret_cast(&lod_level_) - + reinterpret_cast(&tensor_)) + sizeof(lod_level_)); } @@ -4401,7 +4404,8 @@ VarType_LoDTensorDesc::~VarType_LoDTensorDesc() { } 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 { @@ -4409,14 +4413,14 @@ void VarType_LoDTensorDesc::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const VarType_LoDTensorDesc& VarType_LoDTensorDesc::default_instance() { +const VarType_LoDTensorDesc &VarType_LoDTensorDesc::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -VarType_LoDTensorDesc* VarType_LoDTensorDesc::New( - ::google::protobuf::Arena* arena) const { - VarType_LoDTensorDesc* n = new VarType_LoDTensorDesc; +VarType_LoDTensorDesc * +VarType_LoDTensorDesc::New(::google::protobuf::Arena *arena) const { + VarType_LoDTensorDesc *n = new VarType_LoDTensorDesc; if (arena != NULL) { arena->Own(n); } @@ -4439,9 +4443,10 @@ void VarType_LoDTensorDesc::Clear() { } bool VarType_LoDTensorDesc::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -4455,45 +4460,46 @@ bool VarType_LoDTensorDesc::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required .paddle_mobile.framework.proto.VarType.TensorDesc tensor = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, mutable_tensor())); - } else { - goto handle_unusual; - } - break; + // required .paddle_mobile.framework.proto.VarType.TensorDesc tensor = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_tensor())); + } else { + goto handle_unusual; } + break; + } - // optional int32 lod_level = 2 [default = 0]; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { - set_has_lod_level(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &lod_level_))); - } else { - goto handle_unusual; - } - break; + // optional int32 lod_level = 2 [default = 0]; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + set_has_lod_level(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &lod_level_))); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -4506,7 +4512,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -4556,12 +4562,12 @@ size_t VarType_LoDTensorDesc::ByteSizeLong() const { } void VarType_LoDTensorDesc::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { + const ::google::protobuf::MessageLite &from) { MergeFrom( - *::google::protobuf::down_cast(&from)); + *::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } 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 (!this->tensor_->IsInitialized()) return false; + if (!this->tensor_->IsInitialized()) + return false; } return true; } -void VarType_LoDTensorDesc::Swap(VarType_LoDTensorDesc* other) { - if (other == this) return; +void VarType_LoDTensorDesc::Swap(VarType_LoDTensorDesc *other) { + if (other == this) + return; InternalSwap(other); } -void VarType_LoDTensorDesc::InternalSwap(VarType_LoDTensorDesc* other) { +void VarType_LoDTensorDesc::InternalSwap(VarType_LoDTensorDesc *other) { using std::swap; swap(tensor_, other->tensor_); swap(lod_level_, other->lod_level_); @@ -4630,16 +4640,18 @@ void VarType_LoDTensorDesc::clear_tensor() { tensor_->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear(); clear_has_tensor(); } -const ::paddle_mobile::framework::proto::VarType_TensorDesc& +const ::paddle_mobile::framework::proto::VarType_TensorDesc & 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) - return p != NULL ? *p : *reinterpret_cast( - &::paddle_mobile::framework::proto:: - _VarType_TensorDesc_default_instance_); + return p != NULL + ? *p + : *reinterpret_cast< + const ::paddle_mobile::framework::proto::VarType_TensorDesc + *>(&::paddle_mobile::framework::proto:: + _VarType_TensorDesc_default_instance_); } -::paddle_mobile::framework::proto::VarType_TensorDesc* +::paddle_mobile::framework::proto::VarType_TensorDesc * VarType_LoDTensorDesc::mutable_tensor() { set_has_tensor(); if (tensor_ == NULL) { @@ -4648,16 +4660,16 @@ VarType_LoDTensorDesc::mutable_tensor() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor) return tensor_; } -::paddle_mobile::framework::proto::VarType_TensorDesc* +::paddle_mobile::framework::proto::VarType_TensorDesc * VarType_LoDTensorDesc::release_tensor() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor) clear_has_tensor(); - ::paddle_mobile::framework::proto::VarType_TensorDesc* temp = tensor_; + ::paddle_mobile::framework::proto::VarType_TensorDesc *temp = tensor_; tensor_ = NULL; return temp; } void VarType_LoDTensorDesc::set_allocated_tensor( - ::paddle_mobile::framework::proto::VarType_TensorDesc* tensor) { + ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor) { delete tensor_; tensor_ = tensor; if (tensor) { @@ -4692,14 +4704,14 @@ void VarType_LoDTensorDesc::set_lod_level(::google::protobuf::int32 value) { // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarType.LoDTensorDesc.lod_level) } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int VarType_LoDTensorArrayDesc::kTensorFieldNumber; const int VarType_LoDTensorArrayDesc::kLodLevelFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 VarType_LoDTensorArrayDesc::VarType_LoDTensorArrayDesc() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -4710,11 +4722,9 @@ VarType_LoDTensorArrayDesc::VarType_LoDTensorArrayDesc() // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc) } VarType_LoDTensorArrayDesc::VarType_LoDTensorArrayDesc( - const VarType_LoDTensorArrayDesc& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0) { + const VarType_LoDTensorArrayDesc &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_tensor()) { tensor_ = new ::paddle_mobile::framework::proto::VarType_TensorDesc( @@ -4729,8 +4739,8 @@ VarType_LoDTensorArrayDesc::VarType_LoDTensorArrayDesc( void VarType_LoDTensorArrayDesc::SharedCtor() { _cached_size_ = 0; ::memset(&tensor_, 0, - static_cast(reinterpret_cast(&lod_level_) - - reinterpret_cast(&tensor_)) + + static_cast(reinterpret_cast(&lod_level_) - + reinterpret_cast(&tensor_)) + sizeof(lod_level_)); } @@ -4740,7 +4750,8 @@ VarType_LoDTensorArrayDesc::~VarType_LoDTensorArrayDesc() { } 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 { @@ -4748,15 +4759,15 @@ void VarType_LoDTensorArrayDesc::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const VarType_LoDTensorArrayDesc& +const VarType_LoDTensorArrayDesc & VarType_LoDTensorArrayDesc::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -VarType_LoDTensorArrayDesc* VarType_LoDTensorArrayDesc::New( - ::google::protobuf::Arena* arena) const { - VarType_LoDTensorArrayDesc* n = new VarType_LoDTensorArrayDesc; +VarType_LoDTensorArrayDesc * +VarType_LoDTensorArrayDesc::New(::google::protobuf::Arena *arena) const { + VarType_LoDTensorArrayDesc *n = new VarType_LoDTensorArrayDesc; if (arena != NULL) { arena->Own(n); } @@ -4779,9 +4790,10 @@ void VarType_LoDTensorArrayDesc::Clear() { } bool VarType_LoDTensorArrayDesc::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -4795,45 +4807,46 @@ bool VarType_LoDTensorArrayDesc::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required .paddle_mobile.framework.proto.VarType.TensorDesc tensor = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, mutable_tensor())); - } else { - goto handle_unusual; - } - break; + // required .paddle_mobile.framework.proto.VarType.TensorDesc tensor = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_tensor())); + } else { + goto handle_unusual; } + break; + } - // optional int32 lod_level = 2 [default = 0]; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { - set_has_lod_level(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &lod_level_))); - } else { - goto handle_unusual; - } - break; + // optional int32 lod_level = 2 [default = 0]; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + set_has_lod_level(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &lod_level_))); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -4846,7 +4859,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -4896,13 +4909,13 @@ size_t VarType_LoDTensorArrayDesc::ByteSizeLong() const { } void VarType_LoDTensorArrayDesc::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom( - *::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast( + &from)); } 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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -4924,27 +4937,31 @@ void VarType_LoDTensorArrayDesc::MergeFrom( } 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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } 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 (!this->tensor_->IsInitialized()) return false; + if (!this->tensor_->IsInitialized()) + return false; } return true; } -void VarType_LoDTensorArrayDesc::Swap(VarType_LoDTensorArrayDesc* other) { - if (other == this) return; +void VarType_LoDTensorArrayDesc::Swap(VarType_LoDTensorArrayDesc *other) { + if (other == this) + return; InternalSwap(other); } void VarType_LoDTensorArrayDesc::InternalSwap( - VarType_LoDTensorArrayDesc* other) { + VarType_LoDTensorArrayDesc *other) { using std::swap; swap(tensor_, other->tensor_); swap(lod_level_, other->lod_level_); @@ -4975,16 +4992,18 @@ void VarType_LoDTensorArrayDesc::clear_tensor() { tensor_->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear(); clear_has_tensor(); } -const ::paddle_mobile::framework::proto::VarType_TensorDesc& +const ::paddle_mobile::framework::proto::VarType_TensorDesc & 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) - return p != NULL ? *p : *reinterpret_cast( - &::paddle_mobile::framework::proto:: - _VarType_TensorDesc_default_instance_); + return p != NULL + ? *p + : *reinterpret_cast< + const ::paddle_mobile::framework::proto::VarType_TensorDesc + *>(&::paddle_mobile::framework::proto:: + _VarType_TensorDesc_default_instance_); } -::paddle_mobile::framework::proto::VarType_TensorDesc* +::paddle_mobile::framework::proto::VarType_TensorDesc * VarType_LoDTensorArrayDesc::mutable_tensor() { set_has_tensor(); if (tensor_ == NULL) { @@ -4993,16 +5012,16 @@ VarType_LoDTensorArrayDesc::mutable_tensor() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor) return tensor_; } -::paddle_mobile::framework::proto::VarType_TensorDesc* +::paddle_mobile::framework::proto::VarType_TensorDesc * VarType_LoDTensorArrayDesc::release_tensor() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor) clear_has_tensor(); - ::paddle_mobile::framework::proto::VarType_TensorDesc* temp = tensor_; + ::paddle_mobile::framework::proto::VarType_TensorDesc *temp = tensor_; tensor_ = NULL; return temp; } void VarType_LoDTensorArrayDesc::set_allocated_tensor( - ::paddle_mobile::framework::proto::VarType_TensorDesc* tensor) { + ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor) { delete tensor_; tensor_ = tensor; if (tensor) { @@ -5038,13 +5057,13 @@ void VarType_LoDTensorArrayDesc::set_lod_level( // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.lod_level) } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int VarType_ReaderDesc::kLodTensorFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 VarType_ReaderDesc::VarType_ReaderDesc() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -5054,11 +5073,9 @@ VarType_ReaderDesc::VarType_ReaderDesc() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.ReaderDesc) } -VarType_ReaderDesc::VarType_ReaderDesc(const VarType_ReaderDesc& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0), +VarType_ReaderDesc::VarType_ReaderDesc(const VarType_ReaderDesc &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0), lod_tensor_(from.lod_tensor_) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.ReaderDesc) @@ -5078,14 +5095,14 @@ void VarType_ReaderDesc::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const VarType_ReaderDesc& VarType_ReaderDesc::default_instance() { +const VarType_ReaderDesc &VarType_ReaderDesc::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -VarType_ReaderDesc* VarType_ReaderDesc::New( - ::google::protobuf::Arena* arena) const { - VarType_ReaderDesc* n = new VarType_ReaderDesc; +VarType_ReaderDesc * +VarType_ReaderDesc::New(::google::protobuf::Arena *arena) const { + VarType_ReaderDesc *n = new VarType_ReaderDesc; if (arena != NULL) { arena->Own(n); } @@ -5104,9 +5121,10 @@ void VarType_ReaderDesc::Clear() { } bool VarType_ReaderDesc::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -5120,31 +5138,32 @@ bool VarType_ReaderDesc::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .paddle_mobile.framework.proto.VarType.LoDTensorDesc - // lod_tensor = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, add_lod_tensor())); - } else { - goto handle_unusual; - } - break; + // repeated .paddle_mobile.framework.proto.VarType.LoDTensorDesc + // lod_tensor = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_lod_tensor())); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -5157,7 +5176,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -5203,11 +5222,11 @@ size_t VarType_ReaderDesc::ByteSizeLong() const { } void VarType_ReaderDesc::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -5217,9 +5236,10 @@ void VarType_ReaderDesc::MergeFrom(const VarType_ReaderDesc& from) { 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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } @@ -5230,11 +5250,12 @@ bool VarType_ReaderDesc::IsInitialized() const { return true; } -void VarType_ReaderDesc::Swap(VarType_ReaderDesc* other) { - if (other == this) return; +void VarType_ReaderDesc::Swap(VarType_ReaderDesc *other) { + if (other == this) + return; InternalSwap(other); } -void VarType_ReaderDesc::InternalSwap(VarType_ReaderDesc* other) { +void VarType_ReaderDesc::InternalSwap(VarType_ReaderDesc *other) { using std::swap; lod_tensor_.InternalSwap(&other->lod_tensor_); swap(_has_bits_[0], other->_has_bits_[0]); @@ -5252,42 +5273,42 @@ void VarType_ReaderDesc::InternalSwap(VarType_ReaderDesc* other) { // repeated .paddle_mobile.framework.proto.VarType.LoDTensorDesc lod_tensor = 1; int VarType_ReaderDesc::lod_tensor_size() const { return lod_tensor_.size(); } 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 { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) return lod_tensor_.Get(index); } -::paddle_mobile::framework::proto::VarType_LoDTensorDesc* +::paddle_mobile::framework::proto::VarType_LoDTensorDesc * VarType_ReaderDesc::mutable_lod_tensor(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) return lod_tensor_.Mutable(index); } -::paddle_mobile::framework::proto::VarType_LoDTensorDesc* +::paddle_mobile::framework::proto::VarType_LoDTensorDesc * VarType_ReaderDesc::add_lod_tensor() { // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) return lod_tensor_.Add(); } ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::VarType_LoDTensorDesc>* + ::paddle_mobile::framework::proto::VarType_LoDTensorDesc> * VarType_ReaderDesc::mutable_lod_tensor() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) return &lod_tensor_; } const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::VarType_LoDTensorDesc>& + ::paddle_mobile::framework::proto::VarType_LoDTensorDesc> & VarType_ReaderDesc::lod_tensor() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) return lod_tensor_; } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int VarType_ChannelDesc::kDataTypeFieldNumber; const int VarType_ChannelDesc::kCapacityFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 VarType_ChannelDesc::VarType_ChannelDesc() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -5297,15 +5318,13 @@ VarType_ChannelDesc::VarType_ChannelDesc() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.ChannelDesc) } -VarType_ChannelDesc::VarType_ChannelDesc(const VarType_ChannelDesc& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0) { +VarType_ChannelDesc::VarType_ChannelDesc(const VarType_ChannelDesc &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&capacity_, &from.capacity_, - static_cast(reinterpret_cast(&data_type_) - - reinterpret_cast(&capacity_)) + + static_cast(reinterpret_cast(&data_type_) - + reinterpret_cast(&capacity_)) + sizeof(data_type_)); // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.ChannelDesc) } @@ -5313,8 +5332,8 @@ VarType_ChannelDesc::VarType_ChannelDesc(const VarType_ChannelDesc& from) void VarType_ChannelDesc::SharedCtor() { _cached_size_ = 0; ::memset(&capacity_, 0, - static_cast(reinterpret_cast(&data_type_) - - reinterpret_cast(&capacity_)) + + static_cast(reinterpret_cast(&data_type_) - + reinterpret_cast(&capacity_)) + sizeof(data_type_)); } @@ -5330,14 +5349,14 @@ void VarType_ChannelDesc::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const VarType_ChannelDesc& VarType_ChannelDesc::default_instance() { +const VarType_ChannelDesc &VarType_ChannelDesc::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -VarType_ChannelDesc* VarType_ChannelDesc::New( - ::google::protobuf::Arena* arena) const { - VarType_ChannelDesc* n = new VarType_ChannelDesc; +VarType_ChannelDesc * +VarType_ChannelDesc::New(::google::protobuf::Arena *arena) const { + VarType_ChannelDesc *n = new VarType_ChannelDesc; if (arena != NULL) { arena->Own(n); } @@ -5353,8 +5372,8 @@ void VarType_ChannelDesc::Clear() { cached_has_bits = _has_bits_[0]; if (cached_has_bits & 3u) { ::memset(&capacity_, 0, - static_cast(reinterpret_cast(&data_type_) - - reinterpret_cast(&capacity_)) + + static_cast(reinterpret_cast(&data_type_) - + reinterpret_cast(&capacity_)) + sizeof(data_type_)); } _has_bits_.Clear(); @@ -5362,9 +5381,10 @@ void VarType_ChannelDesc::Clear() { } bool VarType_ChannelDesc::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -5378,56 +5398,57 @@ bool VarType_ChannelDesc::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required .paddle_mobile.framework.proto.VarType.Type data_type = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::paddle_mobile::framework::proto::VarType_Type_IsValid(value)) { - set_data_type( - static_cast<::paddle_mobile::framework::proto::VarType_Type>( - value)); - } else { - unknown_fields_stream.WriteVarint32(8u); - unknown_fields_stream.WriteVarint32( - static_cast<::google::protobuf::uint32>(value)); - } + // required .paddle_mobile.framework.proto.VarType.Type data_type = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::paddle_mobile::framework::proto::VarType_Type_IsValid(value)) { + set_data_type( + static_cast<::paddle_mobile::framework::proto::VarType_Type>( + value)); } else { - goto handle_unusual; + unknown_fields_stream.WriteVarint32(8u); + unknown_fields_stream.WriteVarint32( + static_cast<::google::protobuf::uint32>(value)); } - break; + } else { + goto handle_unusual; } + break; + } - // required int64 capacity = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { - set_has_capacity(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int64, - ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( - input, &capacity_))); - } else { - goto handle_unusual; - } - break; + // required int64 capacity = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + set_has_capacity(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, + ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &capacity_))); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -5440,7 +5461,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -5489,7 +5510,7 @@ size_t VarType_ChannelDesc::ByteSizeLong() const { total_size += _internal_metadata_.unknown_fields().size(); if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == - 0) { // All required fields are present. + 0) { // All required fields are present. // required int64 capacity = 2; total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int64Size( this->capacity()); @@ -5509,11 +5530,11 @@ size_t VarType_ChannelDesc::ByteSizeLong() const { } void VarType_ChannelDesc::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } bool VarType_ChannelDesc::IsInitialized() const { - if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + if ((_has_bits_[0] & 0x00000003) != 0x00000003) + return false; return true; } -void VarType_ChannelDesc::Swap(VarType_ChannelDesc* other) { - if (other == this) return; +void VarType_ChannelDesc::Swap(VarType_ChannelDesc *other) { + if (other == this) + return; InternalSwap(other); } -void VarType_ChannelDesc::InternalSwap(VarType_ChannelDesc* other) { +void VarType_ChannelDesc::InternalSwap(VarType_ChannelDesc *other) { using std::swap; swap(capacity_, other->capacity_); swap(data_type_, other->data_type_); @@ -5576,8 +5600,8 @@ void VarType_ChannelDesc::clear_data_type() { data_type_ = 0; clear_has_data_type(); } -::paddle_mobile::framework::proto::VarType_Type VarType_ChannelDesc::data_type() - const { +::paddle_mobile::framework::proto::VarType_Type +VarType_ChannelDesc::data_type() const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.ChannelDesc.data_type) return static_cast<::paddle_mobile::framework::proto::VarType_Type>( data_type_); @@ -5612,13 +5636,13 @@ void VarType_ChannelDesc::set_capacity(::google::protobuf::int64 value) { // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarType.ChannelDesc.capacity) } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int VarType_Tuple::kElementTypeFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 VarType_Tuple::VarType_Tuple() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -5628,11 +5652,9 @@ VarType_Tuple::VarType_Tuple() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.Tuple) } -VarType_Tuple::VarType_Tuple(const VarType_Tuple& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0), +VarType_Tuple::VarType_Tuple(const VarType_Tuple &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0), element_type_(from.element_type_) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.Tuple) @@ -5652,13 +5674,13 @@ void VarType_Tuple::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const VarType_Tuple& VarType_Tuple::default_instance() { +const VarType_Tuple &VarType_Tuple::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -VarType_Tuple* VarType_Tuple::New(::google::protobuf::Arena* arena) const { - VarType_Tuple* n = new VarType_Tuple; +VarType_Tuple *VarType_Tuple::New(::google::protobuf::Arena *arena) const { + VarType_Tuple *n = new VarType_Tuple; if (arena != NULL) { arena->Own(n); } @@ -5677,9 +5699,10 @@ void VarType_Tuple::Clear() { } bool VarType_Tuple::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -5693,49 +5716,49 @@ bool VarType_Tuple::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .paddle_mobile.framework.proto.VarType.Type element_type = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::paddle_mobile::framework::proto::VarType_Type_IsValid(value)) { - add_element_type( - static_cast<::paddle_mobile::framework::proto::VarType_Type>( - value)); - } else { - unknown_fields_stream.WriteVarint32(tag); - unknown_fields_stream.WriteVarint32( - static_cast<::google::protobuf::uint32>(value)); - } - } else if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>( - 10u /* 10 & 0xFF */)) { - DO_((::google::protobuf::internal::WireFormatLite:: - ReadPackedEnumPreserveUnknowns( - input, 1, - ::paddle_mobile::framework::proto::VarType_Type_IsValid, - &unknown_fields_stream, this->mutable_element_type()))); + // repeated .paddle_mobile.framework.proto.VarType.Type element_type = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::paddle_mobile::framework::proto::VarType_Type_IsValid(value)) { + add_element_type( + static_cast<::paddle_mobile::framework::proto::VarType_Type>( + value)); } else { - goto handle_unusual; + unknown_fields_stream.WriteVarint32(tag); + unknown_fields_stream.WriteVarint32( + static_cast<::google::protobuf::uint32>(value)); } - break; + } else if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite:: + ReadPackedEnumPreserveUnknowns( + input, 1, + ::paddle_mobile::framework::proto::VarType_Type_IsValid, + &unknown_fields_stream, this->mutable_element_type()))); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -5748,7 +5771,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -5790,11 +5813,11 @@ size_t VarType_Tuple::ByteSizeLong() const { } void VarType_Tuple::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -5804,20 +5827,22 @@ void VarType_Tuple::MergeFrom(const VarType_Tuple& from) { 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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } bool VarType_Tuple::IsInitialized() const { return true; } -void VarType_Tuple::Swap(VarType_Tuple* other) { - if (other == this) return; +void VarType_Tuple::Swap(VarType_Tuple *other) { + if (other == this) + return; InternalSwap(other); } -void VarType_Tuple::InternalSwap(VarType_Tuple* other) { +void VarType_Tuple::InternalSwap(VarType_Tuple *other) { using std::swap; element_type_.InternalSwap(&other->element_type_); swap(_has_bits_[0], other->_has_bits_[0]); @@ -5835,8 +5860,8 @@ void VarType_Tuple::InternalSwap(VarType_Tuple* other) { // repeated .paddle_mobile.framework.proto.VarType.Type element_type = 1; int VarType_Tuple::element_type_size() const { return element_type_.size(); } void VarType_Tuple::clear_element_type() { element_type_.Clear(); } -::paddle_mobile::framework::proto::VarType_Type VarType_Tuple::element_type( - int index) const { +::paddle_mobile::framework::proto::VarType_Type +VarType_Tuple::element_type(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.Tuple.element_type) return static_cast<::paddle_mobile::framework::proto::VarType_Type>( element_type_.Get(index)); @@ -5853,17 +5878,17 @@ void VarType_Tuple::add_element_type( element_type_.Add(value); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.Tuple.element_type) } -const ::google::protobuf::RepeatedField& VarType_Tuple::element_type() - const { +const ::google::protobuf::RepeatedField & +VarType_Tuple::element_type() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.Tuple.element_type) return element_type_; } -::google::protobuf::RepeatedField* VarType_Tuple::mutable_element_type() { +::google::protobuf::RepeatedField *VarType_Tuple::mutable_element_type() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.Tuple.element_type) return &element_type_; } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== @@ -5875,7 +5900,7 @@ const int VarType::kTensorArrayFieldNumber; const int VarType::kReaderFieldNumber; const int VarType::kChannelFieldNumber; const int VarType::kTupleFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 VarType::VarType() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -5885,11 +5910,9 @@ VarType::VarType() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType) } -VarType::VarType(const VarType& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0) { +VarType::VarType(const VarType &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_selected_rows()) { selected_rows_ = new ::paddle_mobile::framework::proto::VarType_TensorDesc( @@ -5934,8 +5957,8 @@ VarType::VarType(const VarType& from) void VarType::SharedCtor() { _cached_size_ = 0; ::memset(&selected_rows_, 0, - static_cast(reinterpret_cast(&type_) - - reinterpret_cast(&selected_rows_)) + + static_cast(reinterpret_cast(&type_) - + reinterpret_cast(&selected_rows_)) + sizeof(type_)); } @@ -5945,12 +5968,18 @@ VarType::~VarType() { } void VarType::SharedDtor() { - if (this != internal_default_instance()) delete selected_rows_; - if (this != internal_default_instance()) delete lod_tensor_; - if (this != internal_default_instance()) delete tensor_array_; - if (this != internal_default_instance()) delete reader_; - if (this != internal_default_instance()) delete channel_; - if (this != internal_default_instance()) delete tuple_; + if (this != internal_default_instance()) + delete selected_rows_; + if (this != internal_default_instance()) + delete lod_tensor_; + if (this != internal_default_instance()) + 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 { @@ -5958,13 +5987,13 @@ void VarType::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const VarType& VarType::default_instance() { +const VarType &VarType::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -VarType* VarType::New(::google::protobuf::Arena* arena) const { - VarType* n = new VarType; +VarType *VarType::New(::google::protobuf::Arena *arena) const { + VarType *n = new VarType; if (arena != NULL) { arena->Own(n); } @@ -6013,9 +6042,10 @@ void VarType::Clear() { } bool VarType::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -6029,117 +6059,117 @@ bool VarType::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required .paddle_mobile.framework.proto.VarType.Type type = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::paddle_mobile::framework::proto::VarType_Type_IsValid(value)) { - set_type( - static_cast<::paddle_mobile::framework::proto::VarType_Type>( - value)); - } else { - unknown_fields_stream.WriteVarint32(8u); - unknown_fields_stream.WriteVarint32( - static_cast<::google::protobuf::uint32>(value)); - } + // required .paddle_mobile.framework.proto.VarType.Type type = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::paddle_mobile::framework::proto::VarType_Type_IsValid(value)) { + set_type(static_cast<::paddle_mobile::framework::proto::VarType_Type>( + value)); } else { - goto handle_unusual; + unknown_fields_stream.WriteVarint32(8u); + unknown_fields_stream.WriteVarint32( + static_cast<::google::protobuf::uint32>(value)); } - break; + } else { + goto handle_unusual; } + break; + } - // optional .paddle_mobile.framework.proto.VarType.TensorDesc - // selected_rows = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, mutable_selected_rows())); - } else { - goto handle_unusual; - } - break; + // optional .paddle_mobile.framework.proto.VarType.TensorDesc + // selected_rows = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_selected_rows())); + } else { + goto handle_unusual; } + break; + } - // optional .paddle_mobile.framework.proto.VarType.LoDTensorDesc - // lod_tensor = 3; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, mutable_lod_tensor())); - } else { - goto handle_unusual; - } - break; + // optional .paddle_mobile.framework.proto.VarType.LoDTensorDesc + // lod_tensor = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_lod_tensor())); + } else { + goto handle_unusual; } + break; + } - // optional .paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc - // tensor_array = 4; - case 4: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, mutable_tensor_array())); - } else { - goto handle_unusual; - } - break; + // optional .paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc + // tensor_array = 4; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_tensor_array())); + } else { + goto handle_unusual; } + break; + } - // optional .paddle_mobile.framework.proto.VarType.ReaderDesc reader = 5; - case 5: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, mutable_reader())); - } else { - goto handle_unusual; - } - break; + // optional .paddle_mobile.framework.proto.VarType.ReaderDesc reader = 5; + case 5: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_reader())); + } else { + goto handle_unusual; } + break; + } - // optional .paddle_mobile.framework.proto.VarType.ChannelDesc channel = - // 6; - case 6: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, mutable_channel())); - } else { - goto handle_unusual; - } - break; + // optional .paddle_mobile.framework.proto.VarType.ChannelDesc channel = + // 6; + case 6: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_channel())); + } else { + goto handle_unusual; } + break; + } - // optional .paddle_mobile.framework.proto.VarType.Tuple tuple = 7; - case 7: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, mutable_tuple())); - } else { - goto handle_unusual; - } - break; + // optional .paddle_mobile.framework.proto.VarType.Tuple tuple = 7; + case 7: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_tuple())); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -6152,7 +6182,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -6280,11 +6310,11 @@ size_t VarType::ByteSizeLong() const { } void VarType::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } 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 (!this->selected_rows_->IsInitialized()) return false; + if (!this->selected_rows_->IsInitialized()) + return false; } if (has_lod_tensor()) { - if (!this->lod_tensor_->IsInitialized()) return false; + if (!this->lod_tensor_->IsInitialized()) + return false; } if (has_tensor_array()) { - if (!this->tensor_array_->IsInitialized()) return false; + if (!this->tensor_array_->IsInitialized()) + return false; } if (has_reader()) { - if (!this->reader_->IsInitialized()) return false; + if (!this->reader_->IsInitialized()) + return false; } if (has_channel()) { - if (!this->channel_->IsInitialized()) return false; + if (!this->channel_->IsInitialized()) + return false; } return true; } -void VarType::Swap(VarType* other) { - if (other == this) return; +void VarType::Swap(VarType *other) { + if (other == this) + return; InternalSwap(other); } -void VarType::InternalSwap(VarType* other) { +void VarType::InternalSwap(VarType *other) { using std::swap; swap(selected_rows_, other->selected_rows_); swap(lod_tensor_, other->lod_tensor_); @@ -6412,17 +6450,19 @@ void VarType::clear_selected_rows() { ->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear(); clear_has_selected_rows(); } -const ::paddle_mobile::framework::proto::VarType_TensorDesc& +const ::paddle_mobile::framework::proto::VarType_TensorDesc & VarType::selected_rows() const { - const ::paddle_mobile::framework::proto::VarType_TensorDesc* p = + const ::paddle_mobile::framework::proto::VarType_TensorDesc *p = selected_rows_; // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.selected_rows) - return p != NULL ? *p : *reinterpret_cast( - &::paddle_mobile::framework::proto:: - _VarType_TensorDesc_default_instance_); + return p != NULL + ? *p + : *reinterpret_cast< + const ::paddle_mobile::framework::proto::VarType_TensorDesc + *>(&::paddle_mobile::framework::proto:: + _VarType_TensorDesc_default_instance_); } -::paddle_mobile::framework::proto::VarType_TensorDesc* +::paddle_mobile::framework::proto::VarType_TensorDesc * VarType::mutable_selected_rows() { set_has_selected_rows(); if (selected_rows_ == NULL) { @@ -6431,16 +6471,16 @@ VarType::mutable_selected_rows() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.selected_rows) return selected_rows_; } -::paddle_mobile::framework::proto::VarType_TensorDesc* +::paddle_mobile::framework::proto::VarType_TensorDesc * VarType::release_selected_rows() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.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; return temp; } 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_; selected_rows_ = selected_rows; if (selected_rows) { @@ -6463,17 +6503,17 @@ void VarType::clear_lod_tensor() { ->::paddle_mobile::framework::proto::VarType_LoDTensorDesc::Clear(); clear_has_lod_tensor(); } -const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc& +const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc & VarType::lod_tensor() const { - const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* p = + const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *p = lod_tensor_; // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.lod_tensor) return p != NULL ? *p : *reinterpret_cast( + proto::VarType_LoDTensorDesc *>( &::paddle_mobile::framework::proto:: _VarType_LoDTensorDesc_default_instance_); } -::paddle_mobile::framework::proto::VarType_LoDTensorDesc* +::paddle_mobile::framework::proto::VarType_LoDTensorDesc * VarType::mutable_lod_tensor() { set_has_lod_tensor(); if (lod_tensor_ == NULL) { @@ -6482,16 +6522,16 @@ VarType::mutable_lod_tensor() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.lod_tensor) return lod_tensor_; } -::paddle_mobile::framework::proto::VarType_LoDTensorDesc* +::paddle_mobile::framework::proto::VarType_LoDTensorDesc * VarType::release_lod_tensor() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.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; return temp; } 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_; lod_tensor_ = lod_tensor; if (lod_tensor) { @@ -6515,18 +6555,18 @@ void VarType::clear_tensor_array() { VarType_LoDTensorArrayDesc::Clear(); clear_has_tensor_array(); } -const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc& +const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc & VarType::tensor_array() const { - const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* p = + const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *p = tensor_array_; // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tensor_array) return p != NULL ? *p : *reinterpret_cast( + VarType_LoDTensorArrayDesc *>( &::paddle_mobile::framework::proto:: _VarType_LoDTensorArrayDesc_default_instance_); } -::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* +::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc * VarType::mutable_tensor_array() { set_has_tensor_array(); if (tensor_array_ == NULL) { @@ -6536,18 +6576,18 @@ VarType::mutable_tensor_array() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.tensor_array) return tensor_array_; } -::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* +::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc * VarType::release_tensor_array() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.tensor_array) clear_has_tensor_array(); - ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* temp = + ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *temp = tensor_array_; tensor_array_ = NULL; return temp; } void VarType::set_allocated_tensor_array( - ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* - tensor_array) { + ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc + *tensor_array) { delete tensor_array_; tensor_array_ = tensor_array; if (tensor_array) { @@ -6567,16 +6607,18 @@ void VarType::clear_reader() { reader_->::paddle_mobile::framework::proto::VarType_ReaderDesc::Clear(); clear_has_reader(); } -const ::paddle_mobile::framework::proto::VarType_ReaderDesc& VarType::reader() - const { - const ::paddle_mobile::framework::proto::VarType_ReaderDesc* p = reader_; +const ::paddle_mobile::framework::proto::VarType_ReaderDesc & +VarType::reader() const { + const ::paddle_mobile::framework::proto::VarType_ReaderDesc *p = reader_; // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.reader) - return p != NULL ? *p : *reinterpret_cast( - &::paddle_mobile::framework::proto:: - _VarType_ReaderDesc_default_instance_); + return p != NULL + ? *p + : *reinterpret_cast< + const ::paddle_mobile::framework::proto::VarType_ReaderDesc + *>(&::paddle_mobile::framework::proto:: + _VarType_ReaderDesc_default_instance_); } -::paddle_mobile::framework::proto::VarType_ReaderDesc* +::paddle_mobile::framework::proto::VarType_ReaderDesc * VarType::mutable_reader() { set_has_reader(); if (reader_ == NULL) { @@ -6585,16 +6627,16 @@ VarType::mutable_reader() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.reader) return reader_; } -::paddle_mobile::framework::proto::VarType_ReaderDesc* +::paddle_mobile::framework::proto::VarType_ReaderDesc * VarType::release_reader() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.reader) clear_has_reader(); - ::paddle_mobile::framework::proto::VarType_ReaderDesc* temp = reader_; + ::paddle_mobile::framework::proto::VarType_ReaderDesc *temp = reader_; reader_ = NULL; return temp; } void VarType::set_allocated_reader( - ::paddle_mobile::framework::proto::VarType_ReaderDesc* reader) { + ::paddle_mobile::framework::proto::VarType_ReaderDesc *reader) { delete reader_; reader_ = reader; if (reader) { @@ -6614,16 +6656,18 @@ void VarType::clear_channel() { channel_->::paddle_mobile::framework::proto::VarType_ChannelDesc::Clear(); clear_has_channel(); } -const ::paddle_mobile::framework::proto::VarType_ChannelDesc& VarType::channel() - const { - const ::paddle_mobile::framework::proto::VarType_ChannelDesc* p = channel_; +const ::paddle_mobile::framework::proto::VarType_ChannelDesc & +VarType::channel() const { + const ::paddle_mobile::framework::proto::VarType_ChannelDesc *p = channel_; // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.channel) - return p != NULL ? *p : *reinterpret_cast( - &::paddle_mobile::framework::proto:: - _VarType_ChannelDesc_default_instance_); + return p != NULL + ? *p + : *reinterpret_cast< + const ::paddle_mobile::framework::proto::VarType_ChannelDesc + *>(&::paddle_mobile::framework::proto:: + _VarType_ChannelDesc_default_instance_); } -::paddle_mobile::framework::proto::VarType_ChannelDesc* +::paddle_mobile::framework::proto::VarType_ChannelDesc * VarType::mutable_channel() { set_has_channel(); if (channel_ == NULL) { @@ -6632,16 +6676,16 @@ VarType::mutable_channel() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.channel) return channel_; } -::paddle_mobile::framework::proto::VarType_ChannelDesc* +::paddle_mobile::framework::proto::VarType_ChannelDesc * VarType::release_channel() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.channel) clear_has_channel(); - ::paddle_mobile::framework::proto::VarType_ChannelDesc* temp = channel_; + ::paddle_mobile::framework::proto::VarType_ChannelDesc *temp = channel_; channel_ = NULL; return temp; } void VarType::set_allocated_channel( - ::paddle_mobile::framework::proto::VarType_ChannelDesc* channel) { + ::paddle_mobile::framework::proto::VarType_ChannelDesc *channel) { delete channel_; channel_ = channel; if (channel) { @@ -6661,17 +6705,17 @@ void VarType::clear_tuple() { tuple_->::paddle_mobile::framework::proto::VarType_Tuple::Clear(); clear_has_tuple(); } -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 &VarType::tuple() const { + const ::paddle_mobile::framework::proto::VarType_Tuple *p = tuple_; // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tuple) return p != NULL ? *p : *reinterpret_cast< - const ::paddle_mobile::framework::proto::VarType_Tuple*>( + const ::paddle_mobile::framework::proto::VarType_Tuple *>( &::paddle_mobile::framework::proto:: _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(); if (tuple_ == NULL) { tuple_ = new ::paddle_mobile::framework::proto::VarType_Tuple; @@ -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) 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) clear_has_tuple(); - ::paddle_mobile::framework::proto::VarType_Tuple* temp = tuple_; + ::paddle_mobile::framework::proto::VarType_Tuple *temp = tuple_; tuple_ = NULL; return temp; } void VarType::set_allocated_tuple( - ::paddle_mobile::framework::proto::VarType_Tuple* tuple) { + ::paddle_mobile::framework::proto::VarType_Tuple *tuple) { delete tuple_; tuple_ = tuple; if (tuple) { @@ -6698,7 +6742,7 @@ void VarType::set_allocated_tuple( // @@protoc_insertion_point(field_set_allocated:paddle_mobile.framework.proto.VarType.tuple) } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== @@ -6706,7 +6750,7 @@ void VarType::set_allocated_tuple( const int VarDesc::kNameFieldNumber; const int VarDesc::kTypeFieldNumber; const int VarDesc::kPersistableFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 VarDesc::VarDesc() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -6716,11 +6760,9 @@ VarDesc::VarDesc() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarDesc) } -VarDesc::VarDesc(const VarDesc& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0) { +VarDesc::VarDesc(const VarDesc &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); name_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -6743,8 +6785,8 @@ void VarDesc::SharedCtor() { name_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&type_, 0, - static_cast(reinterpret_cast(&persistable_) - - reinterpret_cast(&type_)) + + static_cast(reinterpret_cast(&persistable_) - + reinterpret_cast(&type_)) + sizeof(persistable_)); } @@ -6756,7 +6798,8 @@ VarDesc::~VarDesc() { void VarDesc::SharedDtor() { name_.DestroyNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) delete type_; + if (this != internal_default_instance()) + delete type_; } void VarDesc::SetCachedSize(int size) const { @@ -6764,13 +6807,13 @@ void VarDesc::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const VarDesc& VarDesc::default_instance() { +const VarDesc &VarDesc::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -VarDesc* VarDesc::New(::google::protobuf::Arena* arena) const { - VarDesc* n = new VarDesc; +VarDesc *VarDesc::New(::google::protobuf::Arena *arena) const { + VarDesc *n = new VarDesc; if (arena != NULL) { arena->Own(n); } @@ -6801,9 +6844,10 @@ void VarDesc::Clear() { } bool VarDesc::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -6817,56 +6861,57 @@ bool VarDesc::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - } else { - goto handle_unusual; - } - break; + // required string name = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + } else { + goto handle_unusual; } + break; + } - // required .paddle_mobile.framework.proto.VarType type = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, mutable_type())); - } else { - goto handle_unusual; - } - break; + // required .paddle_mobile.framework.proto.VarType type = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_type())); + } else { + goto handle_unusual; } + break; + } - // optional bool persistable = 3 [default = false]; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { - set_has_persistable(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &persistable_))); - } else { - goto handle_unusual; - } - break; + // optional bool persistable = 3 [default = false]; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { + set_has_persistable(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &persistable_))); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -6879,7 +6924,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -6935,7 +6980,7 @@ size_t VarDesc::ByteSizeLong() const { total_size += _internal_metadata_.unknown_fields().size(); if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == - 0) { // All required fields are present. + 0) { // All required fields are present. // required string name = 1; total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); @@ -6961,11 +7006,11 @@ size_t VarDesc::ByteSizeLong() const { } void VarDesc::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } bool VarDesc::IsInitialized() const { - if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + if ((_has_bits_[0] & 0x00000003) != 0x00000003) + return false; if (has_type()) { - if (!this->type_->IsInitialized()) return false; + if (!this->type_->IsInitialized()) + return false; } return true; } -void VarDesc::Swap(VarDesc* other) { - if (other == this) return; +void VarDesc::Swap(VarDesc *other) { + if (other == this) + return; InternalSwap(other); } -void VarDesc::InternalSwap(VarDesc* other) { +void VarDesc::InternalSwap(VarDesc *other) { using std::swap; name_.Swap(&other->name_); swap(type_, other->type_); @@ -7036,50 +7085,50 @@ void VarDesc::clear_name() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return name_.GetNoArena(); } -void VarDesc::set_name(const ::std::string& value) { +void VarDesc::set_name(const ::std::string &value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarDesc.name) } #if LANG_CXX11 -void VarDesc::set_name(::std::string&& value) { +void VarDesc::set_name(::std::string &&value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.VarDesc.name) } #endif -void VarDesc::set_name(const char* value) { +void VarDesc::set_name(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarDesc.name) return name_.MutableNoArena( &::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) clear_has_name(); return name_.ReleaseNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void VarDesc::set_allocated_name(::std::string* name) { +void VarDesc::set_allocated_name(::std::string *name) { if (name != NULL) { set_has_name(); } else { @@ -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::clear_has_type() { _has_bits_[0] &= ~0x00000002u; } 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(); } -const ::paddle_mobile::framework::proto::VarType& VarDesc::type() const { - const ::paddle_mobile::framework::proto::VarType* p = type_; +const ::paddle_mobile::framework::proto::VarType &VarDesc::type() const { + const ::paddle_mobile::framework::proto::VarType *p = type_; // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarDesc.type) return p != NULL ? *p : *reinterpret_cast< - const ::paddle_mobile::framework::proto::VarType*>( + const ::paddle_mobile::framework::proto::VarType *>( &::paddle_mobile::framework::proto:: _VarType_default_instance_); } -::paddle_mobile::framework::proto::VarType* VarDesc::mutable_type() { +::paddle_mobile::framework::proto::VarType *VarDesc::mutable_type() { set_has_type(); if (type_ == NULL) { type_ = new ::paddle_mobile::framework::proto::VarType; @@ -7115,15 +7165,15 @@ const ::paddle_mobile::framework::proto::VarType& VarDesc::type() const { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarDesc.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) clear_has_type(); - ::paddle_mobile::framework::proto::VarType* temp = type_; + ::paddle_mobile::framework::proto::VarType *temp = type_; type_ = NULL; return temp; } void VarDesc::set_allocated_type( - ::paddle_mobile::framework::proto::VarType* type) { + ::paddle_mobile::framework::proto::VarType *type) { delete type_; type_ = type; if (type) { @@ -7154,7 +7204,7 @@ void VarDesc::set_persistable(bool value) { // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarDesc.persistable) } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== @@ -7164,7 +7214,7 @@ const int BlockDesc::kParentIdxFieldNumber; const int BlockDesc::kVarsFieldNumber; const int BlockDesc::kOpsFieldNumber; const int BlockDesc::kForwardBlockIdxFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 BlockDesc::BlockDesc() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -7174,26 +7224,24 @@ BlockDesc::BlockDesc() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.BlockDesc) } -BlockDesc::BlockDesc(const BlockDesc& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0), - vars_(from.vars_), +BlockDesc::BlockDesc(const BlockDesc &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0), vars_(from.vars_), ops_(from.ops_) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&idx_, &from.idx_, - static_cast(reinterpret_cast(&forward_block_idx_) - - reinterpret_cast(&idx_)) + + static_cast(reinterpret_cast(&forward_block_idx_) - + reinterpret_cast(&idx_)) + sizeof(forward_block_idx_)); // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.BlockDesc) } void BlockDesc::SharedCtor() { _cached_size_ = 0; - ::memset(&idx_, 0, static_cast(reinterpret_cast(&parent_idx_) - - reinterpret_cast(&idx_)) + - sizeof(parent_idx_)); + ::memset(&idx_, 0, + static_cast(reinterpret_cast(&parent_idx_) - + reinterpret_cast(&idx_)) + + sizeof(parent_idx_)); forward_block_idx_ = -1; } @@ -7209,13 +7257,13 @@ void BlockDesc::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const BlockDesc& BlockDesc::default_instance() { +const BlockDesc &BlockDesc::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -BlockDesc* BlockDesc::New(::google::protobuf::Arena* arena) const { - BlockDesc* n = new BlockDesc; +BlockDesc *BlockDesc::New(::google::protobuf::Arena *arena) const { + BlockDesc *n = new BlockDesc; if (arena != NULL) { arena->Own(n); } @@ -7233,8 +7281,8 @@ void BlockDesc::Clear() { cached_has_bits = _has_bits_[0]; if (cached_has_bits & 7u) { ::memset(&idx_, 0, - static_cast(reinterpret_cast(&parent_idx_) - - reinterpret_cast(&idx_)) + + static_cast(reinterpret_cast(&parent_idx_) - + reinterpret_cast(&idx_)) + sizeof(parent_idx_)); forward_block_idx_ = -1; } @@ -7243,9 +7291,10 @@ void BlockDesc::Clear() { } bool BlockDesc::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -7259,87 +7308,88 @@ bool BlockDesc::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required int32 idx = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { - set_has_idx(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &idx_))); - } else { - goto handle_unusual; - } - break; + // required int32 idx = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { + set_has_idx(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(input, + &idx_))); + } else { + goto handle_unusual; } + break; + } - // required int32 parent_idx = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { - set_has_parent_idx(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &parent_idx_))); - } else { - goto handle_unusual; - } - break; + // required int32 parent_idx = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + set_has_parent_idx(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &parent_idx_))); + } else { + goto handle_unusual; } + break; + } - // repeated .paddle_mobile.framework.proto.VarDesc vars = 3; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, add_vars())); - } else { - goto handle_unusual; - } - break; + // repeated .paddle_mobile.framework.proto.VarDesc vars = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_vars())); + } else { + goto handle_unusual; } + break; + } - // repeated .paddle_mobile.framework.proto.OpDesc ops = 4; - case 4: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, add_ops())); - } else { - goto handle_unusual; - } - break; + // repeated .paddle_mobile.framework.proto.OpDesc ops = 4; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_ops())); + } else { + goto handle_unusual; } + break; + } - // optional int32 forward_block_idx = 5 [default = -1]; - case 5: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { - set_has_forward_block_idx(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &forward_block_idx_))); - } else { - goto handle_unusual; - } - break; + // optional int32 forward_block_idx = 5 [default = -1]; + case 5: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { + set_has_forward_block_idx(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &forward_block_idx_))); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -7352,7 +7402,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -7421,7 +7471,7 @@ size_t BlockDesc::ByteSizeLong() const { total_size += _internal_metadata_.unknown_fields().size(); if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == - 0) { // All required fields are present. + 0) { // All required fields are present. // required int32 idx = 1; total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->idx()); @@ -7469,11 +7519,11 @@ size_t BlockDesc::ByteSizeLong() const { } void BlockDesc::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } 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())) return false; if (!::google::protobuf::internal::AllAreInitialized(this->ops())) @@ -7513,11 +7565,12 @@ bool BlockDesc::IsInitialized() const { return true; } -void BlockDesc::Swap(BlockDesc* other) { - if (other == this) return; +void BlockDesc::Swap(BlockDesc *other) { + if (other == this) + return; InternalSwap(other); } -void BlockDesc::InternalSwap(BlockDesc* other) { +void BlockDesc::InternalSwap(BlockDesc *other) { using std::swap; vars_.InternalSwap(&other->vars_); ops_.InternalSwap(&other->ops_); @@ -7577,27 +7630,26 @@ void BlockDesc::set_parent_idx(::google::protobuf::int32 value) { // repeated .paddle_mobile.framework.proto.VarDesc vars = 3; int BlockDesc::vars_size() const { return vars_.size(); } void BlockDesc::clear_vars() { vars_.Clear(); } -const ::paddle_mobile::framework::proto::VarDesc& BlockDesc::vars( - int index) const { +const ::paddle_mobile::framework::proto::VarDesc & +BlockDesc::vars(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.vars) 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) 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) return vars_.Add(); } -::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::VarDesc>* -BlockDesc::mutable_vars() { +::google::protobuf::RepeatedPtrField<::paddle_mobile::framework::proto::VarDesc> + *BlockDesc::mutable_vars() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.vars) return &vars_; } const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::VarDesc>& + ::paddle_mobile::framework::proto::VarDesc> & BlockDesc::vars() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.vars) return vars_; @@ -7606,26 +7658,26 @@ BlockDesc::vars() const { // repeated .paddle_mobile.framework.proto.OpDesc ops = 4; int BlockDesc::ops_size() const { return ops_.size(); } void BlockDesc::clear_ops() { ops_.Clear(); } -const ::paddle_mobile::framework::proto::OpDesc& BlockDesc::ops( - int index) const { +const ::paddle_mobile::framework::proto::OpDesc & +BlockDesc::ops(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.ops) 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) 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) return ops_.Add(); } -::google::protobuf::RepeatedPtrField<::paddle_mobile::framework::proto::OpDesc>* -BlockDesc::mutable_ops() { +::google::protobuf::RepeatedPtrField<::paddle_mobile::framework::proto::OpDesc> + *BlockDesc::mutable_ops() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.ops) return &ops_; } const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc>& + ::paddle_mobile::framework::proto::OpDesc> & BlockDesc::ops() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.ops) return ops_; @@ -7651,13 +7703,13 @@ void BlockDesc::set_forward_block_idx(::google::protobuf::int32 value) { // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.BlockDesc.forward_block_idx) } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ProgramDesc::kBlocksFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ProgramDesc::ProgramDesc() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { @@ -7667,12 +7719,9 @@ ProgramDesc::ProgramDesc() SharedCtor(); // @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.ProgramDesc) } -ProgramDesc::ProgramDesc(const ProgramDesc& from) - : ::google::protobuf::MessageLite(), - _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0), - blocks_(from.blocks_) { +ProgramDesc::ProgramDesc(const ProgramDesc &from) + : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), + _has_bits_(from._has_bits_), _cached_size_(0), blocks_(from.blocks_) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.ProgramDesc) } @@ -7691,13 +7740,13 @@ void ProgramDesc::SetCachedSize(int size) const { _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const ProgramDesc& ProgramDesc::default_instance() { +const ProgramDesc &ProgramDesc::default_instance() { protobuf_framework_2eproto::InitDefaults(); return *internal_default_instance(); } -ProgramDesc* ProgramDesc::New(::google::protobuf::Arena* arena) const { - ProgramDesc* n = new ProgramDesc; +ProgramDesc *ProgramDesc::New(::google::protobuf::Arena *arena) const { + ProgramDesc *n = new ProgramDesc; if (arena != NULL) { arena->Own(n); } @@ -7716,9 +7765,10 @@ void ProgramDesc::Clear() { } bool ProgramDesc::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::io::CodedInputStream *input) { +#define DO_(EXPRESSION) \ + if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \ + goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::LazyStringOutputStream unknown_fields_string( ::google::protobuf::NewPermanentCallback( @@ -7732,30 +7782,31 @@ bool ProgramDesc::MergePartialFromCodedStream( ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; - if (!p.second) goto handle_unusual; + if (!p.second) + goto handle_unusual; switch ( ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == - static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { - DO_(::google::protobuf::internal::WireFormatLite:: - ReadMessageNoVirtual(input, add_blocks())); - } else { - goto handle_unusual; - } - break; + // repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == + static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_blocks())); + } else { + goto handle_unusual; } + break; + } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField( - input, tag, &unknown_fields_stream)); - break; + default: { + handle_unusual: + if (tag == 0) { + goto success; } + DO_(::google::protobuf::internal::WireFormatLite::SkipField( + input, tag, &unknown_fields_stream)); + break; + } } } success: @@ -7768,7 +7819,7 @@ failure: } 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) ::google::protobuf::uint32 cached_has_bits = 0; (void)cached_has_bits; @@ -7811,11 +7862,11 @@ size_t ProgramDesc::ByteSizeLong() const { } void ProgramDesc::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); + const ::google::protobuf::MessageLite &from) { + MergeFrom(*::google::protobuf::down_cast(&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) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -7825,9 +7876,10 @@ void ProgramDesc::MergeFrom(const ProgramDesc& from) { 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) - if (&from == this) return; + if (&from == this) + return; Clear(); MergeFrom(from); } @@ -7838,11 +7890,12 @@ bool ProgramDesc::IsInitialized() const { return true; } -void ProgramDesc::Swap(ProgramDesc* other) { - if (other == this) return; +void ProgramDesc::Swap(ProgramDesc *other) { + if (other == this) + return; InternalSwap(other); } -void ProgramDesc::InternalSwap(ProgramDesc* other) { +void ProgramDesc::InternalSwap(ProgramDesc *other) { using std::swap; blocks_.InternalSwap(&other->blocks_); swap(_has_bits_[0], other->_has_bits_[0]); @@ -7860,39 +7913,39 @@ void ProgramDesc::InternalSwap(ProgramDesc* other) { // repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1; int ProgramDesc::blocks_size() const { return blocks_.size(); } void ProgramDesc::clear_blocks() { blocks_.Clear(); } -const ::paddle_mobile::framework::proto::BlockDesc& ProgramDesc::blocks( - int index) const { +const ::paddle_mobile::framework::proto::BlockDesc & +ProgramDesc::blocks(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.ProgramDesc.blocks) return blocks_.Get(index); } -::paddle_mobile::framework::proto::BlockDesc* ProgramDesc::mutable_blocks( - int index) { +::paddle_mobile::framework::proto::BlockDesc * +ProgramDesc::mutable_blocks(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.ProgramDesc.blocks) 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) return blocks_.Add(); } ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::BlockDesc>* + ::paddle_mobile::framework::proto::BlockDesc> * ProgramDesc::mutable_blocks() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.ProgramDesc.blocks) return &blocks_; } const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::BlockDesc>& + ::paddle_mobile::framework::proto::BlockDesc> & ProgramDesc::blocks() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.ProgramDesc.blocks) return blocks_; } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -} // namespace proto -} // namespace framework -} // namespace paddle_mobile +} // namespace proto +} // namespace framework +} // namespace paddle_mobile // @@protoc_insertion_point(global_scope) diff --git a/src/framework/framework.pb.h b/src/framework/framework.pb.h index 656437a663..585c05ef8c 100644 --- a/src/framework/framework.pb.h +++ b/src/framework/framework.pb.h @@ -21,14 +21,14 @@ #include #include -#include // IWYU pragma: export +#include // IWYU pragma: export #include #include #include #include #include #include -#include // IWYU pragma: export +#include // IWYU pragma: export // @@protoc_insertion_point(includes) namespace paddle_mobile { namespace framework { @@ -86,9 +86,9 @@ extern VarType_TensorDescDefaultTypeInternal class VarType_Tuple; class VarType_TupleDefaultTypeInternal; extern VarType_TupleDefaultTypeInternal _VarType_Tuple_default_instance_; -} // namespace proto -} // namespace framework -} // namespace paddle_mobile +} // namespace proto +} // namespace framework +} // namespace paddle_mobile namespace paddle_mobile { namespace framework { @@ -108,7 +108,7 @@ struct TableStruct { }; void AddDescriptors(); void InitDefaults(); -} // namespace protobuf_framework_2eproto +} // namespace protobuf_framework_2eproto enum VarType_Type { VarType_Type_BOOL = 0, @@ -160,79 +160,80 @@ class OpDesc_Attr MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc.Attr) */ { - public: +public: 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); return *this; } #if LANG_CXX11 - OpDesc_Attr(OpDesc_Attr&& from) noexcept : OpDesc_Attr() { + OpDesc_Attr(OpDesc_Attr &&from) noexcept : OpDesc_Attr() { *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 (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast( + static inline const OpDesc_Attr *internal_default_instance() { + return reinterpret_cast( &_OpDesc_Attr_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 0; - void Swap(OpDesc_Attr* other); - friend void swap(OpDesc_Attr& a, OpDesc_Attr& b) { a.Swap(&b); } + void Swap(OpDesc_Attr *other); + friend void swap(OpDesc_Attr &a, OpDesc_Attr &b) { a.Swap(&b); } // 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) + OpDesc_Attr *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from) PROTOBUF_FINAL; - void CopyFrom(const OpDesc_Attr& from); - void MergeFrom(const OpDesc_Attr& from); + void CopyFrom(const OpDesc_Attr &from); + void MergeFrom(const OpDesc_Attr &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(OpDesc_Attr* other); + void InternalSwap(OpDesc_Attr *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -246,9 +247,9 @@ class OpDesc_Attr ::google::protobuf::int32 ints(int index) const; void set_ints(int index, ::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>* mutable_ints(); + const ::google::protobuf::RepeatedField<::google::protobuf::int32> & + ints() const; + ::google::protobuf::RepeatedField<::google::protobuf::int32> *mutable_ints(); // repeated float floats = 7; int floats_size() const; @@ -257,30 +258,30 @@ class OpDesc_Attr float floats(int index) const; void set_floats(int index, float value); void add_floats(float value); - const ::google::protobuf::RepeatedField& floats() const; - ::google::protobuf::RepeatedField* mutable_floats(); + const ::google::protobuf::RepeatedField &floats() const; + ::google::protobuf::RepeatedField *mutable_floats(); // repeated string strings = 8; int strings_size() const; void clear_strings(); static const int kStringsFieldNumber = 8; - const ::std::string& strings(int index) const; - ::std::string* mutable_strings(int index); - void set_strings(int index, const ::std::string& value); + const ::std::string &strings(int index) const; + ::std::string *mutable_strings(int index); + void set_strings(int index, const ::std::string &value); #if LANG_CXX11 - void set_strings(int index, ::std::string&& value); + void set_strings(int index, ::std::string &&value); #endif - void set_strings(int index, const char* value); - void set_strings(int index, const char* value, size_t size); - ::std::string* add_strings(); - void add_strings(const ::std::string& value); + void set_strings(int index, const char *value); + void set_strings(int index, const char *value, size_t size); + ::std::string *add_strings(); + void add_strings(const ::std::string &value); #if LANG_CXX11 - void add_strings(::std::string&& value); + void add_strings(::std::string &&value); #endif - void add_strings(const char* value); - void add_strings(const char* value, size_t size); - const ::google::protobuf::RepeatedPtrField<::std::string>& strings() const; - ::google::protobuf::RepeatedPtrField<::std::string>* mutable_strings(); + void add_strings(const char *value); + void add_strings(const char *value, size_t size); + const ::google::protobuf::RepeatedPtrField<::std::string> &strings() const; + ::google::protobuf::RepeatedPtrField<::std::string> *mutable_strings(); // repeated bool bools = 11; int bools_size() const; @@ -289,38 +290,38 @@ class OpDesc_Attr bool bools(int index) const; void set_bools(int index, bool value); void add_bools(bool value); - const ::google::protobuf::RepeatedField& bools() const; - ::google::protobuf::RepeatedField* mutable_bools(); + const ::google::protobuf::RepeatedField &bools() const; + ::google::protobuf::RepeatedField *mutable_bools(); // required string name = 1; bool has_name() const; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); + const ::std::string &name() const; + void set_name(const ::std::string &value); #if LANG_CXX11 - void set_name(::std::string&& value); + void set_name(::std::string &&value); #endif - void set_name(const char* value); - void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + void set_name(const char *value); + void set_name(const char *value, size_t size); + ::std::string *mutable_name(); + ::std::string *release_name(); + void set_allocated_name(::std::string *name); // optional string s = 5; bool has_s() const; void clear_s(); static const int kSFieldNumber = 5; - const ::std::string& s() const; - void set_s(const ::std::string& value); + const ::std::string &s() const; + void set_s(const ::std::string &value); #if LANG_CXX11 - void set_s(::std::string&& value); + void set_s(::std::string &&value); #endif - void set_s(const char* value); - void set_s(const char* value, size_t size); - ::std::string* mutable_s(); - ::std::string* release_s(); - void set_allocated_s(::std::string* s); + void set_s(const char *value); + void set_s(const char *value, size_t size); + ::std::string *mutable_s(); + ::std::string *release_s(); + void set_allocated_s(::std::string *s); // required .paddle_mobile.framework.proto.AttrType type = 2; bool has_type() const; @@ -365,7 +366,7 @@ class OpDesc_Attr void set_block_idx(::google::protobuf::int32 value); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc.Attr) - private: +private: void set_has_name(); void clear_has_name(); void set_has_type(); @@ -411,78 +412,79 @@ class OpDesc_Var MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc.Var) */ { - public: +public: 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); return *this; } #if LANG_CXX11 - OpDesc_Var(OpDesc_Var&& from) noexcept : OpDesc_Var() { + OpDesc_Var(OpDesc_Var &&from) noexcept : OpDesc_Var() { *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 (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast(&_OpDesc_Var_default_instance_); + static inline const OpDesc_Var *internal_default_instance() { + return reinterpret_cast(&_OpDesc_Var_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 1; - void Swap(OpDesc_Var* other); - friend void swap(OpDesc_Var& a, OpDesc_Var& b) { a.Swap(&b); } + void Swap(OpDesc_Var *other); + friend void swap(OpDesc_Var &a, OpDesc_Var &b) { a.Swap(&b); } // 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) + OpDesc_Var *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from) PROTOBUF_FINAL; - void CopyFrom(const OpDesc_Var& from); - void MergeFrom(const OpDesc_Var& from); + void CopyFrom(const OpDesc_Var &from); + void MergeFrom(const OpDesc_Var &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(OpDesc_Var* other); + void InternalSwap(OpDesc_Var *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -493,41 +495,41 @@ class OpDesc_Var int arguments_size() const; void clear_arguments(); static const int kArgumentsFieldNumber = 2; - const ::std::string& arguments(int index) const; - ::std::string* mutable_arguments(int index); - void set_arguments(int index, const ::std::string& value); + const ::std::string &arguments(int index) const; + ::std::string *mutable_arguments(int index); + void set_arguments(int index, const ::std::string &value); #if LANG_CXX11 - void set_arguments(int index, ::std::string&& value); + void set_arguments(int index, ::std::string &&value); #endif - void set_arguments(int index, const char* value); - void set_arguments(int index, const char* value, size_t size); - ::std::string* add_arguments(); - void add_arguments(const ::std::string& value); + void set_arguments(int index, const char *value); + void set_arguments(int index, const char *value, size_t size); + ::std::string *add_arguments(); + void add_arguments(const ::std::string &value); #if LANG_CXX11 - void add_arguments(::std::string&& value); + void add_arguments(::std::string &&value); #endif - void add_arguments(const char* value); - void add_arguments(const char* value, size_t size); - const ::google::protobuf::RepeatedPtrField<::std::string>& arguments() const; - ::google::protobuf::RepeatedPtrField<::std::string>* mutable_arguments(); + void add_arguments(const char *value); + void add_arguments(const char *value, size_t size); + const ::google::protobuf::RepeatedPtrField<::std::string> &arguments() const; + ::google::protobuf::RepeatedPtrField<::std::string> *mutable_arguments(); // required string parameter = 1; bool has_parameter() const; void clear_parameter(); static const int kParameterFieldNumber = 1; - const ::std::string& parameter() const; - void set_parameter(const ::std::string& value); + const ::std::string ¶meter() const; + void set_parameter(const ::std::string &value); #if LANG_CXX11 - void set_parameter(::std::string&& value); + void set_parameter(::std::string &&value); #endif - void set_parameter(const char* value); - void set_parameter(const char* value, size_t size); - ::std::string* mutable_parameter(); - ::std::string* release_parameter(); - void set_allocated_parameter(::std::string* parameter); + void set_parameter(const char *value); + void set_parameter(const char *value, size_t size); + ::std::string *mutable_parameter(); + ::std::string *release_parameter(); + void set_allocated_parameter(::std::string *parameter); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc.Var) - private: +private: void set_has_parameter(); void clear_has_parameter(); @@ -546,76 +548,77 @@ class OpDesc MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc) */ { - public: +public: 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); return *this; } #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 (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast(&_OpDesc_default_instance_); + static inline const OpDesc *internal_default_instance() { + return reinterpret_cast(&_OpDesc_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 2; - void Swap(OpDesc* other); - friend void swap(OpDesc& a, OpDesc& b) { a.Swap(&b); } + void Swap(OpDesc *other); + friend void swap(OpDesc &a, OpDesc &b) { a.Swap(&b); } // 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) + OpDesc *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from) PROTOBUF_FINAL; - void CopyFrom(const OpDesc& from); - void MergeFrom(const OpDesc& from); + void CopyFrom(const OpDesc &from); + void MergeFrom(const OpDesc &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(OpDesc* other); + void InternalSwap(OpDesc *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -629,58 +632,58 @@ class OpDesc int inputs_size() const; void clear_inputs(); static const int kInputsFieldNumber = 1; - 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* add_inputs(); + 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 *add_inputs(); ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Var>* + ::paddle_mobile::framework::proto::OpDesc_Var> * mutable_inputs(); const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Var>& + ::paddle_mobile::framework::proto::OpDesc_Var> & inputs() const; // repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2; int outputs_size() const; void clear_outputs(); static const int kOutputsFieldNumber = 2; - 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* add_outputs(); + 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 *add_outputs(); ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Var>* + ::paddle_mobile::framework::proto::OpDesc_Var> * mutable_outputs(); const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Var>& + ::paddle_mobile::framework::proto::OpDesc_Var> & outputs() const; // repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4; int attrs_size() const; void clear_attrs(); static const int kAttrsFieldNumber = 4; - 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* add_attrs(); + 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 *add_attrs(); ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Attr>* + ::paddle_mobile::framework::proto::OpDesc_Attr> * mutable_attrs(); const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Attr>& + ::paddle_mobile::framework::proto::OpDesc_Attr> & attrs() const; // required string type = 3; bool has_type() const; void clear_type(); static const int kTypeFieldNumber = 3; - const ::std::string& type() const; - void set_type(const ::std::string& value); + const ::std::string &type() const; + void set_type(const ::std::string &value); #if LANG_CXX11 - void set_type(::std::string&& value); + void set_type(::std::string &&value); #endif - void set_type(const char* value); - void set_type(const char* value, size_t size); - ::std::string* mutable_type(); - ::std::string* release_type(); - void set_allocated_type(::std::string* type); + void set_type(const char *value); + void set_type(const char *value, size_t size); + ::std::string *mutable_type(); + ::std::string *release_type(); + void set_allocated_type(::std::string *type); // optional bool is_target = 5 [default = false]; bool has_is_target() const; @@ -690,7 +693,7 @@ class OpDesc void set_is_target(bool value); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc) - private: +private: void set_has_type(); void clear_has_type(); void set_has_is_target(); @@ -720,79 +723,80 @@ class OpProto_Var MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto.Var) */ { - public: +public: 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); return *this; } #if LANG_CXX11 - OpProto_Var(OpProto_Var&& from) noexcept : OpProto_Var() { + OpProto_Var(OpProto_Var &&from) noexcept : OpProto_Var() { *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 (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast( + static inline const OpProto_Var *internal_default_instance() { + return reinterpret_cast( &_OpProto_Var_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 3; - void Swap(OpProto_Var* other); - friend void swap(OpProto_Var& a, OpProto_Var& b) { a.Swap(&b); } + void Swap(OpProto_Var *other); + friend void swap(OpProto_Var &a, OpProto_Var &b) { a.Swap(&b); } // 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) + OpProto_Var *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from) PROTOBUF_FINAL; - void CopyFrom(const OpProto_Var& from); - void MergeFrom(const OpProto_Var& from); + void CopyFrom(const OpProto_Var &from); + void MergeFrom(const OpProto_Var &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(OpProto_Var* other); + void InternalSwap(OpProto_Var *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -803,31 +807,31 @@ class OpProto_Var bool has_name() const; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); + const ::std::string &name() const; + void set_name(const ::std::string &value); #if LANG_CXX11 - void set_name(::std::string&& value); + void set_name(::std::string &&value); #endif - void set_name(const char* value); - void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + void set_name(const char *value); + void set_name(const char *value, size_t size); + ::std::string *mutable_name(); + ::std::string *release_name(); + void set_allocated_name(::std::string *name); // required string comment = 2; bool has_comment() const; void clear_comment(); static const int kCommentFieldNumber = 2; - const ::std::string& comment() const; - void set_comment(const ::std::string& value); + const ::std::string &comment() const; + void set_comment(const ::std::string &value); #if LANG_CXX11 - void set_comment(::std::string&& value); + void set_comment(::std::string &&value); #endif - void set_comment(const char* value); - void set_comment(const char* value, size_t size); - ::std::string* mutable_comment(); - ::std::string* release_comment(); - void set_allocated_comment(::std::string* comment); + void set_comment(const char *value); + void set_comment(const char *value, size_t size); + ::std::string *mutable_comment(); + ::std::string *release_comment(); + void set_allocated_comment(::std::string *comment); // optional bool duplicable = 3 [default = false]; bool has_duplicable() const; @@ -851,7 +855,7 @@ class OpProto_Var void set_dispensable(bool value); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto.Var) - private: +private: void set_has_name(); void clear_has_name(); void set_has_comment(); @@ -884,79 +888,80 @@ class OpProto_Attr MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto.Attr) */ { - public: +public: 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); return *this; } #if LANG_CXX11 - OpProto_Attr(OpProto_Attr&& from) noexcept : OpProto_Attr() { + OpProto_Attr(OpProto_Attr &&from) noexcept : OpProto_Attr() { *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 (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast( + static inline const OpProto_Attr *internal_default_instance() { + return reinterpret_cast( &_OpProto_Attr_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 4; - void Swap(OpProto_Attr* other); - friend void swap(OpProto_Attr& a, OpProto_Attr& b) { a.Swap(&b); } + void Swap(OpProto_Attr *other); + friend void swap(OpProto_Attr &a, OpProto_Attr &b) { a.Swap(&b); } // 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) + OpProto_Attr *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from) PROTOBUF_FINAL; - void CopyFrom(const OpProto_Attr& from); - void MergeFrom(const OpProto_Attr& from); + void CopyFrom(const OpProto_Attr &from); + void MergeFrom(const OpProto_Attr &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(OpProto_Attr* other); + void InternalSwap(OpProto_Attr *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -967,31 +972,31 @@ class OpProto_Attr bool has_name() const; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); + const ::std::string &name() const; + void set_name(const ::std::string &value); #if LANG_CXX11 - void set_name(::std::string&& value); + void set_name(::std::string &&value); #endif - void set_name(const char* value); - void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + void set_name(const char *value); + void set_name(const char *value, size_t size); + ::std::string *mutable_name(); + ::std::string *release_name(); + void set_allocated_name(::std::string *name); // required string comment = 3; bool has_comment() const; void clear_comment(); static const int kCommentFieldNumber = 3; - const ::std::string& comment() const; - void set_comment(const ::std::string& value); + const ::std::string &comment() const; + void set_comment(const ::std::string &value); #if LANG_CXX11 - void set_comment(::std::string&& value); + void set_comment(::std::string &&value); #endif - void set_comment(const char* value); - void set_comment(const char* value, size_t size); - ::std::string* mutable_comment(); - ::std::string* release_comment(); - void set_allocated_comment(::std::string* comment); + void set_comment(const char *value); + void set_comment(const char *value, size_t size); + ::std::string *mutable_comment(); + ::std::string *release_comment(); + void set_allocated_comment(::std::string *comment); // required .paddle_mobile.framework.proto.AttrType type = 2; bool has_type() const; @@ -1008,7 +1013,7 @@ class OpProto_Attr void set_generated(bool value); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto.Attr) - private: +private: void set_has_name(); void clear_has_name(); void set_has_type(); @@ -1038,76 +1043,77 @@ class OpProto MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto) */ { - public: +public: 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); return *this; } #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 (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast(&_OpProto_default_instance_); + static inline const OpProto *internal_default_instance() { + return reinterpret_cast(&_OpProto_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 5; - void Swap(OpProto* other); - friend void swap(OpProto& a, OpProto& b) { a.Swap(&b); } + void Swap(OpProto *other); + friend void swap(OpProto &a, OpProto &b) { a.Swap(&b); } // 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) + OpProto *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from) PROTOBUF_FINAL; - void CopyFrom(const OpProto& from); - void MergeFrom(const OpProto& from); + void CopyFrom(const OpProto &from); + void MergeFrom(const OpProto &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(OpProto* other); + void InternalSwap(OpProto *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -1121,77 +1127,77 @@ class OpProto int inputs_size() const; void clear_inputs(); static const int kInputsFieldNumber = 2; - 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* add_inputs(); + 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 *add_inputs(); ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Var>* + ::paddle_mobile::framework::proto::OpProto_Var> * mutable_inputs(); const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Var>& + ::paddle_mobile::framework::proto::OpProto_Var> & inputs() const; // repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3; int outputs_size() const; void clear_outputs(); static const int kOutputsFieldNumber = 3; - const ::paddle_mobile::framework::proto::OpProto_Var& outputs( - int index) const; - ::paddle_mobile::framework::proto::OpProto_Var* mutable_outputs(int index); - ::paddle_mobile::framework::proto::OpProto_Var* add_outputs(); + const ::paddle_mobile::framework::proto::OpProto_Var & + outputs(int index) const; + ::paddle_mobile::framework::proto::OpProto_Var *mutable_outputs(int index); + ::paddle_mobile::framework::proto::OpProto_Var *add_outputs(); ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Var>* + ::paddle_mobile::framework::proto::OpProto_Var> * mutable_outputs(); const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Var>& + ::paddle_mobile::framework::proto::OpProto_Var> & outputs() const; // repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4; int attrs_size() const; void clear_attrs(); static const int kAttrsFieldNumber = 4; - 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* add_attrs(); + 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 *add_attrs(); ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Attr>* + ::paddle_mobile::framework::proto::OpProto_Attr> * mutable_attrs(); const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Attr>& + ::paddle_mobile::framework::proto::OpProto_Attr> & attrs() const; // required string type = 1; bool has_type() const; void clear_type(); static const int kTypeFieldNumber = 1; - const ::std::string& type() const; - void set_type(const ::std::string& value); + const ::std::string &type() const; + void set_type(const ::std::string &value); #if LANG_CXX11 - void set_type(::std::string&& value); + void set_type(::std::string &&value); #endif - void set_type(const char* value); - void set_type(const char* value, size_t size); - ::std::string* mutable_type(); - ::std::string* release_type(); - void set_allocated_type(::std::string* type); + void set_type(const char *value); + void set_type(const char *value, size_t size); + ::std::string *mutable_type(); + ::std::string *release_type(); + void set_allocated_type(::std::string *type); // required string comment = 5; bool has_comment() const; void clear_comment(); static const int kCommentFieldNumber = 5; - const ::std::string& comment() const; - void set_comment(const ::std::string& value); + const ::std::string &comment() const; + void set_comment(const ::std::string &value); #if LANG_CXX11 - void set_comment(::std::string&& value); + void set_comment(::std::string &&value); #endif - void set_comment(const char* value); - void set_comment(const char* value, size_t size); - ::std::string* mutable_comment(); - ::std::string* release_comment(); - void set_allocated_comment(::std::string* comment); + void set_comment(const char *value); + void set_comment(const char *value, size_t size); + ::std::string *mutable_comment(); + ::std::string *release_comment(); + void set_allocated_comment(::std::string *comment); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto) - private: +private: void set_has_type(); void clear_has_type(); void set_has_comment(); @@ -1224,81 +1230,82 @@ class VarType_TensorDesc MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.TensorDesc) */ { - public: +public: 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); return *this; } #if LANG_CXX11 - VarType_TensorDesc(VarType_TensorDesc&& from) noexcept + VarType_TensorDesc(VarType_TensorDesc &&from) noexcept : VarType_TensorDesc() { *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 (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast( + static inline const VarType_TensorDesc *internal_default_instance() { + return reinterpret_cast( &_VarType_TensorDesc_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 6; - void Swap(VarType_TensorDesc* other); - friend void swap(VarType_TensorDesc& a, VarType_TensorDesc& b) { a.Swap(&b); } + void Swap(VarType_TensorDesc *other); + friend void swap(VarType_TensorDesc &a, VarType_TensorDesc &b) { a.Swap(&b); } // 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) - PROTOBUF_FINAL; - void CopyFrom(const VarType_TensorDesc& from); - void MergeFrom(const VarType_TensorDesc& from); + void CopyFrom(const VarType_TensorDesc &from); + void MergeFrom(const VarType_TensorDesc &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(VarType_TensorDesc* other); + void InternalSwap(VarType_TensorDesc *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -1312,9 +1319,9 @@ class VarType_TensorDesc ::google::protobuf::int64 dims(int index) const; void set_dims(int index, ::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>* mutable_dims(); + const ::google::protobuf::RepeatedField<::google::protobuf::int64> & + dims() const; + ::google::protobuf::RepeatedField<::google::protobuf::int64> *mutable_dims(); // required .paddle_mobile.framework.proto.VarType.Type data_type = 1; bool has_data_type() const; @@ -1324,7 +1331,7 @@ class VarType_TensorDesc void set_data_type(::paddle_mobile::framework::proto::VarType_Type value); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.TensorDesc) - private: +private: void set_has_data_type(); void clear_has_data_type(); @@ -1343,84 +1350,85 @@ class VarType_LoDTensorDesc MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.LoDTensorDesc) */ { - public: +public: 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); return *this; } #if LANG_CXX11 - VarType_LoDTensorDesc(VarType_LoDTensorDesc&& from) noexcept + VarType_LoDTensorDesc(VarType_LoDTensorDesc &&from) noexcept : VarType_LoDTensorDesc() { *this = ::std::move(from); } - inline VarType_LoDTensorDesc& operator=( - VarType_LoDTensorDesc&& from) noexcept { + inline VarType_LoDTensorDesc & + operator=(VarType_LoDTensorDesc &&from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast( + static inline const VarType_LoDTensorDesc *internal_default_instance() { + return reinterpret_cast( &_VarType_LoDTensorDesc_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 7; - void Swap(VarType_LoDTensorDesc* other); - friend void swap(VarType_LoDTensorDesc& a, VarType_LoDTensorDesc& b) { + void Swap(VarType_LoDTensorDesc *other); + friend void swap(VarType_LoDTensorDesc &a, VarType_LoDTensorDesc &b) { a.Swap(&b); } // 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 - PROTOBUF_FINAL; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) + VarType_LoDTensorDesc * + New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from) PROTOBUF_FINAL; - void CopyFrom(const VarType_LoDTensorDesc& from); - void MergeFrom(const VarType_LoDTensorDesc& from); + void CopyFrom(const VarType_LoDTensorDesc &from); + void MergeFrom(const VarType_LoDTensorDesc &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(VarType_LoDTensorDesc* other); + void InternalSwap(VarType_LoDTensorDesc *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -1431,11 +1439,11 @@ class VarType_LoDTensorDesc bool has_tensor() const; void clear_tensor(); static const int kTensorFieldNumber = 1; - const ::paddle_mobile::framework::proto::VarType_TensorDesc& tensor() const; - ::paddle_mobile::framework::proto::VarType_TensorDesc* mutable_tensor(); - ::paddle_mobile::framework::proto::VarType_TensorDesc* release_tensor(); + const ::paddle_mobile::framework::proto::VarType_TensorDesc &tensor() const; + ::paddle_mobile::framework::proto::VarType_TensorDesc *mutable_tensor(); + ::paddle_mobile::framework::proto::VarType_TensorDesc *release_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]; bool has_lod_level() const; @@ -1445,7 +1453,7 @@ class VarType_LoDTensorDesc void set_lod_level(::google::protobuf::int32 value); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.LoDTensorDesc) - private: +private: void set_has_tensor(); void clear_has_tensor(); void set_has_lod_level(); @@ -1455,7 +1463,7 @@ class VarType_LoDTensorDesc _internal_metadata_; ::google::protobuf::internal::HasBits<1> _has_bits_; mutable int _cached_size_; - ::paddle_mobile::framework::proto::VarType_TensorDesc* tensor_; + ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor_; ::google::protobuf::int32 lod_level_; friend struct protobuf_framework_2eproto::TableStruct; }; @@ -1466,88 +1474,89 @@ class VarType_LoDTensorArrayDesc MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc) */ { - public: +public: VarType_LoDTensorArrayDesc(); virtual ~VarType_LoDTensorArrayDesc(); - VarType_LoDTensorArrayDesc(const VarType_LoDTensorArrayDesc& from); + VarType_LoDTensorArrayDesc(const VarType_LoDTensorArrayDesc &from); - inline VarType_LoDTensorArrayDesc& operator=( - const VarType_LoDTensorArrayDesc& from) { + inline VarType_LoDTensorArrayDesc & + operator=(const VarType_LoDTensorArrayDesc &from) { CopyFrom(from); return *this; } #if LANG_CXX11 - VarType_LoDTensorArrayDesc(VarType_LoDTensorArrayDesc&& from) noexcept + VarType_LoDTensorArrayDesc(VarType_LoDTensorArrayDesc &&from) noexcept : VarType_LoDTensorArrayDesc() { *this = ::std::move(from); } - inline VarType_LoDTensorArrayDesc& operator=( - VarType_LoDTensorArrayDesc&& from) noexcept { + inline VarType_LoDTensorArrayDesc & + operator=(VarType_LoDTensorArrayDesc &&from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast( + static inline const VarType_LoDTensorArrayDesc *internal_default_instance() { + return reinterpret_cast( &_VarType_LoDTensorArrayDesc_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 8; - void Swap(VarType_LoDTensorArrayDesc* other); - friend void swap(VarType_LoDTensorArrayDesc& a, - VarType_LoDTensorArrayDesc& b) { + void Swap(VarType_LoDTensorArrayDesc *other); + friend void swap(VarType_LoDTensorArrayDesc &a, + VarType_LoDTensorArrayDesc &b) { a.Swap(&b); } // implements Message ---------------------------------------------- - inline VarType_LoDTensorArrayDesc* New() const PROTOBUF_FINAL { + inline VarType_LoDTensorArrayDesc *New() const PROTOBUF_FINAL { 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) - PROTOBUF_FINAL; - void CopyFrom(const VarType_LoDTensorArrayDesc& from); - void MergeFrom(const VarType_LoDTensorArrayDesc& from); + void CopyFrom(const VarType_LoDTensorArrayDesc &from); + void MergeFrom(const VarType_LoDTensorArrayDesc &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(VarType_LoDTensorArrayDesc* other); + void InternalSwap(VarType_LoDTensorArrayDesc *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -1558,11 +1567,11 @@ class VarType_LoDTensorArrayDesc bool has_tensor() const; void clear_tensor(); static const int kTensorFieldNumber = 1; - const ::paddle_mobile::framework::proto::VarType_TensorDesc& tensor() const; - ::paddle_mobile::framework::proto::VarType_TensorDesc* mutable_tensor(); - ::paddle_mobile::framework::proto::VarType_TensorDesc* release_tensor(); + const ::paddle_mobile::framework::proto::VarType_TensorDesc &tensor() const; + ::paddle_mobile::framework::proto::VarType_TensorDesc *mutable_tensor(); + ::paddle_mobile::framework::proto::VarType_TensorDesc *release_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]; bool has_lod_level() const; @@ -1572,7 +1581,7 @@ class VarType_LoDTensorArrayDesc void set_lod_level(::google::protobuf::int32 value); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc) - private: +private: void set_has_tensor(); void clear_has_tensor(); void set_has_lod_level(); @@ -1582,7 +1591,7 @@ class VarType_LoDTensorArrayDesc _internal_metadata_; ::google::protobuf::internal::HasBits<1> _has_bits_; mutable int _cached_size_; - ::paddle_mobile::framework::proto::VarType_TensorDesc* tensor_; + ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor_; ::google::protobuf::int32 lod_level_; friend struct protobuf_framework_2eproto::TableStruct; }; @@ -1593,81 +1602,82 @@ class VarType_ReaderDesc MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.ReaderDesc) */ { - public: +public: 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); return *this; } #if LANG_CXX11 - VarType_ReaderDesc(VarType_ReaderDesc&& from) noexcept + VarType_ReaderDesc(VarType_ReaderDesc &&from) noexcept : VarType_ReaderDesc() { *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 (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast( + static inline const VarType_ReaderDesc *internal_default_instance() { + return reinterpret_cast( &_VarType_ReaderDesc_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 9; - void Swap(VarType_ReaderDesc* other); - friend void swap(VarType_ReaderDesc& a, VarType_ReaderDesc& b) { a.Swap(&b); } + void Swap(VarType_ReaderDesc *other); + friend void swap(VarType_ReaderDesc &a, VarType_ReaderDesc &b) { a.Swap(&b); } // 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 - PROTOBUF_FINAL; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) + VarType_ReaderDesc * + New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from) PROTOBUF_FINAL; - void CopyFrom(const VarType_ReaderDesc& from); - void MergeFrom(const VarType_ReaderDesc& from); + void CopyFrom(const VarType_ReaderDesc &from); + void MergeFrom(const VarType_ReaderDesc &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(VarType_ReaderDesc* other); + void InternalSwap(VarType_ReaderDesc *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -1679,20 +1689,20 @@ class VarType_ReaderDesc int lod_tensor_size() const; void clear_lod_tensor(); static const int kLodTensorFieldNumber = 1; - const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc& lod_tensor( - int index) const; - ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* mutable_lod_tensor( - int index); - ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* add_lod_tensor(); + const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc & + lod_tensor(int index) const; + ::paddle_mobile::framework::proto::VarType_LoDTensorDesc * + mutable_lod_tensor(int index); + ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *add_lod_tensor(); ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::VarType_LoDTensorDesc>* + ::paddle_mobile::framework::proto::VarType_LoDTensorDesc> * mutable_lod_tensor(); const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::VarType_LoDTensorDesc>& + ::paddle_mobile::framework::proto::VarType_LoDTensorDesc> & lod_tensor() const; // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.ReaderDesc) - private: +private: ::google::protobuf::internal::InternalMetadataWithArenaLite _internal_metadata_; ::google::protobuf::internal::HasBits<1> _has_bits_; @@ -1709,83 +1719,84 @@ class VarType_ChannelDesc MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.ChannelDesc) */ { - public: +public: 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); return *this; } #if LANG_CXX11 - VarType_ChannelDesc(VarType_ChannelDesc&& from) noexcept + VarType_ChannelDesc(VarType_ChannelDesc &&from) noexcept : VarType_ChannelDesc() { *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 (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast( + static inline const VarType_ChannelDesc *internal_default_instance() { + return reinterpret_cast( &_VarType_ChannelDesc_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 10; - void Swap(VarType_ChannelDesc* other); - friend void swap(VarType_ChannelDesc& a, VarType_ChannelDesc& b) { + void Swap(VarType_ChannelDesc *other); + friend void swap(VarType_ChannelDesc &a, VarType_ChannelDesc &b) { a.Swap(&b); } // 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) - PROTOBUF_FINAL; - void CopyFrom(const VarType_ChannelDesc& from); - void MergeFrom(const VarType_ChannelDesc& from); + void CopyFrom(const VarType_ChannelDesc &from); + void MergeFrom(const VarType_ChannelDesc &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(VarType_ChannelDesc* other); + void InternalSwap(VarType_ChannelDesc *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -1807,7 +1818,7 @@ class VarType_ChannelDesc void set_data_type(::paddle_mobile::framework::proto::VarType_Type value); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.ChannelDesc) - private: +private: void set_has_data_type(); void clear_has_data_type(); void set_has_capacity(); @@ -1831,79 +1842,80 @@ class VarType_Tuple MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.Tuple) */ { - public: +public: 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); return *this; } #if LANG_CXX11 - VarType_Tuple(VarType_Tuple&& from) noexcept : VarType_Tuple() { + VarType_Tuple(VarType_Tuple &&from) noexcept : VarType_Tuple() { *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 (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast( + static inline const VarType_Tuple *internal_default_instance() { + return reinterpret_cast( &_VarType_Tuple_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 11; - void Swap(VarType_Tuple* other); - friend void swap(VarType_Tuple& a, VarType_Tuple& b) { a.Swap(&b); } + void Swap(VarType_Tuple *other); + friend void swap(VarType_Tuple &a, VarType_Tuple &b) { a.Swap(&b); } // 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) + VarType_Tuple *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from) PROTOBUF_FINAL; - void CopyFrom(const VarType_Tuple& from); - void MergeFrom(const VarType_Tuple& from); + void CopyFrom(const VarType_Tuple &from); + void MergeFrom(const VarType_Tuple &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(VarType_Tuple* other); + void InternalSwap(VarType_Tuple *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -1918,11 +1930,11 @@ class VarType_Tuple void set_element_type(int index, ::paddle_mobile::framework::proto::VarType_Type value); void add_element_type(::paddle_mobile::framework::proto::VarType_Type value); - const ::google::protobuf::RepeatedField& element_type() const; - ::google::protobuf::RepeatedField* mutable_element_type(); + const ::google::protobuf::RepeatedField &element_type() const; + ::google::protobuf::RepeatedField *mutable_element_type(); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.Tuple) - private: +private: ::google::protobuf::internal::InternalMetadataWithArenaLite _internal_metadata_; ::google::protobuf::internal::HasBits<1> _has_bits_; @@ -1937,76 +1949,77 @@ class VarType MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType) */ { - public: +public: 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); return *this; } #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 (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast(&_VarType_default_instance_); + static inline const VarType *internal_default_instance() { + return reinterpret_cast(&_VarType_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 12; - void Swap(VarType* other); - friend void swap(VarType& a, VarType& b) { a.Swap(&b); } + void Swap(VarType *other); + friend void swap(VarType &a, VarType &b) { a.Swap(&b); } // 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) + VarType *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from) PROTOBUF_FINAL; - void CopyFrom(const VarType& from); - void MergeFrom(const VarType& from); + void CopyFrom(const VarType &from); + void MergeFrom(const VarType &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(VarType* other); + void InternalSwap(VarType *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -2052,73 +2065,73 @@ class VarType bool has_selected_rows() const; void clear_selected_rows(); static const int kSelectedRowsFieldNumber = 2; - const ::paddle_mobile::framework::proto::VarType_TensorDesc& selected_rows() - const; - ::paddle_mobile::framework::proto::VarType_TensorDesc* + const ::paddle_mobile::framework::proto::VarType_TensorDesc & + selected_rows() const; + ::paddle_mobile::framework::proto::VarType_TensorDesc * mutable_selected_rows(); - ::paddle_mobile::framework::proto::VarType_TensorDesc* + ::paddle_mobile::framework::proto::VarType_TensorDesc * release_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 = // 3; bool has_lod_tensor() const; void clear_lod_tensor(); static const int kLodTensorFieldNumber = 3; - const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc& lod_tensor() - const; - ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* + const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc & + lod_tensor() const; + ::paddle_mobile::framework::proto::VarType_LoDTensorDesc * mutable_lod_tensor(); - ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* + ::paddle_mobile::framework::proto::VarType_LoDTensorDesc * release_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 // tensor_array = 4; bool has_tensor_array() const; void clear_tensor_array(); static const int kTensorArrayFieldNumber = 4; - const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc& + const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc & tensor_array() const; - ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* + ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc * mutable_tensor_array(); - ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* + ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc * release_tensor_array(); void set_allocated_tensor_array( - ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* - tensor_array); + ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc + *tensor_array); // optional .paddle_mobile.framework.proto.VarType.ReaderDesc reader = 5; bool has_reader() const; void clear_reader(); static const int kReaderFieldNumber = 5; - const ::paddle_mobile::framework::proto::VarType_ReaderDesc& reader() const; - ::paddle_mobile::framework::proto::VarType_ReaderDesc* mutable_reader(); - ::paddle_mobile::framework::proto::VarType_ReaderDesc* release_reader(); + const ::paddle_mobile::framework::proto::VarType_ReaderDesc &reader() const; + ::paddle_mobile::framework::proto::VarType_ReaderDesc *mutable_reader(); + ::paddle_mobile::framework::proto::VarType_ReaderDesc *release_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; bool has_channel() const; void clear_channel(); static const int kChannelFieldNumber = 6; - const ::paddle_mobile::framework::proto::VarType_ChannelDesc& channel() const; - ::paddle_mobile::framework::proto::VarType_ChannelDesc* mutable_channel(); - ::paddle_mobile::framework::proto::VarType_ChannelDesc* release_channel(); + const ::paddle_mobile::framework::proto::VarType_ChannelDesc &channel() const; + ::paddle_mobile::framework::proto::VarType_ChannelDesc *mutable_channel(); + ::paddle_mobile::framework::proto::VarType_ChannelDesc *release_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; bool has_tuple() const; void clear_tuple(); static const int kTupleFieldNumber = 7; - const ::paddle_mobile::framework::proto::VarType_Tuple& tuple() const; - ::paddle_mobile::framework::proto::VarType_Tuple* mutable_tuple(); - ::paddle_mobile::framework::proto::VarType_Tuple* release_tuple(); - void set_allocated_tuple( - ::paddle_mobile::framework::proto::VarType_Tuple* tuple); + const ::paddle_mobile::framework::proto::VarType_Tuple &tuple() const; + ::paddle_mobile::framework::proto::VarType_Tuple *mutable_tuple(); + ::paddle_mobile::framework::proto::VarType_Tuple *release_tuple(); + void + set_allocated_tuple(::paddle_mobile::framework::proto::VarType_Tuple *tuple); // required .paddle_mobile.framework.proto.VarType.Type type = 1; bool has_type() const; @@ -2128,7 +2141,7 @@ class VarType void set_type(::paddle_mobile::framework::proto::VarType_Type value); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType) - private: +private: void set_has_type(); void clear_has_type(); void set_has_selected_rows(); @@ -2148,12 +2161,12 @@ class VarType _internal_metadata_; ::google::protobuf::internal::HasBits<1> _has_bits_; mutable int _cached_size_; - ::paddle_mobile::framework::proto::VarType_TensorDesc* selected_rows_; - ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* lod_tensor_; - ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* tensor_array_; - ::paddle_mobile::framework::proto::VarType_ReaderDesc* reader_; - ::paddle_mobile::framework::proto::VarType_ChannelDesc* channel_; - ::paddle_mobile::framework::proto::VarType_Tuple* tuple_; + ::paddle_mobile::framework::proto::VarType_TensorDesc *selected_rows_; + ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *lod_tensor_; + ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *tensor_array_; + ::paddle_mobile::framework::proto::VarType_ReaderDesc *reader_; + ::paddle_mobile::framework::proto::VarType_ChannelDesc *channel_; + ::paddle_mobile::framework::proto::VarType_Tuple *tuple_; int type_; friend struct protobuf_framework_2eproto::TableStruct; }; @@ -2164,76 +2177,77 @@ class VarDesc MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarDesc) */ { - public: +public: 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); return *this; } #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 (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast(&_VarDesc_default_instance_); + static inline const VarDesc *internal_default_instance() { + return reinterpret_cast(&_VarDesc_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 13; - void Swap(VarDesc* other); - friend void swap(VarDesc& a, VarDesc& b) { a.Swap(&b); } + void Swap(VarDesc *other); + friend void swap(VarDesc &a, VarDesc &b) { a.Swap(&b); } // 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) + VarDesc *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from) PROTOBUF_FINAL; - void CopyFrom(const VarDesc& from); - void MergeFrom(const VarDesc& from); + void CopyFrom(const VarDesc &from); + void MergeFrom(const VarDesc &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(VarDesc* other); + void InternalSwap(VarDesc *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -2244,25 +2258,25 @@ class VarDesc bool has_name() const; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); + const ::std::string &name() const; + void set_name(const ::std::string &value); #if LANG_CXX11 - void set_name(::std::string&& value); + void set_name(::std::string &&value); #endif - void set_name(const char* value); - void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + void set_name(const char *value); + void set_name(const char *value, size_t size); + ::std::string *mutable_name(); + ::std::string *release_name(); + void set_allocated_name(::std::string *name); // required .paddle_mobile.framework.proto.VarType type = 2; bool has_type() const; void clear_type(); static const int kTypeFieldNumber = 2; - const ::paddle_mobile::framework::proto::VarType& type() const; - ::paddle_mobile::framework::proto::VarType* mutable_type(); - ::paddle_mobile::framework::proto::VarType* release_type(); - void set_allocated_type(::paddle_mobile::framework::proto::VarType* type); + const ::paddle_mobile::framework::proto::VarType &type() const; + ::paddle_mobile::framework::proto::VarType *mutable_type(); + ::paddle_mobile::framework::proto::VarType *release_type(); + void set_allocated_type(::paddle_mobile::framework::proto::VarType *type); // optional bool persistable = 3 [default = false]; bool has_persistable() const; @@ -2272,7 +2286,7 @@ class VarDesc void set_persistable(bool value); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarDesc) - private: +private: void set_has_name(); void clear_has_name(); void set_has_type(); @@ -2288,7 +2302,7 @@ class VarDesc ::google::protobuf::internal::HasBits<1> _has_bits_; mutable int _cached_size_; ::google::protobuf::internal::ArenaStringPtr name_; - ::paddle_mobile::framework::proto::VarType* type_; + ::paddle_mobile::framework::proto::VarType *type_; bool persistable_; friend struct protobuf_framework_2eproto::TableStruct; }; @@ -2299,78 +2313,79 @@ class BlockDesc MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.BlockDesc) */ { - public: +public: 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); return *this; } #if LANG_CXX11 - BlockDesc(BlockDesc&& from) noexcept : BlockDesc() { + BlockDesc(BlockDesc &&from) noexcept : BlockDesc() { *this = ::std::move(from); } - inline BlockDesc& operator=(BlockDesc&& from) noexcept { + inline BlockDesc &operator=(BlockDesc &&from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast(&_BlockDesc_default_instance_); + static inline const BlockDesc *internal_default_instance() { + return reinterpret_cast(&_BlockDesc_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 14; - void Swap(BlockDesc* other); - friend void swap(BlockDesc& a, BlockDesc& b) { a.Swap(&b); } + void Swap(BlockDesc *other); + friend void swap(BlockDesc &a, BlockDesc &b) { a.Swap(&b); } // 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) + BlockDesc *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from) PROTOBUF_FINAL; - void CopyFrom(const BlockDesc& from); - void MergeFrom(const BlockDesc& from); + void CopyFrom(const BlockDesc &from); + void MergeFrom(const BlockDesc &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(BlockDesc* other); + void InternalSwap(BlockDesc *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -2381,28 +2396,28 @@ class BlockDesc int vars_size() const; void clear_vars(); static const int kVarsFieldNumber = 3; - const ::paddle_mobile::framework::proto::VarDesc& vars(int index) const; - ::paddle_mobile::framework::proto::VarDesc* mutable_vars(int index); - ::paddle_mobile::framework::proto::VarDesc* add_vars(); + const ::paddle_mobile::framework::proto::VarDesc &vars(int index) const; + ::paddle_mobile::framework::proto::VarDesc *mutable_vars(int index); + ::paddle_mobile::framework::proto::VarDesc *add_vars(); ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::VarDesc>* + ::paddle_mobile::framework::proto::VarDesc> * mutable_vars(); const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::VarDesc>& + ::paddle_mobile::framework::proto::VarDesc> & vars() const; // repeated .paddle_mobile.framework.proto.OpDesc ops = 4; int ops_size() const; void clear_ops(); static const int kOpsFieldNumber = 4; - const ::paddle_mobile::framework::proto::OpDesc& ops(int index) const; - ::paddle_mobile::framework::proto::OpDesc* mutable_ops(int index); - ::paddle_mobile::framework::proto::OpDesc* add_ops(); + const ::paddle_mobile::framework::proto::OpDesc &ops(int index) const; + ::paddle_mobile::framework::proto::OpDesc *mutable_ops(int index); + ::paddle_mobile::framework::proto::OpDesc *add_ops(); ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc>* + ::paddle_mobile::framework::proto::OpDesc> * mutable_ops(); const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc>& + ::paddle_mobile::framework::proto::OpDesc> & ops() const; // required int32 idx = 1; @@ -2427,7 +2442,7 @@ class BlockDesc void set_forward_block_idx(::google::protobuf::int32 value); // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.BlockDesc) - private: +private: void set_has_idx(); void clear_has_idx(); void set_has_parent_idx(); @@ -2460,79 +2475,80 @@ class ProgramDesc MessageLite /* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.ProgramDesc) */ { - public: +public: 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); return *this; } #if LANG_CXX11 - ProgramDesc(ProgramDesc&& from) noexcept : ProgramDesc() { + ProgramDesc(ProgramDesc &&from) noexcept : ProgramDesc() { *this = ::std::move(from); } - inline ProgramDesc& operator=(ProgramDesc&& from) noexcept { + inline ProgramDesc &operator=(ProgramDesc &&from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); + if (this != &from) + InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif - inline const ::std::string& unknown_fields() const { + inline const ::std::string &unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::std::string* mutable_unknown_fields() { + inline ::std::string *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() { - return reinterpret_cast( + static inline const ProgramDesc *internal_default_instance() { + return reinterpret_cast( &_ProgramDesc_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 15; - void Swap(ProgramDesc* other); - friend void swap(ProgramDesc& a, ProgramDesc& b) { a.Swap(&b); } + void Swap(ProgramDesc *other); + friend void swap(ProgramDesc &a, ProgramDesc &b) { a.Swap(&b); } // 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; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) + ProgramDesc *New(::google::protobuf::Arena *arena) const PROTOBUF_FINAL; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite &from) PROTOBUF_FINAL; - void CopyFrom(const ProgramDesc& from); - void MergeFrom(const ProgramDesc& from); + void CopyFrom(const ProgramDesc &from); + void MergeFrom(const ProgramDesc &from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + ::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: +private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(ProgramDesc* other); + void InternalSwap(ProgramDesc *other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } - inline void* MaybeArenaPtr() const { return NULL; } +private: + inline ::google::protobuf::Arena *GetArenaNoVirtual() const { return NULL; } + inline void *MaybeArenaPtr() const { return NULL; } - public: +public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- @@ -2543,18 +2559,18 @@ class ProgramDesc int blocks_size() const; void clear_blocks(); static const int kBlocksFieldNumber = 1; - const ::paddle_mobile::framework::proto::BlockDesc& blocks(int index) const; - ::paddle_mobile::framework::proto::BlockDesc* mutable_blocks(int index); - ::paddle_mobile::framework::proto::BlockDesc* add_blocks(); + const ::paddle_mobile::framework::proto::BlockDesc &blocks(int index) const; + ::paddle_mobile::framework::proto::BlockDesc *mutable_blocks(int index); + ::paddle_mobile::framework::proto::BlockDesc *add_blocks(); ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::BlockDesc>* + ::paddle_mobile::framework::proto::BlockDesc> * mutable_blocks(); const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::BlockDesc>& + ::paddle_mobile::framework::proto::BlockDesc> & blocks() const; // @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.ProgramDesc) - private: +private: ::google::protobuf::internal::InternalMetadataWithArenaLite _internal_metadata_; ::google::protobuf::internal::HasBits<1> _has_bits_; @@ -2572,7 +2588,7 @@ class ProgramDesc #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ +#endif // __GNUC__ // OpDesc_Attr // required string name = 1; @@ -2586,50 +2602,50 @@ inline void OpDesc_Attr::clear_name() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) 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(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.name) } #if LANG_CXX11 -inline void OpDesc_Attr::set_name(::std::string&& value) { +inline void OpDesc_Attr::set_name(::std::string &&value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Attr.name) } #endif -inline void OpDesc_Attr::set_name(const char* value) { +inline void OpDesc_Attr::set_name(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.name) return name_.MutableNoArena( &::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) clear_has_name(); return name_.ReleaseNoArena( &::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) { set_has_name(); } else { @@ -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) return static_cast<::paddle_mobile::framework::proto::AttrType>(type_); } -inline void OpDesc_Attr::set_type( - ::paddle_mobile::framework::proto::AttrType value) { +inline void +OpDesc_Attr::set_type(::paddle_mobile::framework::proto::AttrType value) { assert(::paddle_mobile::framework::proto::AttrType_IsValid(value)); set_has_type(); type_ = value; @@ -2713,50 +2729,50 @@ inline void OpDesc_Attr::clear_s() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) 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(); s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Attr.s) } #if LANG_CXX11 -inline void OpDesc_Attr::set_s(::std::string&& value) { +inline void OpDesc_Attr::set_s(::std::string &&value) { set_has_s(); s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.Attr.s) } #endif -inline void OpDesc_Attr::set_s(const char* value) { +inline void OpDesc_Attr::set_s(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_s(); s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Attr.s) return s_.MutableNoArena( &::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) clear_has_s(); return s_.ReleaseNoArena( &::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) { set_has_s(); } else { @@ -2782,12 +2798,12 @@ inline void OpDesc_Attr::add_ints(::google::protobuf::int32 value) { ints_.Add(value); // @@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 { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.ints) return ints_; } -inline ::google::protobuf::RepeatedField<::google::protobuf::int32>* +inline ::google::protobuf::RepeatedField<::google::protobuf::int32> * OpDesc_Attr::mutable_ints() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.ints) return &ints_; @@ -2808,12 +2824,12 @@ inline void OpDesc_Attr::add_floats(float value) { floats_.Add(value); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.floats) } -inline const ::google::protobuf::RepeatedField& OpDesc_Attr::floats() - const { +inline const ::google::protobuf::RepeatedField & +OpDesc_Attr::floats() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.floats) return floats_; } -inline ::google::protobuf::RepeatedField* OpDesc_Attr::mutable_floats() { +inline ::google::protobuf::RepeatedField *OpDesc_Attr::mutable_floats() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.floats) return &floats_; } @@ -2821,63 +2837,63 @@ inline ::google::protobuf::RepeatedField* OpDesc_Attr::mutable_floats() { // repeated string strings = 8; inline int OpDesc_Attr::strings_size() const { return strings_.size(); } 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) 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) 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) strings_.Mutable(index)->assign(value); } #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) strings_.Mutable(index)->assign(std::move(value)); } #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); strings_.Mutable(index)->assign(value); // @@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) { - strings_.Mutable(index)->assign(reinterpret_cast(value), size); + strings_.Mutable(index)->assign(reinterpret_cast(value), size); // @@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) 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); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.strings) } #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)); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.strings) } #endif -inline void OpDesc_Attr::add_strings(const char* value) { +inline void OpDesc_Attr::add_strings(const char *value) { GOOGLE_DCHECK(value != NULL); strings_.Add()->assign(value); // @@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) { - strings_.Add()->assign(reinterpret_cast(value), size); +inline void OpDesc_Attr::add_strings(const char *value, size_t size) { + strings_.Add()->assign(reinterpret_cast(value), size); // @@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 { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.strings) return strings_; } -inline ::google::protobuf::RepeatedPtrField<::std::string>* +inline ::google::protobuf::RepeatedPtrField<::std::string> * OpDesc_Attr::mutable_strings() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.strings) return &strings_; @@ -2918,12 +2934,12 @@ inline void OpDesc_Attr::add_bools(bool value) { bools_.Add(value); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.bools) } -inline const ::google::protobuf::RepeatedField& OpDesc_Attr::bools() - const { +inline const ::google::protobuf::RepeatedField & +OpDesc_Attr::bools() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.bools) return bools_; } -inline ::google::protobuf::RepeatedField* OpDesc_Attr::mutable_bools() { +inline ::google::protobuf::RepeatedField *OpDesc_Attr::mutable_bools() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.bools) return &bools_; } @@ -2985,18 +3001,18 @@ inline void OpDesc_Var::clear_parameter() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) 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(); parameter_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.Var.parameter) } #if LANG_CXX11 -inline void OpDesc_Var::set_parameter(::std::string&& value) { +inline void OpDesc_Var::set_parameter(::std::string &&value) { set_has_parameter(); parameter_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -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) } #endif -inline void OpDesc_Var::set_parameter(const char* value) { +inline void OpDesc_Var::set_parameter(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_parameter(); parameter_.SetNoArena( @@ -3012,26 +3028,26 @@ inline void OpDesc_Var::set_parameter(const char* value) { ::std::string(value)); // @@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(); parameter_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.Var.parameter) return parameter_.MutableNoArena( &::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) clear_has_parameter(); return parameter_.ReleaseNoArena( &::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) { set_has_parameter(); } else { @@ -3045,63 +3061,64 @@ inline void OpDesc_Var::set_allocated_parameter(::std::string* parameter) { // repeated string arguments = 2; inline int OpDesc_Var::arguments_size() const { return arguments_.size(); } 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) 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) 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) arguments_.Mutable(index)->assign(value); } #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) arguments_.Mutable(index)->assign(std::move(value)); } #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); arguments_.Mutable(index)->assign(value); // @@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) { - arguments_.Mutable(index)->assign(reinterpret_cast(value), size); + arguments_.Mutable(index)->assign(reinterpret_cast(value), + size); // @@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) 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); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Var.arguments) } #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)); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Var.arguments) } #endif -inline void OpDesc_Var::add_arguments(const char* value) { +inline void OpDesc_Var::add_arguments(const char *value) { GOOGLE_DCHECK(value != NULL); arguments_.Add()->assign(value); // @@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) { - arguments_.Add()->assign(reinterpret_cast(value), size); +inline void OpDesc_Var::add_arguments(const char *value, size_t size) { + arguments_.Add()->assign(reinterpret_cast(value), size); // @@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 { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Var.arguments) return arguments_; } -inline ::google::protobuf::RepeatedPtrField<::std::string>* +inline ::google::protobuf::RepeatedPtrField<::std::string> * OpDesc_Var::mutable_arguments() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Var.arguments) return &arguments_; @@ -3122,50 +3139,50 @@ inline void OpDesc::clear_type() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return type_.GetNoArena(); } -inline void OpDesc::set_type(const ::std::string& value) { +inline void OpDesc::set_type(const ::std::string &value) { set_has_type(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpDesc.type) } #if LANG_CXX11 -inline void OpDesc::set_type(::std::string&& value) { +inline void OpDesc::set_type(::std::string &&value) { set_has_type(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpDesc.type) } #endif -inline void OpDesc::set_type(const char* value) { +inline void OpDesc::set_type(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_type(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.type) return type_.MutableNoArena( &::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) clear_has_type(); return type_.ReleaseNoArena( &::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) { set_has_type(); } else { @@ -3179,28 +3196,28 @@ inline void OpDesc::set_allocated_type(::std::string* type) { // repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1; inline int OpDesc::inputs_size() const { return inputs_.size(); } inline void OpDesc::clear_inputs() { inputs_.Clear(); } -inline const ::paddle_mobile::framework::proto::OpDesc_Var& OpDesc::inputs( - int index) const { +inline const ::paddle_mobile::framework::proto::OpDesc_Var & +OpDesc::inputs(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.inputs) return inputs_.Get(index); } -inline ::paddle_mobile::framework::proto::OpDesc_Var* OpDesc::mutable_inputs( - int index) { +inline ::paddle_mobile::framework::proto::OpDesc_Var * +OpDesc::mutable_inputs(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.inputs) 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) return inputs_.Add(); } inline ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Var>* + ::paddle_mobile::framework::proto::OpDesc_Var> * OpDesc::mutable_inputs() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.inputs) return &inputs_; } inline const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Var>& + ::paddle_mobile::framework::proto::OpDesc_Var> & OpDesc::inputs() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.inputs) return inputs_; @@ -3209,28 +3226,28 @@ OpDesc::inputs() const { // repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2; inline int OpDesc::outputs_size() const { return outputs_.size(); } inline void OpDesc::clear_outputs() { outputs_.Clear(); } -inline const ::paddle_mobile::framework::proto::OpDesc_Var& OpDesc::outputs( - int index) const { +inline const ::paddle_mobile::framework::proto::OpDesc_Var & +OpDesc::outputs(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.outputs) return outputs_.Get(index); } -inline ::paddle_mobile::framework::proto::OpDesc_Var* OpDesc::mutable_outputs( - int index) { +inline ::paddle_mobile::framework::proto::OpDesc_Var * +OpDesc::mutable_outputs(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.outputs) 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) return outputs_.Add(); } inline ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Var>* + ::paddle_mobile::framework::proto::OpDesc_Var> * OpDesc::mutable_outputs() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.outputs) return &outputs_; } inline const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Var>& + ::paddle_mobile::framework::proto::OpDesc_Var> & OpDesc::outputs() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.outputs) return outputs_; @@ -3239,28 +3256,28 @@ OpDesc::outputs() const { // repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4; inline int OpDesc::attrs_size() const { return attrs_.size(); } inline void OpDesc::clear_attrs() { attrs_.Clear(); } -inline const ::paddle_mobile::framework::proto::OpDesc_Attr& OpDesc::attrs( - int index) const { +inline const ::paddle_mobile::framework::proto::OpDesc_Attr & +OpDesc::attrs(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.attrs) return attrs_.Get(index); } -inline ::paddle_mobile::framework::proto::OpDesc_Attr* OpDesc::mutable_attrs( - int index) { +inline ::paddle_mobile::framework::proto::OpDesc_Attr * +OpDesc::mutable_attrs(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.attrs) 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) return attrs_.Add(); } inline ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Attr>* + ::paddle_mobile::framework::proto::OpDesc_Attr> * OpDesc::mutable_attrs() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.attrs) return &attrs_; } inline const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc_Attr>& + ::paddle_mobile::framework::proto::OpDesc_Attr> & OpDesc::attrs() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.attrs) return attrs_; @@ -3301,50 +3318,50 @@ inline void OpProto_Var::clear_name() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) 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(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Var.name) } #if LANG_CXX11 -inline void OpProto_Var::set_name(::std::string&& value) { +inline void OpProto_Var::set_name(::std::string &&value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Var.name) } #endif -inline void OpProto_Var::set_name(const char* value) { +inline void OpProto_Var::set_name(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Var.name) return name_.MutableNoArena( &::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) clear_has_name(); return name_.ReleaseNoArena( &::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) { set_has_name(); } else { @@ -3366,18 +3383,18 @@ inline void OpProto_Var::clear_comment() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) 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(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Var.comment) } #if LANG_CXX11 -inline void OpProto_Var::set_comment(::std::string&& value) { +inline void OpProto_Var::set_comment(::std::string &&value) { set_has_comment(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -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) } #endif -inline void OpProto_Var::set_comment(const char* value) { +inline void OpProto_Var::set_comment(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_comment(); comment_.SetNoArena( @@ -3393,26 +3410,26 @@ inline void OpProto_Var::set_comment(const char* value) { ::std::string(value)); // @@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(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Var.comment) return comment_.MutableNoArena( &::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) clear_has_comment(); return comment_.ReleaseNoArena( &::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) { set_has_comment(); } else { @@ -3506,50 +3523,50 @@ inline void OpProto_Attr::clear_name() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) 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(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Attr.name) } #if LANG_CXX11 -inline void OpProto_Attr::set_name(::std::string&& value) { +inline void OpProto_Attr::set_name(::std::string &&value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.Attr.name) } #endif -inline void OpProto_Attr::set_name(const char* value) { +inline void OpProto_Attr::set_name(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Attr.name) return name_.MutableNoArena( &::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) clear_has_name(); return name_.ReleaseNoArena( &::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) { set_has_name(); } else { @@ -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) return static_cast<::paddle_mobile::framework::proto::AttrType>(type_); } -inline void OpProto_Attr::set_type( - ::paddle_mobile::framework::proto::AttrType value) { +inline void +OpProto_Attr::set_type(::paddle_mobile::framework::proto::AttrType value) { assert(::paddle_mobile::framework::proto::AttrType_IsValid(value)); set_has_type(); type_ = value; @@ -3593,18 +3610,18 @@ inline void OpProto_Attr::clear_comment() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) 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(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.Attr.comment) } #if LANG_CXX11 -inline void OpProto_Attr::set_comment(::std::string&& value) { +inline void OpProto_Attr::set_comment(::std::string &&value) { set_has_comment(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -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) } #endif -inline void OpProto_Attr::set_comment(const char* value) { +inline void OpProto_Attr::set_comment(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_comment(); comment_.SetNoArena( @@ -3620,26 +3637,26 @@ inline void OpProto_Attr::set_comment(const char* value) { ::std::string(value)); // @@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(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.Attr.comment) return comment_.MutableNoArena( &::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) clear_has_comment(); return comment_.ReleaseNoArena( &::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) { set_has_comment(); } else { @@ -3687,50 +3704,50 @@ inline void OpProto::clear_type() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return type_.GetNoArena(); } -inline void OpProto::set_type(const ::std::string& value) { +inline void OpProto::set_type(const ::std::string &value) { set_has_type(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.type) } #if LANG_CXX11 -inline void OpProto::set_type(::std::string&& value) { +inline void OpProto::set_type(::std::string &&value) { set_has_type(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.type) } #endif -inline void OpProto::set_type(const char* value) { +inline void OpProto::set_type(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_type(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.type) return type_.MutableNoArena( &::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) clear_has_type(); return type_.ReleaseNoArena( &::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) { set_has_type(); } else { @@ -3744,28 +3761,28 @@ inline void OpProto::set_allocated_type(::std::string* type) { // repeated .paddle_mobile.framework.proto.OpProto.Var inputs = 2; inline int OpProto::inputs_size() const { return inputs_.size(); } inline void OpProto::clear_inputs() { inputs_.Clear(); } -inline const ::paddle_mobile::framework::proto::OpProto_Var& OpProto::inputs( - int index) const { +inline const ::paddle_mobile::framework::proto::OpProto_Var & +OpProto::inputs(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.inputs) return inputs_.Get(index); } -inline ::paddle_mobile::framework::proto::OpProto_Var* OpProto::mutable_inputs( - int index) { +inline ::paddle_mobile::framework::proto::OpProto_Var * +OpProto::mutable_inputs(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.inputs) 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) return inputs_.Add(); } inline ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Var>* + ::paddle_mobile::framework::proto::OpProto_Var> * OpProto::mutable_inputs() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.inputs) return &inputs_; } inline const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Var>& + ::paddle_mobile::framework::proto::OpProto_Var> & OpProto::inputs() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.inputs) return inputs_; @@ -3774,28 +3791,28 @@ OpProto::inputs() const { // repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3; inline int OpProto::outputs_size() const { return outputs_.size(); } inline void OpProto::clear_outputs() { outputs_.Clear(); } -inline const ::paddle_mobile::framework::proto::OpProto_Var& OpProto::outputs( - int index) const { +inline const ::paddle_mobile::framework::proto::OpProto_Var & +OpProto::outputs(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.outputs) return outputs_.Get(index); } -inline ::paddle_mobile::framework::proto::OpProto_Var* OpProto::mutable_outputs( - int index) { +inline ::paddle_mobile::framework::proto::OpProto_Var * +OpProto::mutable_outputs(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.outputs) 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) return outputs_.Add(); } inline ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Var>* + ::paddle_mobile::framework::proto::OpProto_Var> * OpProto::mutable_outputs() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.outputs) return &outputs_; } inline const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Var>& + ::paddle_mobile::framework::proto::OpProto_Var> & OpProto::outputs() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.outputs) return outputs_; @@ -3804,28 +3821,28 @@ OpProto::outputs() const { // repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4; inline int OpProto::attrs_size() const { return attrs_.size(); } inline void OpProto::clear_attrs() { attrs_.Clear(); } -inline const ::paddle_mobile::framework::proto::OpProto_Attr& OpProto::attrs( - int index) const { +inline const ::paddle_mobile::framework::proto::OpProto_Attr & +OpProto::attrs(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.attrs) return attrs_.Get(index); } -inline ::paddle_mobile::framework::proto::OpProto_Attr* OpProto::mutable_attrs( - int index) { +inline ::paddle_mobile::framework::proto::OpProto_Attr * +OpProto::mutable_attrs(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.attrs) 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) return attrs_.Add(); } inline ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Attr>* + ::paddle_mobile::framework::proto::OpProto_Attr> * OpProto::mutable_attrs() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.attrs) return &attrs_; } inline const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpProto_Attr>& + ::paddle_mobile::framework::proto::OpProto_Attr> & OpProto::attrs() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.attrs) return attrs_; @@ -3842,18 +3859,18 @@ inline void OpProto::clear_comment() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return comment_.GetNoArena(); } -inline void OpProto::set_comment(const ::std::string& value) { +inline void OpProto::set_comment(const ::std::string &value) { set_has_comment(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.OpProto.comment) } #if LANG_CXX11 -inline void OpProto::set_comment(::std::string&& value) { +inline void OpProto::set_comment(::std::string &&value) { set_has_comment(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -3861,7 +3878,7 @@ inline void OpProto::set_comment(::std::string&& value) { // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.OpProto.comment) } #endif -inline void OpProto::set_comment(const char* value) { +inline void OpProto::set_comment(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_comment(); comment_.SetNoArena( @@ -3869,26 +3886,26 @@ inline void OpProto::set_comment(const char* value) { ::std::string(value)); // @@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(); comment_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.comment) return comment_.MutableNoArena( &::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) clear_has_comment(); return comment_.ReleaseNoArena( &::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) { set_has_comment(); } else { @@ -3947,12 +3964,12 @@ inline void VarType_TensorDesc::add_dims(::google::protobuf::int64 value) { dims_.Add(value); // @@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 { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims) return dims_; } -inline ::google::protobuf::RepeatedField<::google::protobuf::int64>* +inline ::google::protobuf::RepeatedField<::google::protobuf::int64> * VarType_TensorDesc::mutable_dims() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims) return &dims_; @@ -3977,16 +3994,18 @@ inline void VarType_LoDTensorDesc::clear_tensor() { tensor_->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear(); clear_has_tensor(); } -inline const ::paddle_mobile::framework::proto::VarType_TensorDesc& +inline const ::paddle_mobile::framework::proto::VarType_TensorDesc & 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) - return p != NULL ? *p : *reinterpret_cast( - &::paddle_mobile::framework::proto:: - _VarType_TensorDesc_default_instance_); + return p != NULL + ? *p + : *reinterpret_cast< + const ::paddle_mobile::framework::proto::VarType_TensorDesc + *>(&::paddle_mobile::framework::proto:: + _VarType_TensorDesc_default_instance_); } -inline ::paddle_mobile::framework::proto::VarType_TensorDesc* +inline ::paddle_mobile::framework::proto::VarType_TensorDesc * VarType_LoDTensorDesc::mutable_tensor() { set_has_tensor(); if (tensor_ == NULL) { @@ -3995,16 +4014,16 @@ VarType_LoDTensorDesc::mutable_tensor() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor) return tensor_; } -inline ::paddle_mobile::framework::proto::VarType_TensorDesc* +inline ::paddle_mobile::framework::proto::VarType_TensorDesc * VarType_LoDTensorDesc::release_tensor() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.LoDTensorDesc.tensor) clear_has_tensor(); - ::paddle_mobile::framework::proto::VarType_TensorDesc* temp = tensor_; + ::paddle_mobile::framework::proto::VarType_TensorDesc *temp = tensor_; tensor_ = NULL; return temp; } inline void VarType_LoDTensorDesc::set_allocated_tensor( - ::paddle_mobile::framework::proto::VarType_TensorDesc* tensor) { + ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor) { delete tensor_; tensor_ = tensor; if (tensor) { @@ -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) return lod_level_; } -inline void VarType_LoDTensorDesc::set_lod_level( - ::google::protobuf::int32 value) { +inline void +VarType_LoDTensorDesc::set_lod_level(::google::protobuf::int32 value) { set_has_lod_level(); lod_level_ = value; // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarType.LoDTensorDesc.lod_level) @@ -4059,16 +4078,18 @@ inline void VarType_LoDTensorArrayDesc::clear_tensor() { tensor_->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear(); clear_has_tensor(); } -inline const ::paddle_mobile::framework::proto::VarType_TensorDesc& +inline const ::paddle_mobile::framework::proto::VarType_TensorDesc & 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) - return p != NULL ? *p : *reinterpret_cast( - &::paddle_mobile::framework::proto:: - _VarType_TensorDesc_default_instance_); + return p != NULL + ? *p + : *reinterpret_cast< + const ::paddle_mobile::framework::proto::VarType_TensorDesc + *>(&::paddle_mobile::framework::proto:: + _VarType_TensorDesc_default_instance_); } -inline ::paddle_mobile::framework::proto::VarType_TensorDesc* +inline ::paddle_mobile::framework::proto::VarType_TensorDesc * VarType_LoDTensorArrayDesc::mutable_tensor() { set_has_tensor(); if (tensor_ == NULL) { @@ -4077,16 +4098,16 @@ VarType_LoDTensorArrayDesc::mutable_tensor() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor) return tensor_; } -inline ::paddle_mobile::framework::proto::VarType_TensorDesc* +inline ::paddle_mobile::framework::proto::VarType_TensorDesc * VarType_LoDTensorArrayDesc::release_tensor() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.tensor) clear_has_tensor(); - ::paddle_mobile::framework::proto::VarType_TensorDesc* temp = tensor_; + ::paddle_mobile::framework::proto::VarType_TensorDesc *temp = tensor_; tensor_ = NULL; return temp; } inline void VarType_LoDTensorArrayDesc::set_allocated_tensor( - ::paddle_mobile::framework::proto::VarType_TensorDesc* tensor) { + ::paddle_mobile::framework::proto::VarType_TensorDesc *tensor) { delete tensor_; tensor_ = tensor; if (tensor) { @@ -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) return lod_level_; } -inline void VarType_LoDTensorArrayDesc::set_lod_level( - ::google::protobuf::int32 value) { +inline void +VarType_LoDTensorArrayDesc::set_lod_level(::google::protobuf::int32 value) { set_has_lod_level(); lod_level_ = value; // @@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 { return lod_tensor_.size(); } 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 { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) 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) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) return lod_tensor_.Mutable(index); } -inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* +inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc * VarType_ReaderDesc::add_lod_tensor() { // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) return lod_tensor_.Add(); } inline ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::VarType_LoDTensorDesc>* + ::paddle_mobile::framework::proto::VarType_LoDTensorDesc> * VarType_ReaderDesc::mutable_lod_tensor() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) return &lod_tensor_; } inline const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::VarType_LoDTensorDesc>& + ::paddle_mobile::framework::proto::VarType_LoDTensorDesc> & VarType_ReaderDesc::lod_tensor() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor) return lod_tensor_; @@ -4242,12 +4263,12 @@ inline void VarType_Tuple::add_element_type( element_type_.Add(value); // @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.Tuple.element_type) } -inline const ::google::protobuf::RepeatedField& +inline const ::google::protobuf::RepeatedField & VarType_Tuple::element_type() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.Tuple.element_type) return element_type_; } -inline ::google::protobuf::RepeatedField* +inline ::google::protobuf::RepeatedField * VarType_Tuple::mutable_element_type() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.Tuple.element_type) return &element_type_; @@ -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) return static_cast<::paddle_mobile::framework::proto::VarType_Type>(type_); } -inline void VarType::set_type( - ::paddle_mobile::framework::proto::VarType_Type value) { +inline void +VarType::set_type(::paddle_mobile::framework::proto::VarType_Type value) { assert(::paddle_mobile::framework::proto::VarType_Type_IsValid(value)); set_has_type(); type_ = value; @@ -4293,17 +4314,19 @@ inline void VarType::clear_selected_rows() { ->::paddle_mobile::framework::proto::VarType_TensorDesc::Clear(); clear_has_selected_rows(); } -inline const ::paddle_mobile::framework::proto::VarType_TensorDesc& +inline const ::paddle_mobile::framework::proto::VarType_TensorDesc & VarType::selected_rows() const { - const ::paddle_mobile::framework::proto::VarType_TensorDesc* p = + const ::paddle_mobile::framework::proto::VarType_TensorDesc *p = selected_rows_; // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.selected_rows) - return p != NULL ? *p : *reinterpret_cast( - &::paddle_mobile::framework::proto:: - _VarType_TensorDesc_default_instance_); + return p != NULL + ? *p + : *reinterpret_cast< + const ::paddle_mobile::framework::proto::VarType_TensorDesc + *>(&::paddle_mobile::framework::proto:: + _VarType_TensorDesc_default_instance_); } -inline ::paddle_mobile::framework::proto::VarType_TensorDesc* +inline ::paddle_mobile::framework::proto::VarType_TensorDesc * VarType::mutable_selected_rows() { set_has_selected_rows(); if (selected_rows_ == NULL) { @@ -4312,16 +4335,16 @@ VarType::mutable_selected_rows() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.selected_rows) return selected_rows_; } -inline ::paddle_mobile::framework::proto::VarType_TensorDesc* +inline ::paddle_mobile::framework::proto::VarType_TensorDesc * VarType::release_selected_rows() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.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; return temp; } 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_; selected_rows_ = selected_rows; if (selected_rows) { @@ -4344,17 +4367,17 @@ inline void VarType::clear_lod_tensor() { ->::paddle_mobile::framework::proto::VarType_LoDTensorDesc::Clear(); clear_has_lod_tensor(); } -inline const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc& +inline const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc & VarType::lod_tensor() const { - const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* p = + const ::paddle_mobile::framework::proto::VarType_LoDTensorDesc *p = lod_tensor_; // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.lod_tensor) return p != NULL ? *p : *reinterpret_cast( + proto::VarType_LoDTensorDesc *>( &::paddle_mobile::framework::proto:: _VarType_LoDTensorDesc_default_instance_); } -inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* +inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc * VarType::mutable_lod_tensor() { set_has_lod_tensor(); if (lod_tensor_ == NULL) { @@ -4363,16 +4386,16 @@ VarType::mutable_lod_tensor() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.lod_tensor) return lod_tensor_; } -inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc* +inline ::paddle_mobile::framework::proto::VarType_LoDTensorDesc * VarType::release_lod_tensor() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.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; return temp; } 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_; lod_tensor_ = lod_tensor; if (lod_tensor) { @@ -4396,18 +4419,18 @@ inline void VarType::clear_tensor_array() { VarType_LoDTensorArrayDesc::Clear(); clear_has_tensor_array(); } -inline const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc& +inline const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc & VarType::tensor_array() const { - const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* p = + const ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *p = tensor_array_; // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tensor_array) return p != NULL ? *p : *reinterpret_cast( + VarType_LoDTensorArrayDesc *>( &::paddle_mobile::framework::proto:: _VarType_LoDTensorArrayDesc_default_instance_); } -inline ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* +inline ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc * VarType::mutable_tensor_array() { set_has_tensor_array(); if (tensor_array_ == NULL) { @@ -4417,18 +4440,18 @@ VarType::mutable_tensor_array() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.tensor_array) return tensor_array_; } -inline ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* +inline ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc * VarType::release_tensor_array() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.tensor_array) clear_has_tensor_array(); - ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* temp = + ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc *temp = tensor_array_; tensor_array_ = NULL; return temp; } inline void VarType::set_allocated_tensor_array( - ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc* - tensor_array) { + ::paddle_mobile::framework::proto::VarType_LoDTensorArrayDesc + *tensor_array) { delete tensor_array_; tensor_array_ = tensor_array; if (tensor_array) { @@ -4450,16 +4473,18 @@ inline void VarType::clear_reader() { reader_->::paddle_mobile::framework::proto::VarType_ReaderDesc::Clear(); clear_has_reader(); } -inline const ::paddle_mobile::framework::proto::VarType_ReaderDesc& +inline const ::paddle_mobile::framework::proto::VarType_ReaderDesc & 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) - return p != NULL ? *p : *reinterpret_cast( - &::paddle_mobile::framework::proto:: - _VarType_ReaderDesc_default_instance_); + return p != NULL + ? *p + : *reinterpret_cast< + const ::paddle_mobile::framework::proto::VarType_ReaderDesc + *>(&::paddle_mobile::framework::proto:: + _VarType_ReaderDesc_default_instance_); } -inline ::paddle_mobile::framework::proto::VarType_ReaderDesc* +inline ::paddle_mobile::framework::proto::VarType_ReaderDesc * VarType::mutable_reader() { set_has_reader(); if (reader_ == NULL) { @@ -4468,16 +4493,16 @@ VarType::mutable_reader() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.reader) return reader_; } -inline ::paddle_mobile::framework::proto::VarType_ReaderDesc* +inline ::paddle_mobile::framework::proto::VarType_ReaderDesc * VarType::release_reader() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.reader) clear_has_reader(); - ::paddle_mobile::framework::proto::VarType_ReaderDesc* temp = reader_; + ::paddle_mobile::framework::proto::VarType_ReaderDesc *temp = reader_; reader_ = NULL; return temp; } inline void VarType::set_allocated_reader( - ::paddle_mobile::framework::proto::VarType_ReaderDesc* reader) { + ::paddle_mobile::framework::proto::VarType_ReaderDesc *reader) { delete reader_; reader_ = reader; if (reader) { @@ -4499,16 +4524,18 @@ inline void VarType::clear_channel() { channel_->::paddle_mobile::framework::proto::VarType_ChannelDesc::Clear(); clear_has_channel(); } -inline const ::paddle_mobile::framework::proto::VarType_ChannelDesc& +inline const ::paddle_mobile::framework::proto::VarType_ChannelDesc & 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) - return p != NULL ? *p : *reinterpret_cast( - &::paddle_mobile::framework::proto:: - _VarType_ChannelDesc_default_instance_); + return p != NULL + ? *p + : *reinterpret_cast< + const ::paddle_mobile::framework::proto::VarType_ChannelDesc + *>(&::paddle_mobile::framework::proto:: + _VarType_ChannelDesc_default_instance_); } -inline ::paddle_mobile::framework::proto::VarType_ChannelDesc* +inline ::paddle_mobile::framework::proto::VarType_ChannelDesc * VarType::mutable_channel() { set_has_channel(); if (channel_ == NULL) { @@ -4517,16 +4544,16 @@ VarType::mutable_channel() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.channel) return channel_; } -inline ::paddle_mobile::framework::proto::VarType_ChannelDesc* +inline ::paddle_mobile::framework::proto::VarType_ChannelDesc * VarType::release_channel() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.channel) clear_has_channel(); - ::paddle_mobile::framework::proto::VarType_ChannelDesc* temp = channel_; + ::paddle_mobile::framework::proto::VarType_ChannelDesc *temp = channel_; channel_ = NULL; return temp; } inline void VarType::set_allocated_channel( - ::paddle_mobile::framework::proto::VarType_ChannelDesc* channel) { + ::paddle_mobile::framework::proto::VarType_ChannelDesc *channel) { delete channel_; channel_ = channel; if (channel) { @@ -4548,18 +4575,18 @@ inline void VarType::clear_tuple() { tuple_->::paddle_mobile::framework::proto::VarType_Tuple::Clear(); clear_has_tuple(); } -inline const ::paddle_mobile::framework::proto::VarType_Tuple& VarType::tuple() - const { - const ::paddle_mobile::framework::proto::VarType_Tuple* p = tuple_; +inline const ::paddle_mobile::framework::proto::VarType_Tuple & +VarType::tuple() const { + const ::paddle_mobile::framework::proto::VarType_Tuple *p = tuple_; // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tuple) return p != NULL ? *p : *reinterpret_cast< - const ::paddle_mobile::framework::proto::VarType_Tuple*>( + const ::paddle_mobile::framework::proto::VarType_Tuple *>( &::paddle_mobile::framework::proto:: _VarType_Tuple_default_instance_); } -inline ::paddle_mobile::framework::proto::VarType_Tuple* +inline ::paddle_mobile::framework::proto::VarType_Tuple * VarType::mutable_tuple() { set_has_tuple(); if (tuple_ == NULL) { @@ -4568,16 +4595,16 @@ VarType::mutable_tuple() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarType.tuple) return tuple_; } -inline ::paddle_mobile::framework::proto::VarType_Tuple* +inline ::paddle_mobile::framework::proto::VarType_Tuple * VarType::release_tuple() { // @@protoc_insertion_point(field_release:paddle_mobile.framework.proto.VarType.tuple) clear_has_tuple(); - ::paddle_mobile::framework::proto::VarType_Tuple* temp = tuple_; + ::paddle_mobile::framework::proto::VarType_Tuple *temp = tuple_; tuple_ = NULL; return temp; } inline void VarType::set_allocated_tuple( - ::paddle_mobile::framework::proto::VarType_Tuple* tuple) { + ::paddle_mobile::framework::proto::VarType_Tuple *tuple) { delete tuple_; tuple_ = tuple; if (tuple) { @@ -4603,50 +4630,50 @@ inline void VarDesc::clear_name() { &::google::protobuf::internal::GetEmptyStringAlreadyInited()); 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) return name_.GetNoArena(); } -inline void VarDesc::set_name(const ::std::string& value) { +inline void VarDesc::set_name(const ::std::string &value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarDesc.name) } #if LANG_CXX11 -inline void VarDesc::set_name(::std::string&& value) { +inline void VarDesc::set_name(::std::string &&value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:paddle_mobile.framework.proto.VarDesc.name) } #endif -inline void VarDesc::set_name(const char* value) { +inline void VarDesc::set_name(const char *value) { GOOGLE_DCHECK(value != NULL); set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@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(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + ::std::string(reinterpret_cast(value), size)); // @@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(); // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarDesc.name) return name_.MutableNoArena( &::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) clear_has_name(); return name_.ReleaseNoArena( &::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) { set_has_name(); } else { @@ -4664,19 +4691,20 @@ inline bool VarDesc::has_type() const { inline void VarDesc::set_has_type() { _has_bits_[0] |= 0x00000002u; } inline void VarDesc::clear_has_type() { _has_bits_[0] &= ~0x00000002u; } 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(); } -inline const ::paddle_mobile::framework::proto::VarType& VarDesc::type() const { - const ::paddle_mobile::framework::proto::VarType* p = type_; +inline const ::paddle_mobile::framework::proto::VarType &VarDesc::type() const { + const ::paddle_mobile::framework::proto::VarType *p = type_; // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarDesc.type) return p != NULL ? *p : *reinterpret_cast< - const ::paddle_mobile::framework::proto::VarType*>( + const ::paddle_mobile::framework::proto::VarType *>( &::paddle_mobile::framework::proto:: _VarType_default_instance_); } -inline ::paddle_mobile::framework::proto::VarType* VarDesc::mutable_type() { +inline ::paddle_mobile::framework::proto::VarType *VarDesc::mutable_type() { set_has_type(); if (type_ == NULL) { type_ = new ::paddle_mobile::framework::proto::VarType; @@ -4684,15 +4712,15 @@ inline ::paddle_mobile::framework::proto::VarType* VarDesc::mutable_type() { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.VarDesc.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) clear_has_type(); - ::paddle_mobile::framework::proto::VarType* temp = type_; + ::paddle_mobile::framework::proto::VarType *temp = type_; type_ = NULL; return temp; } -inline void VarDesc::set_allocated_type( - ::paddle_mobile::framework::proto::VarType* type) { +inline void +VarDesc::set_allocated_type(::paddle_mobile::framework::proto::VarType *type) { delete type_; type_ = type; if (type) { @@ -4770,28 +4798,28 @@ inline void BlockDesc::set_parent_idx(::google::protobuf::int32 value) { // repeated .paddle_mobile.framework.proto.VarDesc vars = 3; inline int BlockDesc::vars_size() const { return vars_.size(); } inline void BlockDesc::clear_vars() { vars_.Clear(); } -inline const ::paddle_mobile::framework::proto::VarDesc& BlockDesc::vars( - int index) const { +inline const ::paddle_mobile::framework::proto::VarDesc & +BlockDesc::vars(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.vars) return vars_.Get(index); } -inline ::paddle_mobile::framework::proto::VarDesc* BlockDesc::mutable_vars( - int index) { +inline ::paddle_mobile::framework::proto::VarDesc * +BlockDesc::mutable_vars(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.vars) 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) return vars_.Add(); } inline ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::VarDesc>* + ::paddle_mobile::framework::proto::VarDesc> * BlockDesc::mutable_vars() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.vars) return &vars_; } inline const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::VarDesc>& + ::paddle_mobile::framework::proto::VarDesc> & BlockDesc::vars() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.vars) return vars_; @@ -4800,28 +4828,28 @@ BlockDesc::vars() const { // repeated .paddle_mobile.framework.proto.OpDesc ops = 4; inline int BlockDesc::ops_size() const { return ops_.size(); } inline void BlockDesc::clear_ops() { ops_.Clear(); } -inline const ::paddle_mobile::framework::proto::OpDesc& BlockDesc::ops( - int index) const { +inline const ::paddle_mobile::framework::proto::OpDesc & +BlockDesc::ops(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.ops) return ops_.Get(index); } -inline ::paddle_mobile::framework::proto::OpDesc* BlockDesc::mutable_ops( - int index) { +inline ::paddle_mobile::framework::proto::OpDesc * +BlockDesc::mutable_ops(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.ops) 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) return ops_.Add(); } inline ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc>* + ::paddle_mobile::framework::proto::OpDesc> * BlockDesc::mutable_ops() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.ops) return &ops_; } inline const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::OpDesc>& + ::paddle_mobile::framework::proto::OpDesc> & BlockDesc::ops() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.ops) return ops_; @@ -4858,28 +4886,28 @@ inline void BlockDesc::set_forward_block_idx(::google::protobuf::int32 value) { // repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1; inline int ProgramDesc::blocks_size() const { return blocks_.size(); } inline void ProgramDesc::clear_blocks() { blocks_.Clear(); } -inline const ::paddle_mobile::framework::proto::BlockDesc& ProgramDesc::blocks( - int index) const { +inline const ::paddle_mobile::framework::proto::BlockDesc & +ProgramDesc::blocks(int index) const { // @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.ProgramDesc.blocks) return blocks_.Get(index); } -inline ::paddle_mobile::framework::proto::BlockDesc* +inline ::paddle_mobile::framework::proto::BlockDesc * ProgramDesc::mutable_blocks(int index) { // @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.ProgramDesc.blocks) 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) return blocks_.Add(); } inline ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::BlockDesc>* + ::paddle_mobile::framework::proto::BlockDesc> * ProgramDesc::mutable_blocks() { // @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.ProgramDesc.blocks) return &blocks_; } inline const ::google::protobuf::RepeatedPtrField< - ::paddle_mobile::framework::proto::BlockDesc>& + ::paddle_mobile::framework::proto::BlockDesc> & ProgramDesc::blocks() const { // @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.ProgramDesc.blocks) return blocks_; @@ -4887,8 +4915,8 @@ ProgramDesc::blocks() const { #ifdef __GNUC__ #pragma GCC diagnostic pop -#endif // __GNUC__ -#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // __GNUC__ +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- // ------------------------------------------------------------------- @@ -4921,9 +4949,9 @@ ProgramDesc::blocks() const { // @@protoc_insertion_point(namespace_scope) -} // namespace proto -} // namespace framework -} // namespace paddle_mobile +} // namespace proto +} // namespace framework +} // namespace paddle_mobile namespace google { namespace protobuf { @@ -4935,9 +4963,9 @@ template <> struct is_proto_enum<::paddle_mobile::framework::proto::AttrType> : ::google::protobuf::internal::true_type {}; -} // namespace protobuf -} // namespace google +} // namespace protobuf +} // namespace google // @@protoc_insertion_point(global_scope) -#endif // PROTOBUF_framework_2eproto__INCLUDED +#endif // PROTOBUF_framework_2eproto__INCLUDED diff --git a/src/framework/lod_tensor.cc b/src/framework/lod_tensor.cc index 2ae49b453c..ef4badd4d4 100644 --- a/src/framework/lod_tensor.cc +++ b/src/framework/lod_tensor.cc @@ -13,10 +13,10 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "lod_tensor.h" -#include -#include #include #include +#include +#include namespace paddle_mobile { namespace framework { @@ -103,7 +103,8 @@ LoD SliceInLevel(const LoD &in, size_t level, size_t elem_begin, LoD ToAbsOffset(const LoD &in) { // 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; for (auto level = static_cast(in.size() - 2); level >= 0; level--) { for (size_t i = 0; i < in[level].size(); ++i) { @@ -135,16 +136,20 @@ bool operator==(const LoD &a, const LoD &b) { } bool CheckLoD(const LoD &in, int tensor_height) { - if (in.empty()) return true; + if (in.empty()) + return true; for (const auto &level : in) { // 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. - 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 // allows). 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; })) { std::cout << "ascending error"; @@ -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 // first. 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; } bool CheckAbsLoD(const LoD &in, int tensor_height) { - if (in.empty()) return true; + if (in.empty()) + return true; for (const auto &level : in) { // check: all the offsets in a level should be ascending(no same items // allows). 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; } // 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 // the same(the height of underlying tensor). - if (level.front() != 0) return false; + if (level.front() != 0) + return false; if (tensor_height < 0) { tensor_height = level.back(); } else if ((size_t)tensor_height != level.back()) { @@ -220,7 +230,7 @@ void AppendLoD(LoD *lod, const LoD &lod_length) { // "The lod_length should has the same size with the appended lod."); if (lod->empty()) { for (size_t i = 0; i < lod_length.size(); ++i) { - lod->emplace_back(1, 0); // size = 1, value = 0; + lod->emplace_back(1, 0); // size = 1, value = 0; } *lod = LoD(lod_length.size(), std::vector({0})); } @@ -233,7 +243,7 @@ void AppendLoD(LoD *lod, const LoD &lod_length) { } void SerializeToStream(std::ostream &os, const LoDTensor &tensor) { - { // the 1st field, uint32_t version for LoDTensor + { // the 1st field, uint32_t version for LoDTensor constexpr uint32_t version = 0; os.write(reinterpret_cast(&version), sizeof(version)); } @@ -284,5 +294,5 @@ void DeserializeFromStream(std::istream &is, LoDTensor *tensor) { TensorFromStream(is, static_cast(tensor)); } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/lod_tensor.h b/src/framework/lod_tensor.h index b13e31cf59..ce93b78eb6 100644 --- a/src/framework/lod_tensor.h +++ b/src/framework/lod_tensor.h @@ -14,12 +14,12 @@ limitations under the License. */ #pragma once +#include "tensor.h" +#include "tensor_util.h" #include #include #include #include -#include "tensor.h" -#include "tensor_util.h" namespace paddle_mobile { @@ -96,7 +96,7 @@ bool CheckAbsLoD(const LoD &in, int tensor_height = -1); * see https://en.wikipedia.org/wiki/Level_of_details for reference. */ class LoDTensor : public Tensor { - public: +public: LoDTensor() : Tensor() {} explicit LoDTensor(const LoD &lod) : lod_(lod) {} @@ -131,7 +131,7 @@ class LoDTensor : public Tensor { return (lod_)[level].size() - 1; } - private: +private: LoD lod_; }; @@ -181,8 +181,9 @@ LoDTensor LodExpand(const LoDTensor &source, const LoD &lod, size_t level) { // Returns: // LoD = [[1, 4], [2, 4, 2, 3, 2]] // pair = {11, 24} -std::pair> GetSubLoDAndAbsoluteOffset( - const LoD &lod, size_t start_idx, size_t end_idx, size_t start_level); +std::pair> +GetSubLoDAndAbsoluteOffset(const LoD &lod, size_t start_idx, size_t end_idx, + size_t start_level); void AppendLoD(LoD *lod, const LoD &lod_length); @@ -195,5 +196,5 @@ void SerializeToStream(std::ostream &os, const LoDTensor &tensor); void DeserializeFromStream(std::istream &is, LoDTensor *tensor); -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/op_desc.cpp b/src/framework/op_desc.cpp index d7b946424e..f6a5cf68ff 100644 --- a/src/framework/op_desc.cpp +++ b/src/framework/op_desc.cpp @@ -55,5 +55,5 @@ const std::unordered_map &OpDesc::GetAttrMap() const { return attrs_; } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/op_desc.h b/src/framework/op_desc.h index e2465989bb..61fe4c9989 100644 --- a/src/framework/op_desc.h +++ b/src/framework/op_desc.h @@ -26,7 +26,7 @@ namespace paddle_mobile { namespace framework { class OpDesc : PaddleMobileObject { - public: +public: OpDesc(const proto::OpDesc &desc); const std::vector &Input(const std::string &name) const; const std::vector &Output(const std::string &name) const; @@ -40,12 +40,12 @@ class OpDesc : PaddleMobileObject { const std::string &Type() { return desc_.type(); }; - private: +private: proto::OpDesc desc_; VariableNameMap inputs_; VariableNameMap outputs_; AttributeMap attrs_; }; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/op_info.h b/src/framework/op_info.h index ed6d188d00..ed41fbd208 100644 --- a/src/framework/op_info.h +++ b/src/framework/op_info.h @@ -24,42 +24,38 @@ SOFTWARE. namespace paddle_mobile { namespace framework { -template -struct OpInfo { +template struct OpInfo { OpCreator creator_; - const OpCreator& Creator() const { + const OpCreator &Creator() const { // PADDLE_ENFORCE_NOT_NULL(creator_, // "Operator Creator has not been registered"); return creator_; } }; -template -class OpInfoMap; +template class OpInfoMap; -template -static OpInfoMap* g_op_info_map = nullptr; +template static OpInfoMap *g_op_info_map = nullptr; -template -class OpInfoMap { - public: - static OpInfoMap& Instance() { +template class OpInfoMap { +public: + static OpInfoMap &Instance() { if (g_op_info_map == nullptr) { g_op_info_map = new OpInfoMap(); } return *g_op_info_map; }; - bool Has(const std::string& op_type) const { + bool Has(const std::string &op_type) const { return map_.find(op_type) != map_.end(); } - void Insert(const std::string& type, const OpInfo& info) { + void Insert(const std::string &type, const OpInfo &info) { // PADDLE_ENFORCE(!Has(type), "Operator %s has been registered", type); map_.insert({type, info}); } - const OpInfo& Get(const std::string& type) const { + const OpInfo &Get(const std::string &type) const { auto op_info_ptr = GetNullable(type); // PADDLE_ENFORCE_NOT_NULL(op_info_ptr, "Operator %s has not been // registered", @@ -67,7 +63,7 @@ class OpInfoMap { return *op_info_ptr; } - const OpInfo* GetNullable(const std::string& type) const { + const OpInfo *GetNullable(const std::string &type) const { auto it = map_.find(type); if (it == map_.end()) { return nullptr; @@ -76,20 +72,20 @@ class OpInfoMap { } } - const std::unordered_map>& map() const { + const std::unordered_map> &map() const { return map_; } - std::unordered_map>* mutable_map() { + std::unordered_map> *mutable_map() { return &map_; } - private: +private: OpInfoMap() = default; std::unordered_map> map_; // DISABLE_COPY_AND_ASSIGN(OpInfoMap); }; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/op_kernel_type.h b/src/framework/op_kernel_type.h index 9e8d9e6461..67aa0d7ad9 100644 --- a/src/framework/op_kernel_type.h +++ b/src/framework/op_kernel_type.h @@ -25,7 +25,7 @@ namespace paddle_mobile { namespace framework { struct OpKernelType { struct Hash { - size_t operator()(const OpKernelType& key) const { + size_t operator()(const OpKernelType &key) const { int data_type = static_cast(key.data_type_) << LEFT_SHIFT; int data_layout = static_cast(key.data_layout_) << (LEFT_SHIFT * 2); @@ -44,21 +44,21 @@ struct OpKernelType { DataLayout data_layout = DataLayout::kAnyLayout) : 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_; } - 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; } -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_) || NeedTransformLayout(l.data_layout_, r.data_layout_); } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/op_proto_maker.h b/src/framework/op_proto_maker.h index 3ec9bf1611..c4e8fed0cd 100644 --- a/src/framework/op_proto_maker.h +++ b/src/framework/op_proto_maker.h @@ -22,5 +22,5 @@ namespace paddle_mobile { namespace framework { // this class not only make proto but also init attribute checkers. class OpProtoAndCheckerMaker {}; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/operator.cpp b/src/framework/operator.cpp index fdcc3f80cb..5fceb3f1a0 100644 --- a/src/framework/operator.cpp +++ b/src/framework/operator.cpp @@ -23,23 +23,17 @@ namespace paddle_mobile { namespace framework { template -OperatorBase::OperatorBase(const std::string& type, - const VariableNameMap& inputs, - const VariableNameMap& outputs, - const AttributeMap& attrs, +OperatorBase::OperatorBase(const std::string &type, + const VariableNameMap &inputs, + const VariableNameMap &outputs, + const AttributeMap &attrs, std::shared_ptr scope) - : type_(type), - inputs_(inputs), - outputs_(outputs), - attrs_(attrs), + : type_(type), inputs_(inputs), outputs_(outputs), attrs_(attrs), scope_(scope) { CheckAllInputOutputSet(); } -template -void OperatorBase::Run() { - RunImpl(); -} +template void OperatorBase::Run() { RunImpl(); } template void OperatorBase::CheckAllInputOutputSet() const {} @@ -47,5 +41,5 @@ void OperatorBase::CheckAllInputOutputSet() const {} template class OperatorBase; template class OperatorWithKernel; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/operator.h b/src/framework/operator.h index deb228e0b9..e14e30aba8 100644 --- a/src/framework/operator.h +++ b/src/framework/operator.h @@ -35,53 +35,51 @@ SOFTWARE. namespace paddle_mobile { namespace framework { -template -class OperatorBase : PaddleMobileObject { - public: - OperatorBase(const std::string& type, const VariableNameMap& inputs, - const VariableNameMap& outputs, const AttributeMap& attrs, +template class OperatorBase : PaddleMobileObject { +public: + OperatorBase(const std::string &type, const VariableNameMap &inputs, + const VariableNameMap &outputs, const AttributeMap &attrs, std::shared_ptr scope); virtual ~OperatorBase() {} virtual void Run(); - const VariableNameMap& Inputs() const { return inputs_; } - const VariableNameMap& Outputs() const { return outputs_; } - const std::string& Type() const { return type_; } - const AttributeMap& Attrs() const { return attrs_; } + const VariableNameMap &Inputs() const { return inputs_; } + const VariableNameMap &Outputs() const { return outputs_; } + const std::string &Type() const { return type_; } + const AttributeMap &Attrs() const { return attrs_; } - protected: +protected: std::shared_ptr scope_; std::string type_; VariableNameMap inputs_; VariableNameMap outputs_; AttributeMap attrs_; - private: +private: void CheckAllInputOutputSet() const; virtual void RunImpl() const = 0; }; template class OperatorWithKernel : public OperatorBase { - public: - OperatorWithKernel(const std::string& type, const VariableNameMap& inputs, - const VariableNameMap& outputs, const AttributeMap& attrs, +public: + OperatorWithKernel(const std::string &type, const VariableNameMap &inputs, + const VariableNameMap &outputs, const AttributeMap &attrs, std::shared_ptr scope) : OperatorBase(type, inputs, outputs, attrs, scope) {} virtual void InferShape() const = 0; - protected: +protected: virtual void RunImpl() const = 0; - private: +private: }; -template -class OpKernelBase : PaddleMobileObject { - public: - virtual void Compute(const P& para) const = 0; +template class OpKernelBase : PaddleMobileObject { +public: + virtual void Compute(const P ¶) const = 0; virtual ~OpKernelBase() = default; }; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/paddle_mobile_object.h b/src/framework/paddle_mobile_object.h index e084938664..61a42f00ac 100644 --- a/src/framework/paddle_mobile_object.h +++ b/src/framework/paddle_mobile_object.h @@ -18,19 +18,19 @@ SOFTWARE. #pragma once -#include #include "stdio.h" +#include namespace paddle_mobile { class PaddleMobileObject { - public: - virtual inline const std::string& ToString() { +public: + virtual inline const std::string &ToString() { char address[128] = {0}; sprintf(address, "%p", this); return std::string(address); } - private: +private: }; -} // namespace paddle_mobile +} // namespace paddle_mobile diff --git a/src/framework/program.cpp b/src/framework/program.cpp index a3b9cf6a4f..5050ca3aba 100644 --- a/src/framework/program.cpp +++ b/src/framework/program.cpp @@ -18,4 +18,4 @@ SOFTWARE. namespace paddle_mobile { namespace framework {} -} // namespace paddle_mobile +} // namespace paddle_mobile diff --git a/src/framework/program.h b/src/framework/program.h index 07f175bf37..8844757e21 100644 --- a/src/framework/program.h +++ b/src/framework/program.h @@ -28,13 +28,13 @@ namespace framework { template class Program : PaddleMobileObject { - public: +public: std::shared_ptr originProgram; std::shared_ptr optimizeProgram; std::shared_ptr scope; - private: +private: }; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/program_desc.cpp b/src/framework/program_desc.cpp index 4f6a4699bd..a6a9d30a69 100644 --- a/src/framework/program_desc.cpp +++ b/src/framework/program_desc.cpp @@ -18,5 +18,5 @@ std::shared_ptr ProgramDesc::Block(size_t idx) { return blocks_[idx]; } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/program_desc.h b/src/framework/program_desc.h index 79adc70a6f..a86d403c70 100644 --- a/src/framework/program_desc.h +++ b/src/framework/program_desc.h @@ -28,15 +28,15 @@ namespace paddle_mobile { namespace framework { class ProgramDesc : PaddleMobileObject { - public: +public: ProgramDesc(const proto::ProgramDesc &desc); std::shared_ptr Block(size_t idx); const std::vector> &Blocks() { return blocks_; }; - private: +private: std::vector> blocks_; proto::ProgramDesc desc_; }; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/scope.cc b/src/framework/scope.cc index e4c534be39..97ab3020cf 100644 --- a/src/framework/scope.cc +++ b/src/framework/scope.cc @@ -112,5 +112,5 @@ Variable *Scope::FindVarLocally(const std::string &name) const { return nullptr; } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/scope.h b/src/framework/scope.h index 1badc0ea27..6da914dbd8 100644 --- a/src/framework/scope.h +++ b/src/framework/scope.h @@ -18,38 +18,38 @@ SOFTWARE. ==============================================================================*/ #pragma once -#include //std::list -#include //std::mutex -#include //std::unordered_map #include "variable.h" +#include //std::list +#include //std::mutex +#include //std::unordered_map namespace paddle_mobile { namespace framework { class Scope { - public: +public: Scope() {} ~Scope() {} - Scope& NewScope() const; + Scope &NewScope() const; /// 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. - Variable* Var(std::string* name = nullptr); + Variable *Var(std::string *name = nullptr); - void EraseVars(const std::vector& var_names); + void EraseVars(const std::vector &var_names); /// Find a variable in the scope or any of its ancestors. Returns /// 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. - 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. void DropKids(); @@ -58,23 +58,23 @@ class Scope { std::vector LocalVarNames() const; // Rename variable to a new name - void Rename(const std::string& origin_name, - const std::string& new_name) const; + void Rename(const std::string &origin_name, + const std::string &new_name) const; // 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. - explicit Scope(Scope const* parent) : parent_(parent) {} + explicit Scope(Scope const *parent) : parent_(parent) {} - mutable std::unordered_map vars_; - mutable std::list kids_; - Scope const* parent_{nullptr}; + mutable std::unordered_map vars_; + mutable std::list kids_; + Scope const *parent_{nullptr}; mutable std::mutex mutex_; }; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/selected_rows.h b/src/framework/selected_rows.h index e115eaa3a8..93e5c023c5 100644 --- a/src/framework/selected_rows.h +++ b/src/framework/selected_rows.h @@ -27,8 +27,8 @@ namespace paddle_mobile { namespace framework { class SelectedRows { - public: - SelectedRows(const std::vector& rows, const int64_t& height) +public: + SelectedRows(const std::vector &rows, const int64_t &height) : rows_(rows), height_(height) { value_.reset(new Tensor()); } @@ -38,19 +38,19 @@ class SelectedRows { 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_; } void set_height(int64_t height) { height_ = height; } - const std::vector& rows() const { return rows_; } + const std::vector &rows() const { return rows_; } - std::vector* mutable_rows() { return &rows_; } + std::vector *mutable_rows() { return &rows_; } - void set_rows(const std::vector& rows) { rows_ = rows; } + void set_rows(const std::vector &rows) { rows_ = rows; } /** * get the index of id in rows @@ -67,7 +67,7 @@ class SelectedRows { return make_ddim(dims); } - private: +private: // 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 add a Tensor, will the duplicate rows be handled. @@ -76,5 +76,5 @@ class SelectedRows { int64_t height_; }; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/tensor.h b/src/framework/tensor.h index e51b99c8fe..b7182affd6 100644 --- a/src/framework/tensor.h +++ b/src/framework/tensor.h @@ -26,11 +26,9 @@ limitations under the License. */ namespace paddle_mobile { namespace framework { -template -struct SizeOfTypeFunctor; +template struct SizeOfTypeFunctor; -template -struct SizeOfTypeFunctor { +template struct SizeOfTypeFunctor { size_t operator()(std::type_index type) const { if (typeid(T).hash_code() == type.hash_code()) { return sizeof(T); @@ -40,8 +38,7 @@ struct SizeOfTypeFunctor { } }; -template <> -struct SizeOfTypeFunctor<> { +template <> struct SizeOfTypeFunctor<> { size_t operator()(std::type_index type) const { return 0UL; } }; @@ -68,12 +65,11 @@ static inline size_t SizeOfType(std::type_index type) { class LoDTensor; class Tensor { - public: +public: Tensor() : offset_(0) {} /*! Return a pointer to mutable memory block. */ - template - inline T *data() { + template inline T *data() { check_memory_size(); // PADDLE_ENFORCE(std::is_same::value || // holder_->type().hash_code() == typeid(T).hash_code(), @@ -84,8 +80,7 @@ class Tensor { } /*! Return a pointer to constant memory block. */ - template - inline const T *data() const { + template inline const T *data() const { check_memory_size(); // PADDLE_ENFORCE(std::is_same::value || // holder_->type().hash_code() == typeid(T).hash_code(), @@ -102,8 +97,7 @@ class Tensor { * @brief Return a pointer to mutable memory block. * @note If not exist, then allocation. */ - template - inline T *mutable_data() { + template inline T *mutable_data() { static_assert(std::is_pod::value, "T must be POD"); return reinterpret_cast(mutable_data(typeid(T))); } @@ -141,8 +135,7 @@ class Tensor { * * @note If not exist, then allocation. */ - template - inline T *mutable_data(DDim dims) { + template inline T *mutable_data(DDim dims) { static_assert(std::is_pod::value, "T must be POD"); Resize(dims); return mutable_data(); @@ -227,7 +220,7 @@ class Tensor { inline void set_layout(const DataLayout layout) { layout_ = layout; } - private: +private: /** * @note Placeholder hides type T, so it doesn't appear as a template * parameter of Variable. @@ -248,8 +241,7 @@ class Tensor { PlaceholderImpl(size_t size, std::type_index type) : ptr_(static_cast(memory::Alloc(size)), memory::PODDeleter()), - size_(size), - type_(type) { + size_(size), type_(type) { // PADDLE_ENFORCE_NOT_NULL(ptr_, "Insufficient %s // memory to allocation.", // (is_cpu_place(place_) ? @@ -315,5 +307,5 @@ inline Tensor ReshapeToMatrix(const Tensor &src, int num_col_dims) { return res; } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/tensor_util.cc b/src/framework/tensor_util.cc index 02530bed26..a5f6a6a6d4 100644 --- a/src/framework/tensor_util.cc +++ b/src/framework/tensor_util.cc @@ -20,7 +20,7 @@ namespace paddle_mobile { 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 // " // << dst_place; @@ -37,7 +37,7 @@ void TensorCopy(const Tensor& src, Tensor* dst) { 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() // << " to " << dst_place; src.check_memory_size(); @@ -49,17 +49,15 @@ void TensorCopySync(const Tensor& src, Tensor* dst) { memory::Copy(dst_ptr, src_ptr, size); } -template -struct AnyDTypeVisitor { +template struct AnyDTypeVisitor { Predicate predicate_; - const Tensor& tensor_; - Tensor* out_; + const Tensor &tensor_; + Tensor *out_; - AnyDTypeVisitor(Predicate predicate, const Tensor& tensor, Tensor* out) + AnyDTypeVisitor(Predicate predicate, const Tensor &tensor, Tensor *out) : predicate_(predicate), tensor_(tensor), out_(out) {} - template - void operator()() const { + template void operator()() const { // auto t = EigenVector::Flatten(tensor_); // auto o = EigenScalar::From(*out_); // return any of predicate_(t) is true. @@ -68,18 +66,17 @@ struct AnyDTypeVisitor { }; template -inline void AnyImpl(Predicate predicate, const Tensor& tensor, - framework::Tensor* out) { +inline void AnyImpl(Predicate predicate, const Tensor &tensor, + framework::Tensor *out) { VisitDataType(ToDataType(tensor.type()), AnyDTypeVisitor(predicate, tensor, out)); } -template -struct AnyVisitor { - const framework::Tensor& tensor_; +template struct AnyVisitor { + const framework::Tensor &tensor_; Predicate predicate_; - AnyVisitor(const framework::Tensor& tensor, Predicate predicate) + AnyVisitor(const framework::Tensor &tensor, Predicate predicate) : tensor_(tensor), predicate_(std::move(predicate)) {} bool operator()(void) const { @@ -90,13 +87,13 @@ struct AnyVisitor { return this->GetResult(out); } - bool GetResult(const framework::Tensor& out) const { + bool GetResult(const framework::Tensor &out) const { return *out.data(); } }; template -inline bool Any(const framework::Tensor& tensor, Predicate predicate) { +inline bool Any(const framework::Tensor &tensor, Predicate predicate) { AnyVisitor visitor(tensor, predicate); // return platform::VisitPlace(visitor); return visitor(); @@ -104,101 +101,100 @@ inline bool Any(const framework::Tensor& tensor, Predicate predicate) { struct ContainsNANPredicate { template - auto operator()(const T& eigen_vec) const + auto operator()(const T &eigen_vec) const -> decltype(std::declval().isnan()) { // Cast eigen_vector to vector of bool. true if is inf. return eigen_vec.isnan(); } }; -bool TensorContainsNAN(const framework::Tensor& tensor) { +bool TensorContainsNAN(const framework::Tensor &tensor) { ContainsNANPredicate predicate; return Any(tensor, predicate); } struct ContainsInfPredicate { template - auto operator()(const T& eigen_vec) const + auto operator()(const T &eigen_vec) const -> decltype(std::declval().isinf()) { // Cast eigen_vector to vector of bool. true if is inf. return eigen_vec.isinf(); } }; -bool TensorContainsInf(const framework::Tensor& tensor) { +bool TensorContainsInf(const framework::Tensor &tensor) { ContainsInfPredicate predicate; return Any(tensor, predicate); } -void TensorToStream(std::ostream& os, const Tensor& tensor) { - { // the 1st field, uint32_t version +void TensorToStream(std::ostream &os, const Tensor &tensor) { + { // the 1st field, uint32_t version constexpr uint32_t version = 0; - os.write(reinterpret_cast(&version), sizeof(version)); + os.write(reinterpret_cast(&version), sizeof(version)); } - { // the 2nd field, tensor description - // int32_t size - // void* protobuf message + { // the 2nd field, tensor description + // int32_t size + // void* protobuf message proto::VarType::TensorDesc desc; desc.set_data_type(framework::ToDataType(tensor.type())); auto dims = framework::vectorize(tensor.dims()); - auto* pb_dims = desc.mutable_dims(); + auto *pb_dims = desc.mutable_dims(); pb_dims->Resize(static_cast(dims.size()), 0); std::copy(dims.begin(), dims.end(), pb_dims->begin()); int32_t size = desc.ByteSize(); - os.write(reinterpret_cast(&size), sizeof(size)); + os.write(reinterpret_cast(&size), sizeof(size)); auto out = desc.SerializeAsString(); os.write(out.data(), size); } - { // the 3rd field, tensor data + { // the 3rd field, tensor data uint64_t size = tensor.memory_size(); - auto* data_ptr = tensor.data(); + auto *data_ptr = tensor.data(); // PADDLE_ENFORCE(size < std::numeric_limits::max(), // "Index overflow when writing tensor"); - os.write(static_cast(data_ptr), + os.write(static_cast(data_ptr), static_cast(size)); } } struct DeserializedDataFunctor { - DeserializedDataFunctor(void** buf, Tensor* tensor) + DeserializedDataFunctor(void **buf, Tensor *tensor) : buf_(buf), tensor_(tensor) {} - template - void operator()() { + template void operator()() { *buf_ = tensor_->mutable_data(); } - void** buf_; - Tensor* tensor_; + void **buf_; + Tensor *tensor_; }; -void TensorFromStream(std::istream& is, framework::Tensor* tensor) { +void TensorFromStream(std::istream &is, framework::Tensor *tensor) { uint32_t version; - is.read(reinterpret_cast(&version), sizeof(version)); + is.read(reinterpret_cast(&version), sizeof(version)); // PADDLE_ENFORCE_EQ(version, 0U, "Only version 0 is supported"); proto::VarType::TensorDesc desc; - { // int32_t size - // proto buffer + { // int32_t size + // proto buffer int32_t size; - is.read(reinterpret_cast(&size), sizeof(size)); + is.read(reinterpret_cast(&size), sizeof(size)); std::unique_ptr buf(new char[size]); - is.read(reinterpret_cast(buf.get()), size); + is.read(reinterpret_cast(buf.get()), size); // PADDLE_ENFORCE(desc.ParseFromArray(buf.get(), size), // "Cannot parse tensor desc"); } - { // read tensor + { // read tensor std::vector dims; dims.reserve(static_cast(desc.dims().size())); std::copy(desc.dims().begin(), desc.dims().end(), std::back_inserter(dims)); tensor->Resize(framework::make_ddim(dims)); - void* buf; + void *buf; framework::VisitDataType(desc.data_type(), DeserializedDataFunctor(&buf, tensor)); - is.read(static_cast(buf), tensor->memory_size()); + is.read(static_cast(buf), tensor->memory_size()); } } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/tensor_util.h b/src/framework/tensor_util.h index a0c7b8a7dd..2d91febf61 100644 --- a/src/framework/tensor_util.h +++ b/src/framework/tensor_util.h @@ -13,54 +13,54 @@ See the License for the specific language governing permissions and limitations under the License. */ #pragma once -#include #include "framework.pb.h" #include "memory/t_malloc.h" #include "platform/data_type.h" #include "tensor.h" +#include namespace paddle_mobile { namespace framework { -void TensorCopy(const Tensor& src, Tensor* dst); -void TensorCopySync(const Tensor& src, Tensor* dst); +void TensorCopy(const Tensor &src, Tensor *dst); +void TensorCopySync(const Tensor &src, Tensor *dst); template -void TensorFromVector(const std::vector& src, Tensor* dst); +void TensorFromVector(const std::vector &src, Tensor *dst); template -void TesnorToVector(const Tensor& src, std::vector* dst); +void TesnorToVector(const Tensor &src, std::vector *dst); -bool TensorContainsNAN(const framework::Tensor& tensor); -bool TensorContainsInf(const framework::Tensor& tensor); +bool TensorContainsNAN(const framework::Tensor &tensor); +bool TensorContainsInf(const framework::Tensor &tensor); -void TensorToStream(std::ostream& os, const Tensor& tensor); -void TensorFromStream(std::istream& is, Tensor* tensor); +void TensorToStream(std::ostream &os, const Tensor &tensor); +void TensorFromStream(std::istream &is, Tensor *tensor); // // The implementation of template functions. // template -void TensorFromVector(const std::vector& src, Tensor* dst) { - auto src_ptr = static_cast(src.data()); +void TensorFromVector(const std::vector &src, Tensor *dst) { + auto src_ptr = static_cast(src.data()); dst->Resize({static_cast(src.size())}); - auto dst_ptr = static_cast(dst->mutable_data()); + auto dst_ptr = static_cast(dst->mutable_data()); auto size = src.size() * sizeof(T); memory::Copy(dst_ptr, src_ptr, size); } template -void TensorToVector(const Tensor& src, std::vector* dst) { - auto src_ptr = static_cast(src.data()); +void TensorToVector(const Tensor &src, std::vector *dst) { + auto src_ptr = static_cast(src.data()); auto size = src.numel() * sizeof(T); dst->resize(src.numel()); - auto dst_ptr = static_cast(dst->data()); + auto dst_ptr = static_cast(dst->data()); memory::Copy(dst_ptr, src_ptr, size); } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/var_desc.cpp b/src/framework/var_desc.cpp index f0049e0489..4e2fa2be2b 100644 --- a/src/framework/var_desc.cpp +++ b/src/framework/var_desc.cpp @@ -24,5 +24,5 @@ namespace framework { VarDesc::VarDesc(const proto::VarDesc &desc) : desc_(desc) {} -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/var_desc.h b/src/framework/var_desc.h index 82d07a383e..6852966a87 100644 --- a/src/framework/var_desc.h +++ b/src/framework/var_desc.h @@ -25,7 +25,7 @@ namespace paddle_mobile { namespace framework { class VarDesc { - public: +public: VarDesc(const proto::VarDesc &desc); std::string Name() const { return desc_.name(); } @@ -36,33 +36,33 @@ class VarDesc { const proto::VarType::ChannelDesc &channel_desc() const { switch (desc_.type().type()) { - case proto::VarType::CHANNEL: - return desc_.type().channel(); - default: - break; + case proto::VarType::CHANNEL: + return desc_.type().channel(); + default: + break; } } const proto::VarType::TensorDesc &tensor_desc() const { switch (desc_.type().type()) { - case proto::VarType::SELECTED_ROWS: - return desc_.type().selected_rows(); - case proto::VarType::LOD_TENSOR: - return desc_.type().lod_tensor().tensor(); - case proto::VarType::LOD_TENSOR_ARRAY: - return desc_.type().tensor_array().tensor(); - default: - break; + case proto::VarType::SELECTED_ROWS: + return desc_.type().selected_rows(); + case proto::VarType::LOD_TENSOR: + return desc_.type().lod_tensor().tensor(); + case proto::VarType::LOD_TENSOR_ARRAY: + return desc_.type().tensor_array().tensor(); + default: + break; } } proto::VarType::Type GetDataType() const { switch (desc_.type().type()) { - case proto::VarType::CHANNEL: - return channel_desc().data_type(); - break; - default: - return tensor_desc().data_type(); + case proto::VarType::CHANNEL: + return channel_desc().data_type(); + break; + default: + return tensor_desc().data_type(); } } @@ -80,9 +80,9 @@ class VarDesc { return this->RepeatedToVector(tensor_desc().dims()); } - private: +private: proto::VarDesc desc_; }; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/var_type.h b/src/framework/var_type.h index 2c9bacad32..bfe43a11f7 100644 --- a/src/framework/var_type.h +++ b/src/framework/var_type.h @@ -34,5 +34,5 @@ inline proto::VarType::Type ToVarType(std::type_index type) { } } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/framework/variable.h b/src/framework/variable.h index 13f594a655..d30429d4c5 100644 --- a/src/framework/variable.h +++ b/src/framework/variable.h @@ -18,42 +18,39 @@ SOFTWARE. ==============================================================================*/ #pragma once +#include "paddle_mobile_object.h" #include #include #include #include #include -#include "paddle_mobile_object.h" namespace paddle_mobile { namespace framework { class Variable : public PaddleMobileObject { - public: +public: Variable() {} ~Variable() {} - template - const T* Get() const { - return static_cast(holder_->Ptr()); + template const T *Get() const { + return static_cast(holder_->Ptr()); } bool IsInitialized() const { return holder_ != nullptr; } - const std::string* Name() { return name_; } + const std::string *Name() { return name_; } - template - T* GetMutable() { + template T *GetMutable() { if (!IsType()) { if (*Name() == "pixel") { // std::cout << " reset " << *Name() << std::endl; } holder_.reset(new PlaceholderImp(new T())); } - return static_cast(holder_->Ptr()); + return static_cast(holder_->Ptr()); } - template - bool IsType() const { + template bool IsType() const { if (holder_) { // printf("not null \n"); printf(" holder type : %s, this type %s \n", holder_->Type().name(), @@ -69,33 +66,32 @@ class Variable : public PaddleMobileObject { 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 { Placeholder() = default; virtual ~Placeholder() = default; - virtual const std::type_info& Type() const = 0; - virtual void* Ptr() const = 0; + virtual const std::type_info &Type() const = 0; + virtual void *Ptr() const = 0; }; - template - struct PlaceholderImp : public Placeholder { - explicit PlaceholderImp(T* ptr) : ptr_(ptr), type_(typeid(T)) {} + template struct PlaceholderImp : public Placeholder { + explicit PlaceholderImp(T *ptr) : ptr_(ptr), type_(typeid(T)) {} - virtual const std::type_info& Type() const { return type_; } - virtual void* Ptr() const override { - return static_cast(ptr_.get()); + virtual const std::type_info &Type() const { return type_; } + virtual void *Ptr() const override { + return static_cast(ptr_.get()); } std::unique_ptr ptr_; - const std::type_info& type_; + const std::type_info &type_; }; std::unique_ptr holder_; friend class Scope; - const std::string* name_; + const std::string *name_; }; -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/io.cpp b/src/io.cpp index 921ce591b3..5fb7d8b30a 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -45,10 +45,10 @@ void Loader::LoadVar(framework::LoDTensor *tensor, std::ifstream is(file_path); - std::streampos pos = is.tellg(); // save current position + std::streampos pos = is.tellg(); // save current position is.seekg(0, std::ios::end); // std::cout << " file length = " << is.tellg() << std::endl; - is.seekg(pos); // restore saved position + is.seekg(pos); // restore saved position // 1. version uint32_t version; @@ -106,34 +106,34 @@ void Loader::LoadVar(framework::LoDTensor *tensor, int type_size = 0; // std::cout << " desc pre type: "; switch (desc.data_type()) { - case framework::proto::VarType::FP16: - // std::cout << "FP16" << std::endl; - type_size = 2; - break; - case framework::proto::VarType::FP32: - type_size = 4; - memory = tensor->mutable_data(); - // std::cout << "FP32" << std::endl; - break; - case framework::proto::VarType::FP64: - type_size = 8; - // std::cout << "FP64" << std::endl; - break; - case framework::proto::VarType::INT32: - type_size = 4; - // std::cout << "INT32" << std::endl; - break; - case framework::proto::VarType::INT64: - type_size = 8; - // std::cout << "INT64" << std::endl; - break; - case framework::proto::VarType::BOOL: - type_size = 1; - // std::cout << "BOOL" << std::endl; - break; - default: - break; - // std::cout << " not support" << std::endl; + case framework::proto::VarType::FP16: + // std::cout << "FP16" << std::endl; + type_size = 2; + break; + case framework::proto::VarType::FP32: + type_size = 4; + memory = tensor->mutable_data(); + // std::cout << "FP32" << std::endl; + break; + case framework::proto::VarType::FP64: + type_size = 8; + // std::cout << "FP64" << std::endl; + break; + case framework::proto::VarType::INT32: + type_size = 4; + // std::cout << "INT32" << std::endl; + break; + case framework::proto::VarType::INT64: + type_size = 8; + // std::cout << "INT64" << std::endl; + break; + case framework::proto::VarType::BOOL: + type_size = 1; + // std::cout << "BOOL" << std::endl; + break; + default: + break; + // std::cout << " not support" << std::endl; } // std::cout << " malloc size: " << memory_size * type_size << std::endl; @@ -143,8 +143,8 @@ void Loader::LoadVar(framework::LoDTensor *tensor, }; template -const framework::Program Loader::Load( - const std::string &dirname) { +const framework::Program +Loader::Load(const std::string &dirname) { std::string model_filename = dirname + "/__model__"; std::string program_desc_str; ReadBinaryFile(model_filename, &program_desc_str); @@ -217,43 +217,43 @@ const framework::Program Loader::Load( // std::cout << " attr type: " << attr.type() << std::endl; switch (attr.type()) { - case framework::proto::AttrType::BOOLEAN: - // std::cout << " boolen: " << attr.b() << std::endl; - break; - case framework::proto::AttrType::INT: - // std::cout << " int: " << attr.i() << std::endl; - break; - case framework::proto::AttrType::FLOAT: - // std::cout << " float: " << attr.f() << std::endl; - case framework::proto::AttrType::STRING: - // std::cout << " string: " << attr.s() << std::endl; - case framework::proto::AttrType::BOOLEANS: - // std::vector - // bools(attr.bools_size()); - for (int y = 0; y < attr.bools_size(); ++y) { - // std::cout << " bool - " << attr.bools(y) << - // std::endl; - } - case framework::proto::AttrType::LONG: - // std::cout << " long: " << attr.l() << std::endl; - case framework::proto::AttrType::FLOATS: - for (int y = 0; y < attr.floats_size(); ++y) { - // std::cout << " float - " << y << ": " << - // attr.floats(y) - // << std::endl; - } - case framework::proto::AttrType::INTS: - for (int y = 0; y < attr.ints_size(); ++y) { - // std::cout << " int - " << y << ": " << - // attr.ints(y) - // << std::endl; - } - case framework::proto::AttrType::STRINGS: - for (int y = 0; y < attr.strings_size(); ++y) { - // std::cout << " string - " << y << ": " << - // attr.strings(y) - // << std::endl; - } + case framework::proto::AttrType::BOOLEAN: + // std::cout << " boolen: " << attr.b() << std::endl; + break; + case framework::proto::AttrType::INT: + // std::cout << " int: " << attr.i() << std::endl; + break; + case framework::proto::AttrType::FLOAT: + // std::cout << " float: " << attr.f() << std::endl; + case framework::proto::AttrType::STRING: + // std::cout << " string: " << attr.s() << std::endl; + case framework::proto::AttrType::BOOLEANS: + // std::vector + // bools(attr.bools_size()); + for (int y = 0; y < attr.bools_size(); ++y) { + // std::cout << " bool - " << attr.bools(y) << + // std::endl; + } + case framework::proto::AttrType::LONG: + // std::cout << " long: " << attr.l() << std::endl; + case framework::proto::AttrType::FLOATS: + for (int y = 0; y < attr.floats_size(); ++y) { + // std::cout << " float - " << y << ": " << + // attr.floats(y) + // << std::endl; + } + case framework::proto::AttrType::INTS: + for (int y = 0; y < attr.ints_size(); ++y) { + // std::cout << " int - " << y << ": " << + // attr.ints(y) + // << std::endl; + } + case framework::proto::AttrType::STRINGS: + for (int y = 0; y < attr.strings_size(); ++y) { + // std::cout << " string - " << y << ": " << + // attr.strings(y) + // << std::endl; + } } } } @@ -280,10 +280,10 @@ const framework::Program Loader::Load( // std::cout << " to load " << var.name() << std::endl; std::string file_path = dirname + "/" + var.name(); std::ifstream is(file_path); - std::streampos pos = is.tellg(); // save current position + std::streampos pos = is.tellg(); // save current position is.seekg(0, std::ios::end); // std::cout << " file length = " << is.tellg() << std::endl; - is.seekg(pos); // restore saved position + is.seekg(pos); // restore saved position // 1. version uint32_t version; @@ -333,33 +333,33 @@ const framework::Program Loader::Load( int type_size = 0; // std::cout << " desc pre type: "; switch (desc.data_type()) { - case framework::proto::VarType::FP16: - // std::cout << "FP16" << std::endl; - type_size = 2; - break; - case framework::proto::VarType::FP32: - type_size = 4; - // std::cout << "FP32" << std::endl; - break; - case framework::proto::VarType::FP64: - type_size = 8; - // std::cout << "FP64" << std::endl; - break; - case framework::proto::VarType::INT32: - type_size = 4; - // std::cout << "INT32" << std::endl; - break; - case framework::proto::VarType::INT64: - type_size = 8; - // std::cout << "INT64" << std::endl; - break; - case framework::proto::VarType::BOOL: - type_size = 1; - // std::cout << "BOOL" << std::endl; - break; - default: - break; - // std::cout << " not support" << std::endl; + case framework::proto::VarType::FP16: + // std::cout << "FP16" << std::endl; + type_size = 2; + break; + case framework::proto::VarType::FP32: + type_size = 4; + // std::cout << "FP32" << std::endl; + break; + case framework::proto::VarType::FP64: + type_size = 8; + // std::cout << "FP64" << std::endl; + break; + case framework::proto::VarType::INT32: + type_size = 4; + // std::cout << "INT32" << std::endl; + break; + case framework::proto::VarType::INT64: + type_size = 8; + // std::cout << "INT64" << std::endl; + break; + case framework::proto::VarType::BOOL: + type_size = 1; + // std::cout << "BOOL" << std::endl; + break; + default: + break; + // std::cout << " not support" << std::endl; } // std::cout << " malloc size: " << memory_size * type_size @@ -381,4 +381,4 @@ const framework::Program Loader::Load( template class Loader; -} // namespace paddle_mobile +} // namespace paddle_mobile diff --git a/src/io.h b/src/io.h index 6eb73eec72..25837358c2 100644 --- a/src/io.h +++ b/src/io.h @@ -29,11 +29,11 @@ namespace paddle_mobile { template class Loader : PaddleMobileObject { - public: +public: const framework::Program Load(const std::string &dirname); - private: +private: void LoadVar(framework::LoDTensor *tensor, const std::string &file_path); }; -} // namespace paddle_mobile +} // namespace paddle_mobile diff --git a/src/memory/t_malloc.cc b/src/memory/t_malloc.cc index aefd37c62a..5b3086a8b0 100644 --- a/src/memory/t_malloc.cc +++ b/src/memory/t_malloc.cc @@ -47,5 +47,5 @@ void Free(void *ptr) { } } -} // namespace memory -} // namespace paddle_mobile +} // namespace memory +} // namespace paddle_mobile diff --git a/src/memory/t_malloc.h b/src/memory/t_malloc.h index 30d0b03682..cd2e0e6835 100644 --- a/src/memory/t_malloc.h +++ b/src/memory/t_malloc.h @@ -37,11 +37,10 @@ void Free(void *ptr); * std::unique_ptr in tensor.h. * static_cast */ -template -class PODDeleter { +template class PODDeleter { static_assert(std::is_pod::value, "T must be POD"); - public: +public: explicit PODDeleter(){}; void operator()(T *ptr) { Free(static_cast(ptr)); } @@ -55,12 +54,11 @@ class PODDeleter { * std::unique_ptr in tensor.h. * reinterpret_cast */ -template -class PlainDeleter { - public: +template class PlainDeleter { +public: explicit PlainDeleter(){}; void operator()(T *ptr) { Free(reinterpret_cast(ptr)); } }; -} // namespace memory -} // namespace paddle_mobile +} // namespace memory +} // namespace paddle_mobile diff --git a/src/operators/conv_op.cpp b/src/operators/conv_op.cpp index bafb3dbc2a..11947216cb 100644 --- a/src/operators/conv_op.cpp +++ b/src/operators/conv_op.cpp @@ -72,5 +72,5 @@ void ConvOp::InferShape() const { template class ConvOp; -} // namespace operators -} // namespace paddle_mobile +} // namespace operators +} // namespace paddle_mobile diff --git a/src/operators/conv_op.h b/src/operators/conv_op.h index 9acfc13fcb..4126c49f93 100644 --- a/src/operators/conv_op.h +++ b/src/operators/conv_op.h @@ -28,9 +28,9 @@ using namespace framework; template class ConvOp : public framework::OperatorWithKernel { - public: - ConvOp(const std::string& type, const VariableNameMap& inputs, - const VariableNameMap& outputs, const framework::AttributeMap& attrs, +public: + ConvOp(const std::string &type, const VariableNameMap &inputs, + const VariableNameMap &outputs, const framework::AttributeMap &attrs, std::shared_ptr scope) : framework::OperatorWithKernel(type, inputs, outputs, attrs, scope), @@ -39,7 +39,7 @@ class ConvOp : public framework::OperatorWithKernel { using framework::OperatorWithKernel::OperatorWithKernel; void InferShape() const override; - protected: +protected: void RunImpl() const { operators::ConvKernel kernel; kernel.Compute(param_); @@ -48,5 +48,5 @@ class ConvOp : public framework::OperatorWithKernel { ConvParam param_; }; -} // operators -} // paddle_mobile +} // operators +} // paddle_mobile diff --git a/src/operators/kernel/arm/conv_kernel.cpp b/src/operators/kernel/arm/conv_kernel.cpp index 24baa5699f..f545323291 100644 --- a/src/operators/kernel/arm/conv_kernel.cpp +++ b/src/operators/kernel/arm/conv_kernel.cpp @@ -21,9 +21,9 @@ SOFTWARE. namespace paddle_mobile { namespace operators { -bool IsExpand(const std::vector& filter_dim, - const std::vector& strides, const std::vector& paddings, - const std::vector& dilations) { +bool IsExpand(const std::vector &filter_dim, + const std::vector &strides, const std::vector &paddings, + const std::vector &dilations) { bool filter_1 = true, strides_1 = true, padding_0 = true, dilation_1 = true; for (size_t j = 0; j < strides.size(); ++j) { filter_1 = filter_1 && (static_cast(filter_dim[j + 2]) == 1); @@ -35,8 +35,8 @@ bool IsExpand(const std::vector& filter_dim, } template <> -void ConvKernel::Compute(const ConvParam& param) const { - const Tensor* input = param.Input(); +void ConvKernel::Compute(const ConvParam ¶m) const { + const Tensor *input = param.Input(); std::cout << " conv param " << param << std::endl; @@ -45,7 +45,7 @@ void ConvKernel::Compute(const ConvParam& param) const { // that avoids modifying the variable in the Scope. Tensor filter = *param.Filter(); - Tensor* output = param.Output(); + Tensor *output = param.Output(); // output->mutable_data(context.GetPlace()); int groups = param.Groups(); @@ -149,5 +149,5 @@ void ConvKernel::Compute(const ConvParam& param) const { template class ConvKernel; -} // namespace operators -} // namespace paddle_mobile +} // namespace operators +} // namespace paddle_mobile diff --git a/src/operators/kernel/conv_kernel.h b/src/operators/kernel/conv_kernel.h index 8f72b27cc1..14fe8cf47e 100644 --- a/src/operators/kernel/conv_kernel.h +++ b/src/operators/kernel/conv_kernel.h @@ -31,7 +31,7 @@ using namespace framework; template class ConvKernel : public framework::OpKernelBase { - public: +public: void Compute(const ConvParam ¶m) const; }; } diff --git a/src/operators/math/im2col.cc b/src/operators/math/im2col.cc index 4cc43952b6..77e957a6b9 100644 --- a/src/operators/math/im2col.cc +++ b/src/operators/math/im2col.cc @@ -24,12 +24,11 @@ namespace math { * col = * [input_channels, filter_height, filter_width, output_height, output_width] */ -template -class Im2ColFunctor { - public: - void operator()(const framework::Tensor& im, const std::vector& dilation, - const std::vector& stride, - const std::vector& padding, framework::Tensor* col) { +template class Im2ColFunctor { +public: + void operator()(const framework::Tensor &im, const std::vector &dilation, + const std::vector &stride, + const std::vector &padding, framework::Tensor *col) { // PADDLE_ENFORCE(im.dims().size() == 3); // PADDLE_ENFORCE(col->dims().size() == 5); @@ -58,8 +57,8 @@ class Im2ColFunctor { int channels_col = im_channels * filter_height * filter_width; - const T* im_data = im.data(); - T* col_data = col->data(); + const T *im_data = im.data(); + T *col_data = col->data(); for (int c = 0; c < channels_col; ++c) { int w_offset = c % filter_width; int h_offset = (c / filter_width) % filter_height; @@ -86,13 +85,12 @@ class Im2ColFunctor { * col = * [input_channels, filter_height, filter_width, output_height, output_width] */ -template -class Col2ImFunctor { - public: - void operator()(const framework::Tensor& col, - const std::vector& dilation, - const std::vector& stride, - const std::vector& padding, framework::Tensor* im) { +template class Col2ImFunctor { +public: + void operator()(const framework::Tensor &col, + const std::vector &dilation, + const std::vector &stride, + const std::vector &padding, framework::Tensor *im) { // PADDLE_ENFORCE(im->dims().size() == 3); // PADDLE_ENFORCE(col.dims().size() == 5); int im_channels = im->dims()[0]; @@ -120,8 +118,8 @@ class Col2ImFunctor { int channels_col = im_channels * filter_height * filter_width; - T* im_data = im->data(); - const T* col_data = col.data(); + T *im_data = im->data(); + const T *col_data = col.data(); for (int c = 0; c < channels_col; ++c) { int w_offset = c % filter_width; @@ -152,12 +150,11 @@ template class Col2ImFunctor; * col = * [output_height, output_width, input_channels, filter_height, filter_width] */ -template -class Im2ColFunctor { - public: - void operator()(const framework::Tensor& im, const std::vector& dilation, - const std::vector& stride, - const std::vector& padding, framework::Tensor* col) { +template class Im2ColFunctor { +public: + void operator()(const framework::Tensor &im, const std::vector &dilation, + const std::vector &stride, + const std::vector &padding, framework::Tensor *col) { // PADDLE_ENFORCE(im.dims().size() == 3); // PADDLE_ENFORCE(col->dims().size() == 5); int im_channels = im.dims()[0]; @@ -177,8 +174,8 @@ class Im2ColFunctor { // 1, col_width, "col_width and padding(padding_left, padding_right) // are " "inconsistent."); - const T* im_data = im.data(); - T* col_data = col->data(); + const T *im_data = im.data(); + T *col_data = col->data(); 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) { @@ -220,13 +217,12 @@ class Im2ColFunctor { * col = * [output_height, output_width, input_channels, filter_height, filter_width] */ -template -class Col2ImFunctor { - public: - void operator()(const framework::Tensor& col, - const std::vector& dilation, - const std::vector& stride, - const std::vector& padding, framework::Tensor* im) { +template class Col2ImFunctor { +public: + void operator()(const framework::Tensor &col, + const std::vector &dilation, + const std::vector &stride, + const std::vector &padding, framework::Tensor *im) { // PADDLE_ENFORCE(im->dims().size() == 3); // PADDLE_ENFORCE(col.dims().size() == 5); int im_channels = im->dims()[0]; @@ -246,8 +242,8 @@ class Col2ImFunctor { // 1, col_width, "col_width and padding(padding_left, padding_right) // are " "inconsistent."); - T* im_data = im->data(); - const T* col_data = col.data(); + T *im_data = im->data(); + const T *col_data = col.data(); 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) { @@ -289,6 +285,6 @@ template class Im2ColFunctor; template class Col2ImFunctor; template class Col2ImFunctor; -} // namespace math -} // namespace operators -} // namespace paddle_mobile +} // namespace math +} // namespace operators +} // namespace paddle_mobile diff --git a/src/operators/math/im2col.h b/src/operators/math/im2col.h index 7e5dd96245..0bb8ed1264 100644 --- a/src/operators/math/im2col.h +++ b/src/operators/math/im2col.h @@ -79,21 +79,21 @@ enum class ColFormat { kCFO = 0, kOCF = 1 }; */ template class Im2ColFunctor { - public: - void operator()(const framework::Tensor& im, const std::vector& dilation, - const std::vector& stride, - const std::vector& padding, framework::Tensor* col); +public: + void operator()(const framework::Tensor &im, const std::vector &dilation, + const std::vector &stride, + const std::vector &padding, framework::Tensor *col); }; template class Col2ImFunctor { - public: - void operator()(const framework::Tensor& col, - const std::vector& dilation, - const std::vector& stride, - const std::vector& padding, framework::Tensor* im); +public: + void operator()(const framework::Tensor &col, + const std::vector &dilation, + const std::vector &stride, + const std::vector &padding, framework::Tensor *im); }; -} // namespace math -} // namespace operators -} // namespace paddle_mobile +} // namespace math +} // namespace operators +} // namespace paddle_mobile diff --git a/src/operators/math/math_function.cc b/src/operators/math/math_function.cc index 0ddfc4593e..554275c499 100644 --- a/src/operators/math/math_function.cc +++ b/src/operators/math/math_function.cc @@ -21,7 +21,7 @@ namespace math { template <> void gemm(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB, 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 ldb = (transB == CblasNoTrans) ? N : K; int ldc = N; @@ -32,8 +32,8 @@ void gemm(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB, template <> void gemm(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB, const int M, const int N, const int K, const double alpha, - const double* A, const double* B, const double beta, - double* C) { + const double *A, const double *B, const double beta, + double *C) { int lda = (transA == CblasNoTrans) ? K : M; int ldb = (transB == CblasNoTrans) ? N : K; int ldc = N; @@ -43,8 +43,8 @@ void gemm(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB, template <> void gemm(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 float* B, const int ldb, const float beta, float* C, + const int K, const float alpha, const float *A, const int lda, + const float *B, const int ldb, const float beta, float *C, const int ldc) { cblas_sgemm(CblasRowMajor, transA == false ? CblasNoTrans : CblasTrans, transB == false ? CblasNoTrans : CblasTrans, M, N, K, alpha, A, @@ -53,18 +53,18 @@ void gemm(const bool transA, const bool transB, const int M, const int N, template <> void gemm(const bool transA, const bool transB, const int M, - const int N, const int K, const double alpha, const double* A, - const int lda, const double* B, const int ldb, - const double beta, double* C, const int ldc) { + const int N, const int K, const double alpha, const double *A, + const int lda, const double *B, const int ldb, + const double beta, double *C, const int ldc) { cblas_dgemm(CblasRowMajor, transA == false ? CblasNoTrans : CblasTrans, transB == false ? CblasNoTrans : CblasTrans, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); } template <> -void matmul(const framework::Tensor& matrix_a, bool trans_a, - const framework::Tensor& matrix_b, bool trans_b, float alpha, - framework::Tensor* matrix_out, float beta) { +void matmul(const framework::Tensor &matrix_a, bool trans_a, + const framework::Tensor &matrix_b, bool trans_b, float alpha, + framework::Tensor *matrix_out, float beta) { auto dim_a = matrix_a.dims(); auto dim_b = matrix_b.dims(); auto dim_out = matrix_out->dims(); @@ -89,9 +89,9 @@ void matmul(const framework::Tensor& matrix_a, bool trans_a, } template <> -void matmul(const framework::Tensor& matrix_a, bool trans_a, - const framework::Tensor& matrix_b, bool trans_b, - double alpha, framework::Tensor* matrix_out, double beta) { +void matmul(const framework::Tensor &matrix_a, bool trans_a, + const framework::Tensor &matrix_b, bool trans_b, + double alpha, framework::Tensor *matrix_out, double beta) { auto dim_a = matrix_a.dims(); auto dim_b = matrix_b.dims(); auto dim_out = matrix_out->dims(); @@ -115,6 +115,6 @@ void matmul(const framework::Tensor& matrix_a, bool trans_a, matrix_b.data(), beta, matrix_out->data()); } -} // namespace math -} // namespace operators -} // namespace paddle_mobile +} // namespace math +} // namespace operators +} // namespace paddle_mobile diff --git a/src/operators/math/math_function.h b/src/operators/math/math_function.h index 3b907122c1..c6cfea8856 100644 --- a/src/operators/math/math_function.h +++ b/src/operators/math/math_function.h @@ -14,9 +14,9 @@ limitations under the License. */ #pragma once +#include "framework/tensor.h" #include #include -#include "framework/tensor.h" namespace paddle_mobile { namespace operators { @@ -24,19 +24,19 @@ namespace math { template 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 T* B, const T beta, T* C); + const int M, const int N, const int K, const T alpha, const T *A, + const T *B, const T beta, T *C); template 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 ldb, const T beta, T* C, const int ldc); + 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); // matrix multiply with continuous memory template -void matmul(const framework::Tensor& matrix_a, bool trans_a, - const framework::Tensor& matrix_b, bool trans_b, T alpha, - framework::Tensor* matrix_out, T beta); -} // namespace math -} // namespace operators -} // namespace paddle_mobile +void matmul(const framework::Tensor &matrix_a, bool trans_a, + const framework::Tensor &matrix_b, bool trans_b, T alpha, + framework::Tensor *matrix_out, T beta); +} // namespace math +} // namespace operators +} // namespace paddle_mobile diff --git a/src/operators/math/vol2col.cc b/src/operators/math/vol2col.cc index 0de774e1b6..26e146a087 100644 --- a/src/operators/math/vol2col.cc +++ b/src/operators/math/vol2col.cc @@ -25,12 +25,11 @@ using Tensor = paddle_mobile::framework::Tensor; * [input_channels, filter_depth, filter_height, filter_width, * output_depth, output_height, output_width] */ -template -class Vol2ColFunctor { - public: - void operator()(const Tensor& vol, const std::vector& dilations, - const std::vector& strides, - const std::vector& paddings, Tensor* col) const { +template class Vol2ColFunctor { +public: + void operator()(const Tensor &vol, const std::vector &dilations, + const std::vector &strides, + const std::vector &paddings, Tensor *col) const { // PADDLE_ENFORCE(vol.dims().size() == 4); // PADDLE_ENFORCE(col->dims().size() == 7); @@ -69,8 +68,8 @@ class Vol2ColFunctor { // "input_width and output_width are " // "mismatching."); - const T* vol_data = vol.data(); - T* col_data = col->data(); + const T *vol_data = vol.data(); + T *col_data = col->data(); for (int c = 0; c < channels_col; ++c) { int w_offset = c % filter_width; @@ -108,12 +107,11 @@ class Vol2ColFunctor { * [input_channels, filter_depth, filter_height, filter_width, * output_depth, output_height, output_width] */ -template -class Col2VolFunctor { - public: - void operator()(const Tensor& col, const std::vector& dilations, - const std::vector& strides, - const std::vector& paddings, Tensor* vol) const { +template class Col2VolFunctor { +public: + void operator()(const Tensor &col, const std::vector &dilations, + const std::vector &strides, + const std::vector &paddings, Tensor *vol) const { // PADDLE_ENFORCE(vol->dims().size() == 4); // PADDLE_ENFORCE(col.dims().size() == 7); @@ -151,8 +149,8 @@ class Col2VolFunctor { // output_width, // "input_width and output_width are " // "mismatching."); - T* vol_data = vol->data(); - const T* col_data = col.data(); + T *vol_data = vol->data(); + const T *col_data = col.data(); for (int c = 0; c < channels_col; ++c) { int w_offset = c % filter_width; @@ -190,6 +188,6 @@ template class Vol2ColFunctor; template class Col2VolFunctor; template class Col2VolFunctor; -} // namespace math -} // namespace operators -} // namespace paddle_mobile +} // namespace math +} // namespace operators +} // namespace paddle_mobile diff --git a/src/operators/math/vol2col.h b/src/operators/math/vol2col.h index df60571aef..07424825f1 100644 --- a/src/operators/math/vol2col.h +++ b/src/operators/math/vol2col.h @@ -64,22 +64,20 @@ namespace math { */ using Tensor = paddle_mobile::framework::Tensor; -template -class Vol2ColFunctor { - public: - void operator()(const Tensor& vol, const std::vector& dilations, - const std::vector& strides, - const std::vector& paddings, Tensor* col) const; +template class Vol2ColFunctor { +public: + void operator()(const Tensor &vol, const std::vector &dilations, + const std::vector &strides, + const std::vector &paddings, Tensor *col) const; }; -template -class Col2VolFunctor { - public: - void operator()(const Tensor& col, const std::vector& dilations, - const std::vector& strides, - const std::vector& paddings, Tensor* vol) const; +template class Col2VolFunctor { +public: + void operator()(const Tensor &col, const std::vector &dilations, + const std::vector &strides, + const std::vector &paddings, Tensor *vol) const; }; -} // namespace math -} // namespace operators -} // namespace paddle_mobile +} // namespace math +} // namespace operators +} // namespace paddle_mobile diff --git a/src/operators/op_param.cpp b/src/operators/op_param.cpp index b8574a5341..789ef86c46 100644 --- a/src/operators/op_param.cpp +++ b/src/operators/op_param.cpp @@ -21,7 +21,7 @@ SOFTWARE. namespace paddle_mobile { 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 << " stride: " << " (" << conv_param.Strides()[0] << conv_param.Strides()[1] << ") " @@ -39,5 +39,5 @@ std::ostream& operator<<(std::ostream& os, const ConvParam& conv_param) { return os; } -} // namespace operators -} // namespace paddle_mobile +} // namespace operators +} // namespace paddle_mobile diff --git a/src/operators/op_param.h b/src/operators/op_param.h index a4448d24bc..01463008a8 100644 --- a/src/operators/op_param.h +++ b/src/operators/op_param.h @@ -30,8 +30,8 @@ namespace operators { using namespace framework; class OpParam : PaddleMobileObject { - public: - protected: +public: +protected: template static T *InputFrom(const VariableNameMap &inputs, const Scope &scope) { return GetVarValue("Input", inputs, scope); @@ -67,7 +67,7 @@ class OpParam : PaddleMobileObject { }; class ConvParam : OpParam { - public: +public: ConvParam(const VariableNameMap &inputs, const VariableNameMap &outputs, const framework::AttributeMap &attrs, const framework::Scope &scope) { @@ -94,7 +94,7 @@ class ConvParam : OpParam { const int &Groups() const { return groups; } - private: +private: Tensor *input_; Tensor *output_; LoDTensor *filter_; @@ -106,5 +106,5 @@ class ConvParam : OpParam { std::ostream &operator<<(std::ostream &os, const ConvParam &conv_param); -} // namespace operators -} // namespace paddle_mobile +} // namespace operators +} // namespace paddle_mobile diff --git a/src/platform/data_type.h b/src/platform/data_type.h index f56a313db5..4d821e8465 100644 --- a/src/platform/data_type.h +++ b/src/platform/data_type.h @@ -14,9 +14,9 @@ limitations under the License. */ #pragma once +#include "framework/framework.pb.h" #include #include -#include "framework/framework.pb.h" namespace paddle_mobile { namespace framework { @@ -47,70 +47,70 @@ inline proto::VarType::Type ToDataType(std::type_index type) { inline std::type_index ToTypeIndex(proto::VarType::Type type) { switch (type) { - // case proto::VarType::FP16: - // return typeid(platform::float16); - case proto::VarType::FP32: - return typeid(float); - case proto::VarType::FP64: - return typeid(double); - case proto::VarType::INT32: - return typeid(int); - case proto::VarType::INT64: - return typeid(int64_t); - case proto::VarType::BOOL: - return typeid(bool); - default: - // PADDLE_THROW("Not support type %d", type); - printf("Not support type %d", type); + // case proto::VarType::FP16: + // return typeid(platform::float16); + case proto::VarType::FP32: + return typeid(float); + case proto::VarType::FP64: + return typeid(double); + case proto::VarType::INT32: + return typeid(int); + case proto::VarType::INT64: + return typeid(int64_t); + case proto::VarType::BOOL: + return typeid(bool); + default: + // PADDLE_THROW("Not support type %d", type); + printf("Not support type %d", type); } } template inline void VisitDataType(proto::VarType::Type type, Visitor visitor) { switch (type) { - // case proto::VarType::FP16: - // visitor.template operator()(); - // break; - case proto::VarType::FP32: - visitor.template operator()(); - break; - case proto::VarType::FP64: - visitor.template operator()(); - break; - case proto::VarType::INT32: - visitor.template operator()(); - break; - case proto::VarType::INT64: - visitor.template operator()(); - break; - case proto::VarType::BOOL: - visitor.template operator()(); - break; - default: - // PADDLE_THROW("Not supported"); - printf("Not supported"); + // case proto::VarType::FP16: + // visitor.template operator()(); + // break; + case proto::VarType::FP32: + visitor.template operator()(); + break; + case proto::VarType::FP64: + visitor.template operator()(); + break; + case proto::VarType::INT32: + visitor.template operator()(); + break; + case proto::VarType::INT64: + visitor.template operator()(); + break; + case proto::VarType::BOOL: + visitor.template operator()(); + break; + default: + // PADDLE_THROW("Not supported"); + printf("Not supported"); } } inline std::string DataTypeToString(const proto::VarType::Type type) { switch (type) { - case proto::VarType::FP16: - return "float16"; - case proto::VarType::FP32: - return "float32"; - case proto::VarType::FP64: - return "float64"; - case proto::VarType::INT16: - return "int16"; - case proto::VarType::INT32: - return "int32"; - case proto::VarType::INT64: - return "int64"; - case proto::VarType::BOOL: - return "bool"; - default: - // PADDLE_THROW("Not support type %d", type); - printf("Not support type %d", type); + case proto::VarType::FP16: + return "float16"; + case proto::VarType::FP32: + return "float32"; + case proto::VarType::FP64: + return "float64"; + case proto::VarType::INT16: + return "int16"; + case proto::VarType::INT32: + return "int32"; + case proto::VarType::INT64: + return "int64"; + case proto::VarType::BOOL: + return "bool"; + default: + // PADDLE_THROW("Not support type %d", type); + printf("Not support type %d", type); } } @@ -120,5 +120,5 @@ inline std::ostream &operator<<(std::ostream &out, return out; } -} // namespace framework -} // namespace paddle_mobile +} // namespace framework +} // namespace paddle_mobile diff --git a/src/platform/macros.h b/src/platform/macros.h index 4cc04b0905..2f81e94096 100644 --- a/src/platform/macros.h +++ b/src/platform/macros.h @@ -16,10 +16,10 @@ limitations under the License. */ // Disable the copy and assignment operator for a class. #ifndef DISABLE_COPY_AND_ASSIGN -#define DISABLE_COPY_AND_ASSIGN(classname) \ - private: \ - classname(const classname&) = delete; \ - classname(classname&&) = delete; \ - classname& operator=(const classname&) = delete; \ - classname& operator=(classname&&) = delete +#define DISABLE_COPY_AND_ASSIGN(classname) \ +private: \ + classname(const classname &) = delete; \ + classname(classname &&) = delete; \ + classname &operator=(const classname &) = delete; \ + classname &operator=(classname &&) = delete #endif -- GitLab