提交 d2f8befa 编写于 作者: L liuruilong

format files

上级 c9ffe855
......@@ -17,15 +17,14 @@ SOFTWARE.
==============================================================================*/
#pragma once;
#include "framework/attribute.h"
#include <map>
#include <string>
#include "framework/attribute.h"
namespace paddle_mobile {
namespace framework {
template <typename Dtype>
class OperatorBase;
template <typename Dtype> class OperatorBase;
class OpDesc;
class BlockDesc;
class InferShapeContext;
......@@ -34,20 +33,20 @@ class InferShapeContext;
using VariableNameMap = std::map<std::string, std::vector<std::string>>;
template <typename Dtype>
using OpCreator = std::function<framework::OperatorBase<Dtype>*(
const std::string& /*type*/, const VariableNameMap& /*inputs*/,
const VariableNameMap& /*outputs*/,
const framework::AttributeMap& /*attrs*/)>;
using OpCreator = std::function<framework::OperatorBase<Dtype> *(
const std::string & /*type*/, const VariableNameMap & /*inputs*/,
const VariableNameMap & /*outputs*/,
const framework::AttributeMap & /*attrs*/)>;
using GradOpMakerFN =
std::function<std::vector<std::unique_ptr<framework::OpDesc>>(
const framework::OpDesc&,
const std::unordered_set<std::string>& /*no_grad_set*/,
std::unordered_map<std::string, std::string>* /*grad_to_var*/,
const std::vector<framework::BlockDesc*>& grad_block)>;
const framework::OpDesc &,
const std::unordered_set<std::string> & /*no_grad_set*/,
std::unordered_map<std::string, std::string> * /*grad_to_var*/,
const std::vector<framework::BlockDesc *> &grad_block)>;
using InferVarTypeFN = std::function<void(const framework::OpDesc& /*op_desc*/,
framework::BlockDesc* /*block*/)>;
using InferVarTypeFN = std::function<void(const framework::OpDesc & /*op_desc*/,
framework::BlockDesc * /*block*/)>;
using InferShapeFN = std::function<void(framework::InferShapeContext*)>;
using InferShapeFN = std::function<void(framework::InferShapeContext *)>;
};
......@@ -24,8 +24,7 @@ enum class Precision : int { FP32 = 0 };
//! device type
enum DeviceTypeEnum { kINVALID = -1, kCPU = 0, kFPGA = 1, kGPU_MALI = 2 };
template <DeviceTypeEnum T>
struct DeviceType {};
template <DeviceTypeEnum T> struct DeviceType {};
typedef DeviceType<kCPU> CPU;
typedef DeviceType<kFPGA> FPGA;
......
......@@ -21,13 +21,9 @@ SOFTWARE.
#pragma once
namespace paddle_mobile {
template <int ID, typename Type>
struct IDToType {
typedef Type type_t;
};
template <int ID, typename Type> struct IDToType { typedef Type type_t; };
template <typename F, typename... Ts>
struct VariantHelper {
template <typename F, typename... Ts> struct VariantHelper {
static const size_t size = sizeof(F) > VariantHelper<Ts...>::size
? sizeof(F)
: VariantHelper<Ts...>::size;
......@@ -41,8 +37,7 @@ struct VariantHelper {
}
};
template <typename F>
struct VariantHelper<F> {
template <typename F> struct VariantHelper<F> {
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<F> {
}
};
template <size_t size>
class RawData {
public:
template <size_t size> class RawData {
public:
char data[size];
RawData() {}
RawData(const RawData &raw_data) { strcpy(data, raw_data.data); }
......@@ -64,8 +58,7 @@ class RawData {
// }
};
template <typename... Ts>
struct Variant {
template <typename... Ts> 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 <typename T, typename... Args>
void Set(Args &&... args) {
template <typename T, typename... Args> void Set(Args &&... args) {
helper::Destroy(type_id, &data);
new (&data) T(std::forward<Args>(args)...);
type_id = typeid(T).hash_code();
}
template <typename T>
T &Get() const {
template <typename T> T &Get() const {
if (type_id == typeid(T).hash_code()) {
return *const_cast<T *>(reinterpret_cast<const T *>(&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<Ts...> helper;
size_t type_id;
RawData<helper::size> data;
};
template <typename T>
struct Vistor {
typedef T type_t;
};
template <typename T> struct Vistor { typedef T type_t; };
} // namespace paddle_mobile
......@@ -27,8 +27,8 @@ 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()) {
......@@ -93,20 +93,16 @@ class Attribute {
}
Attribute() {}
template <typename T, typename... Args>
Attribute& Set(Args&&... args) {
template <typename T, typename... Args> Attribute &Set(Args &&... args) {
variant_.Set<T>(args...);
return *this;
}
template <typename T>
T& Get() const {
return variant_.Get<T>();
}
template <typename T> T &Get() const { return variant_.Get<T>(); }
private:
private:
Variant<int, float, std::string, std::vector<int>, std::vector<float>,
std::vector<std::string>, bool, std::vector<bool>, BlockDesc*,
std::vector<std::string>, bool, std::vector<bool>, BlockDesc *,
int64_t>
variant_;
};
......@@ -114,19 +110,18 @@ class Attribute {
using AttributeMap = std::unordered_map<std::string, Attribute>;
class AttrReader {
public:
explicit AttrReader(const AttributeMap& attrs) : attrs_(attrs) {}
public:
explicit AttrReader(const AttributeMap &attrs) : attrs_(attrs) {}
template <typename T>
inline T Get(const std::string& name) const {
template <typename T> 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<T>();
}
private:
const AttributeMap& attrs_;
private:
const AttributeMap &attrs_;
};
} // namespace framework
......
......@@ -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,7 +45,7 @@ class BlockDesc : PaddleMobileObject {
std::vector<std::shared_ptr<VarDesc>> Vars() const;
std::vector<std::shared_ptr<OpDesc>> Ops() const;
private:
private:
proto::BlockDesc desc_;
std::vector<std::shared_ptr<OpDesc>> ops_;
std::unordered_map<std::string, std::shared_ptr<VarDesc>> vars_;
......@@ -56,8 +56,7 @@ class BlockDesc : PaddleMobileObject {
namespace std {
template <>
struct hash<paddle_mobile::framework::BlockDesc> {
template <> struct hash<paddle_mobile::framework::BlockDesc> {
typedef paddle_mobile::framework::BlockDesc argument_type;
typedef std::size_t result_type;
result_type operator()(argument_type const &s) const noexcept {
......
......@@ -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,7 +44,7 @@ inline DataLayout StringToDataLayout(const std::string& str) {
}
}
inline std::string DataLayoutToString(const DataLayout& data_layout) {
inline std::string DataLayoutToString(const DataLayout &data_layout) {
switch (data_layout) {
case DataLayout::kNHWC:
return "NHWC";
......@@ -58,7 +58,7 @@ inline std::string DataLayoutToString(const DataLayout& data_layout) {
}
}
inline std::ostream& operator<<(std::ostream& out, const DataLayout& l) {
inline std::ostream &operator<<(std::ostream &out, const DataLayout &l) {
out << DataLayoutToString(l);
return out;
}
......
......@@ -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<LoDTensor>()) {
// auto& in_lod_tensor = in_var.Get<LoDTensor>();
// auto* tran_lod_tensor = out_var.GetMutable<LoDTensor>();
......
......@@ -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
......@@ -19,17 +19,13 @@ namespace framework {
/// @cond HIDDEN
template <int i>
Dim<i> make_dim(const int64_t* d) {
template <int i> Dim<i> make_dim(const int64_t *d) {
return Dim<i>(*d, make_dim<i - 1>(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);
......@@ -76,13 +72,13 @@ DDim make_ddim(std::initializer_list<int64_t> dims) {
return result;
}
DDim make_ddim(const std::vector<int64_t>& dims) {
DDim make_ddim(const std::vector<int64_t> &dims) {
DDim result(make_dim(0));
make_ddim(result, &dims[0], dims.size());
return result;
}
DDim make_ddim(const std::vector<int>& dims) {
DDim make_ddim(const std::vector<int> &dims) {
std::vector<int64_t> res(dims.size());
std::transform(dims.begin(), dims.end(), res.begin(),
[](int d) { return static_cast<int64_t>(d); });
......@@ -91,35 +87,31 @@ DDim make_ddim(const std::vector<int>& dims) {
/// @cond HIDDEN
// XXX For some reason, putting this in an anonymous namespace causes errors
struct DynamicMutableIndexer : Vistor<int64_t&> {
public:
struct DynamicMutableIndexer : Vistor<int64_t &> {
public:
explicit DynamicMutableIndexer(int idx) : idx_(idx) {}
template <int D>
int64_t& operator()(Dim<D>& dim) const {
return dim[idx_];
}
template <int D> int64_t &operator()(Dim<D> &dim) const { return dim[idx_]; }
private:
private:
int idx_;
};
struct DynamicConstIndexer : public Vistor<int64_t> {
public:
public:
explicit DynamicConstIndexer(int idx) : idx_(idx) {}
template <int D>
int64_t operator()(const Dim<D>& dim) const {
template <int D> int64_t operator()(const Dim<D> &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<void> {
std::vector<int64_t>& vector;
std::vector<int64_t> &vector;
explicit VectorizeVisitor(std::vector<int64_t>& v) : vector(v) {}
explicit VectorizeVisitor(std::vector<int64_t> &v) : vector(v) {}
template <typename T>
void operator()(const T& t) {
template <typename T> 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<int64_t> vectorize(const DDim& ddim) {
std::vector<int64_t> vectorize(const DDim &ddim) {
std::vector<int64_t> result;
VectorizeVisitor visitor(result);
DDim::ApplyVistor(visitor, ddim);
......@@ -207,30 +198,29 @@ std::vector<int64_t> vectorize(const DDim& ddim) {
// NOTE: framework::vectorize converts to type int64_t
// which does not fit cudnn inputs.
std::vector<int> vectorize2int(const DDim& ddim) {
std::vector<int> vectorize2int(const DDim &ddim) {
std::vector<int64_t> temp = vectorize(ddim);
std::vector<int> result(temp.begin(), temp.end());
return result;
}
struct ProductVisitor : Vistor<int64_t> {
template <int D>
int64_t operator()(const Dim<D>& dim) {
template <int D> int64_t operator()(const Dim<D> &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<void> {
std::vector<int64_t>& vector;
std::vector<int64_t> &vector;
int begin;
int end;
SliceVectorizeVisitor(std::vector<int64_t>& v, int b, int e)
SliceVectorizeVisitor(std::vector<int64_t> &v, int b, int e)
: vector(v), begin(b), end(e) {
// PADDLE_ENFORCE(begin < end,
// "Begin index must be less than end index in ddim
......@@ -239,8 +229,7 @@ struct SliceVectorizeVisitor : Vistor<void> {
// "Begin index can't be less than zero in ddim slice.");
}
template <int S>
void operator()(const Dim<S>& dim) {
template <int S> void operator()(const Dim<S> &dim) {
if (begin == 0) {
vector.push_back(dim.head);
} else {
......@@ -252,12 +241,12 @@ struct SliceVectorizeVisitor : Vistor<void> {
}
}
void operator()(const Dim<0>& dim) {
void operator()(const Dim<0> &dim) {
// PADDLE_ENFORCE(end == 0, "End index in ddim slice is out of bound.");
}
};
DDim slice_ddim(const DDim& ddim, int begin, int end) {
DDim slice_ddim(const DDim &ddim, int begin, int end) {
std::vector<int64_t> vec;
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<int> {
template <int D>
int operator()(Dim<D>) const {
return D;
}
template <int D> int operator()(Dim<D>) 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<Dim<4>>());
......@@ -288,19 +274,18 @@ int arity(const DDim& d) {
/// \endcond
struct OSVistor : Vistor<std::ostream&> {
OSVistor(std::ostream& os) : os_(os) {}
struct OSVistor : Vistor<std::ostream &> {
OSVistor(std::ostream &os) : os_(os) {}
template <int D>
std::ostream& operator()(Dim<D> dim) const {
template <int D> std::ostream &operator()(Dim<D> 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<int64_t> 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<int64_t> 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<int64_t> strides(ddim.size());
strides[ddim.size() - 1] = ddim[ddim.size() - 1];
for (int i = ddim.size() - 2; i >= 0; --i) {
......
......@@ -14,12 +14,12 @@ limitations under the License. */
#pragma once
#include "common/variant.h"
#include "dim.h"
#include <assert.h>
#include <initializer_list>
#include <stdexcept>
#include <vector>
#include "common/variant.h"
#include "dim.h"
namespace paddle_mobile {
namespace framework {
......@@ -66,15 +66,11 @@ struct DDim {
DDim() { var.Set<Dim<1>>(Dim<1>()); }
template <int D>
explicit DDim(const Dim<D> &in) {
var.Set<Dim<D>>(in);
}
template <int D> explicit DDim(const Dim<D> &in) { var.Set<Dim<D>>(in); }
/*implicit*/ DDim(std::initializer_list<int64_t> init_list);
template <int D>
DDim &operator=(const Dim<D> &in) {
template <int D> DDim &operator=(const Dim<D> &in) {
var.Set<Dim<D>>(in);
return *this;
}
......
......@@ -24,8 +24,7 @@ namespace paddle_mobile {
namespace framework {
// Statically sized, statically indexed dimension
template <int i>
struct Dim {
template <int i> struct Dim {
static constexpr int dimensions = i;
template <typename... Args>
......@@ -35,7 +34,7 @@ struct Dim {
}
HOSTDEVICE
Dim(int64_t _head, const Dim<i - 1>& _tail) : head(_head), tail(_tail) {}
Dim(int64_t _head, const Dim<i - 1> &_tail) : head(_head), tail(_tail) {}
HOSTDEVICE
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<i>& size)
Dim(int64_t idx, const Dim<i> &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<i>& o) const {
bool operator==(const Dim<i> &o) const {
return (head == o.head) && (tail == o.tail);
}
HOSTDEVICE
bool operator!=(const Dim<i>& o) const { return !(*this == o); }
bool operator!=(const Dim<i> &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 <int i>
struct DimGetter {
template <int i> struct DimGetter {
// Return a copy if Dim is const
template <typename D>
HOSTDEVICE static int64_t impl(const D& d) {
template <typename D> HOSTDEVICE static int64_t impl(const D &d) {
return DimGetter<i - 1>::impl(d.tail);
}
// Return a reference if Dim is mutable
template <typename D>
HOSTDEVICE static int64_t& impl(D& d) {
template <typename D> HOSTDEVICE static int64_t &impl(D &d) {
return DimGetter<i - 1>::impl(d.tail);
}
};
// Eureka! We found the element!
template <>
struct DimGetter<0> {
template <> struct DimGetter<0> {
// Return a copy if Dim is const
template <typename D>
HOSTDEVICE static int64_t impl(const D& d) {
template <typename D> HOSTDEVICE static int64_t impl(const D &d) {
return d.head;
}
// Return a reference if Dim is mutable
template <typename D>
HOSTDEVICE static int64_t& impl(D& d) {
return d.head;
}
template <typename D> HOSTDEVICE static int64_t &impl(D &d) { return d.head; }
};
template <int D>
HOSTDEVICE int64_t& indexer(Dim<D>& dim, int idx) {
template <int D> HOSTDEVICE int64_t &indexer(Dim<D> &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<D>& 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 <int D>
HOSTDEVICE int64_t indexer(const Dim<D>& dim, int idx) {
template <int D> HOSTDEVICE int64_t indexer(const Dim<D> &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<D>& 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
......@@ -201,27 +187,23 @@ HOSTDEVICE int64_t indexer<0>(const Dim<0>& dim, int idx) {
} // namespace
// Static access to constant Dim
template <int i, int l>
HOSTDEVICE int64_t get(const Dim<l>& d) {
template <int i, int l> HOSTDEVICE int64_t get(const Dim<l> &d) {
return DimGetter<i>::impl(d);
}
// Static access to mutable Dim
template <int i, int l>
HOSTDEVICE int64_t& get(Dim<l>& d) {
template <int i, int l> HOSTDEVICE int64_t &get(Dim<l> &d) {
return DimGetter<i>::impl(d);
}
// Dynamic access to constant Dim
template <int l>
HOSTDEVICE int64_t Dim<l>::operator[](int i) const {
template <int l> HOSTDEVICE int64_t Dim<l>::operator[](int i) const {
// std::cout << "l: " << l << std::endl;
return indexer(*this, i);
}
// Dynamic access to mutable Dim
template <int l>
HOSTDEVICE int64_t& Dim<l>::operator[](int i) {
template <int l> HOSTDEVICE int64_t &Dim<l>::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 <int l>
HOSTDEVICE typename std::enable_if<(l > 0), int64_t>::type get(const Dim<l>& d,
HOSTDEVICE typename std::enable_if<(l > 0), int64_t>::type get(const Dim<l> &d,
int i) {
return d[i];
}
// Dynamic access to mutable Dim
template <int l>
HOSTDEVICE typename std::enable_if<(l > 0), int64_t&>::type get(Dim<l>& d,
HOSTDEVICE typename std::enable_if<(l > 0), int64_t &>::type get(Dim<l> &d,
int i) {
return d[i];
}
// Dot product of two dims
template <int i>
HOSTDEVICE int64_t linearize(const Dim<i>& a, const Dim<i>& b) {
HOSTDEVICE int64_t linearize(const Dim<i> &a, const Dim<i> &b) {
return a.head * b.head + linearize(a.tail, b.tail);
}
// 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 <int i>
HOSTDEVICE int64_t product(const Dim<i>& a, int prod = 1) {
template <int i> HOSTDEVICE int64_t product(const Dim<i> &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 <int i>
HOSTDEVICE bool contained(const Dim<i>& idx, const Dim<i>& size) {
HOSTDEVICE bool contained(const Dim<i> &idx, const Dim<i> &size) {
return ((0 <= idx.head) && (idx.head < size.head) &&
contained(idx.tail, size.tail));
}
......@@ -286,7 +266,7 @@ HOSTDEVICE bool contained(const Dim<i>& idx, const Dim<i>& 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 <int i>
HOSTDEVICE Dim<i> ex_prefix_mul(const Dim<i>& src, int mul = 1) {
HOSTDEVICE Dim<i> ex_prefix_mul(const Dim<i> &src, int mul = 1) {
return Dim<i>(mul, ex_prefix_mul(src.tail, mul * src.head));
}
///\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 <int i>
HOSTDEVICE Dim<i> dim_plus(const Dim<i>& a, const Dim<i>& b) {
template <int i> HOSTDEVICE Dim<i> dim_plus(const Dim<i> &a, const Dim<i> &b) {
return Dim<i>(a.head + b.head, dim_plus(a.tail, b.tail));
}
// 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 <int i>
HOSTDEVICE Dim<i> operator+(const Dim<i>& lhs, const Dim<i>& rhs) {
HOSTDEVICE Dim<i> operator+(const Dim<i> &lhs, const Dim<i> &rhs) {
return dim_plus(lhs, rhs);
}
/**
* Multiply two dimensions together
*/
template <int i>
HOSTDEVICE Dim<i> dim_mult(const Dim<i>& a, const Dim<i>& b) {
template <int i> HOSTDEVICE Dim<i> dim_mult(const Dim<i> &a, const Dim<i> &b) {
return Dim<i>(a.head * b.head, dim_mult(a.tail, b.tail));
}
// 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 <int i>
HOSTDEVICE Dim<i> operator*(const Dim<i>& lhs, const Dim<i>& rhs) {
HOSTDEVICE Dim<i> operator*(const Dim<i> &lhs, const Dim<i> &rhs) {
return dim_mult(lhs, rhs);
}
......@@ -356,7 +333,7 @@ HOSTDEVICE Dim<i> operator*(const Dim<i>& lhs, const Dim<i>& rhs) {
*/
template <int i>
HOSTDEVICE Dim<i> normalize_strides(const Dim<i>& size, const Dim<i>& stride) {
HOSTDEVICE Dim<i> normalize_strides(const Dim<i> &size, const Dim<i> &stride) {
int norm_stride = size.head == 1 ? 0 : stride.head;
return Dim<i>(norm_stride, normalize_strides(size.tail, stride.tail));
}
......@@ -364,8 +341,8 @@ HOSTDEVICE Dim<i> normalize_strides(const Dim<i>& size, const Dim<i>& stride) {
///\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<sizeof...(Args)> make_dim(Args... idxes) {
// Allows us to output a Dim
// XXX For some reason, overloading fails to resolve this correctly
template <int i>
typename std::enable_if<(i > 1), std::ostream&>::type operator<<(
std::ostream& os, const Dim<i>& d) {
typename std::enable_if<(i > 1), std::ostream &>::type
operator<<(std::ostream &os, const Dim<i> &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 <int i>
typename std::enable_if<(i == 1), std::ostream&>::type operator<<(
std::ostream& os, const Dim<i>& d) {
typename std::enable_if<(i == 1), std::ostream &>::type
operator<<(std::ostream &os, const Dim<i> &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 <int i>
HOST std::string Dim<i>::to_string() const {
template <int i> HOST std::string Dim<i>::to_string() const {
std::stringstream stream;
stream << *this;
......
......@@ -34,13 +34,12 @@ SOFTWARE.
namespace paddle_mobile {
namespace framework {
template <typename Dtype>
class Executor {
public:
template <typename Dtype> class Executor {
public:
Executor(const Program<Dtype> p);
std::shared_ptr<Tensor> predict(Tensor &t);
private:
private:
const framework::Program<Dtype> program_;
std::shared_ptr<ProgramDesc> to_predict_program_;
void predict(const Tensor &t, int block_id);
......
......@@ -18,73 +18,73 @@ namespace paddle_mobile {
namespace framework {
namespace proto {
class OpDesc_AttrDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<OpDesc_Attr> _instance;
} _OpDesc_Attr_default_instance_;
class OpDesc_VarDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<OpDesc_Var> _instance;
} _OpDesc_Var_default_instance_;
class OpDescDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<OpDesc> _instance;
} _OpDesc_default_instance_;
class OpProto_VarDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<OpProto_Var> _instance;
} _OpProto_Var_default_instance_;
class OpProto_AttrDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<OpProto_Attr> _instance;
} _OpProto_Attr_default_instance_;
class OpProtoDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<OpProto> _instance;
} _OpProto_default_instance_;
class VarType_TensorDescDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<VarType_TensorDesc>
_instance;
} _VarType_TensorDesc_default_instance_;
class VarType_LoDTensorDescDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<VarType_LoDTensorDesc>
_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<VarType_ReaderDesc>
_instance;
} _VarType_ReaderDesc_default_instance_;
class VarType_ChannelDescDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<VarType_ChannelDesc>
_instance;
} _VarType_ChannelDesc_default_instance_;
class VarType_TupleDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<VarType_Tuple> _instance;
} _VarType_Tuple_default_instance_;
class VarTypeDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<VarType> _instance;
} _VarType_default_instance_;
class VarDescDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<VarDesc> _instance;
} _VarDesc_default_instance_;
class BlockDescDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<BlockDesc> _instance;
} _BlockDesc_default_instance_;
class ProgramDescDefaultTypeInternal {
public:
public:
::google::protobuf::internal::ExplicitlyConstructed<ProgramDesc> _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());
}
......@@ -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<size_t>(reinterpret_cast<char*>(&block_idx_) -
reinterpret_cast<char*>(&type_)) +
static_cast<size_t>(reinterpret_cast<char *>(&block_idx_) -
reinterpret_cast<char *>(&type_)) +
sizeof(block_idx_));
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.OpDesc.Attr)
}
......@@ -356,8 +351,9 @@ void OpDesc_Attr::SharedCtor() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited());
s_.UnsafeSetDefault(
&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&type_, 0, static_cast<size_t>(reinterpret_cast<char*>(&block_idx_) -
reinterpret_cast<char*>(&type_)) +
::memset(&type_, 0,
static_cast<size_t>(reinterpret_cast<char *>(&block_idx_) -
reinterpret_cast<char *>(&type_)) +
sizeof(block_idx_));
}
......@@ -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<size_t>(reinterpret_cast<char*>(&block_idx_) -
reinterpret_cast<char*>(&type_)) +
static_cast<size_t>(reinterpret_cast<char *>(&block_idx_) -
reinterpret_cast<char *>(&type_)) +
sizeof(block_idx_));
}
_has_bits_.Clear();
......@@ -425,9 +421,10 @@ void OpDesc_Attr::Clear() {
}
bool OpDesc_Attr::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -441,7 +438,8 @@ 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;
......@@ -465,8 +463,8 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
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));
set_type(
static_cast<::paddle_mobile::framework::proto::AttrType>(value));
} else {
unknown_fields_stream.WriteVarint32(16u);
unknown_fields_stream.WriteVarint32(
......@@ -524,16 +522,13 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
DO_((
::google::protobuf::internal::WireFormatLite::
ReadRepeatedPrimitive<
::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::
static_cast<::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::
ReadPackedPrimitiveNoInline<
::google::protobuf::int32,
::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
......@@ -549,16 +544,13 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
DO_((
::google::protobuf::internal::WireFormatLite::
ReadRepeatedPrimitive<
::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::
static_cast<::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::
ReadPackedPrimitiveNoInline<
float,
::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
......@@ -599,14 +591,12 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
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>(
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 */)) {
static_cast<::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::
ReadPackedPrimitiveNoInline<
bool,
......@@ -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;
......@@ -868,11 +858,11 @@ size_t OpDesc_Attr::ByteSizeLong() const {
}
void OpDesc_Attr::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const OpDesc_Attr*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const OpDesc_Attr *>(&from));
}
void OpDesc_Attr::MergeFrom(const OpDesc_Attr& from) {
void OpDesc_Attr::MergeFrom(const OpDesc_Attr &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpDesc.Attr)
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.name)
}
::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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.s)
}
::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<float>& OpDesc_Attr::floats() const {
const ::google::protobuf::RepeatedField<float> &OpDesc_Attr::floats() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.floats)
return floats_;
}
::google::protobuf::RepeatedField<float>* OpDesc_Attr::mutable_floats() {
::google::protobuf::RepeatedField<float> *OpDesc_Attr::mutable_floats() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.floats)
return &floats_;
}
......@@ -1199,62 +1192,62 @@ const ::google::protobuf::RepeatedField<float>& 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<const char*>(value), size);
void OpDesc_Attr::set_strings(int index, const char *value, size_t size) {
strings_.Mutable(index)->assign(reinterpret_cast<const char *>(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<const char*>(value), size);
void OpDesc_Attr::add_strings(const char *value, size_t size) {
strings_.Add()->assign(reinterpret_cast<const char *>(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<bool>& OpDesc_Attr::bools() const {
const ::google::protobuf::RepeatedField<bool> &OpDesc_Attr::bools() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.bools)
return bools_;
}
::google::protobuf::RepeatedField<bool>* OpDesc_Attr::mutable_bools() {
::google::protobuf::RepeatedField<bool> *OpDesc_Attr::mutable_bools() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.bools)
return &bools_;
}
......@@ -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) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -1441,7 +1433,8 @@ 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;
......@@ -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<const OpDesc_Var*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const OpDesc_Var *>(&from));
}
void OpDesc_Var::MergeFrom(const OpDesc_Var& from) {
void OpDesc_Var::MergeFrom(const OpDesc_Var &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpDesc.Var)
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Var.parameter)
}
::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,62 +1659,63 @@ 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<const char*>(value), size);
void OpDesc_Var::set_arguments(int index, const char *value, size_t size) {
arguments_.Mutable(index)->assign(reinterpret_cast<const char *>(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<const char*>(value), size);
void OpDesc_Var::add_arguments(const char *value, size_t size) {
arguments_.Add()->assign(reinterpret_cast<const char *>(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_;
......@@ -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) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -1835,15 +1829,16 @@ 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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_inputs()));
} else {
goto handle_unusual;
}
......@@ -1854,8 +1849,8 @@ bool OpDesc::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_outputs()));
} else {
goto handle_unusual;
}
......@@ -1878,8 +1873,8 @@ bool OpDesc::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_attrs()));
} else {
goto handle_unusual;
}
......@@ -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<const OpDesc*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const OpDesc *>(&from));
}
void OpDesc::MergeFrom(const OpDesc& from) {
void OpDesc::MergeFrom(const OpDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpDesc)
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(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_;
......@@ -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<size_t>(reinterpret_cast<char*>(&dispensable_) -
reinterpret_cast<char*>(&duplicable_)) +
static_cast<size_t>(reinterpret_cast<char *>(&dispensable_) -
reinterpret_cast<char *>(&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<size_t>(reinterpret_cast<char*>(&dispensable_) -
reinterpret_cast<char*>(&duplicable_)) +
static_cast<size_t>(reinterpret_cast<char *>(&dispensable_) -
reinterpret_cast<char *>(&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<size_t>(reinterpret_cast<char*>(&dispensable_) -
reinterpret_cast<char*>(&duplicable_)) +
static_cast<size_t>(reinterpret_cast<char *>(&dispensable_) -
reinterpret_cast<char *>(&duplicable_)) +
sizeof(dispensable_));
}
_has_bits_.Clear();
......@@ -2385,9 +2381,10 @@ void OpProto_Var::Clear() {
}
bool OpProto_Var::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -2401,7 +2398,8 @@ 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;
......@@ -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;
......@@ -2594,11 +2592,11 @@ size_t OpProto_Var::ByteSizeLong() const {
}
void OpProto_Var::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const OpProto_Var*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const OpProto_Var *>(&from));
}
void OpProto_Var::MergeFrom(const OpProto_Var& from) {
void OpProto_Var::MergeFrom(const OpProto_Var &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpProto.Var)
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Var.name)
}
::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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Var.comment)
}
::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 {
......@@ -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<size_t>(reinterpret_cast<char*>(&generated_) -
reinterpret_cast<char*>(&type_)) +
static_cast<size_t>(reinterpret_cast<char *>(&generated_) -
reinterpret_cast<char *>(&type_)) +
sizeof(generated_));
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.OpProto.Attr)
}
......@@ -2912,8 +2911,9 @@ void OpProto_Attr::SharedCtor() {
&::google::protobuf::internal::GetEmptyStringAlreadyInited());
comment_.UnsafeSetDefault(
&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&type_, 0, static_cast<size_t>(reinterpret_cast<char*>(&generated_) -
reinterpret_cast<char*>(&type_)) +
::memset(&type_, 0,
static_cast<size_t>(reinterpret_cast<char *>(&generated_) -
reinterpret_cast<char *>(&type_)) +
sizeof(generated_));
}
......@@ -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<size_t>(reinterpret_cast<char*>(&generated_) -
reinterpret_cast<char*>(&type_)) +
static_cast<size_t>(reinterpret_cast<char *>(&generated_) -
reinterpret_cast<char *>(&type_)) +
sizeof(generated_));
}
_has_bits_.Clear();
......@@ -2977,9 +2977,10 @@ void OpProto_Attr::Clear() {
}
bool OpProto_Attr::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -2993,7 +2994,8 @@ 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;
......@@ -3017,8 +3019,8 @@ bool OpProto_Attr::MergePartialFromCodedStream(
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));
set_type(
static_cast<::paddle_mobile::framework::proto::AttrType>(value));
} else {
unknown_fields_stream.WriteVarint32(16u);
unknown_fields_stream.WriteVarint32(
......@@ -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;
......@@ -3173,11 +3175,11 @@ size_t OpProto_Attr::ByteSizeLong() const {
}
void OpProto_Attr::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const OpProto_Attr*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const OpProto_Attr *>(&from));
}
void OpProto_Attr::MergeFrom(const OpProto_Attr& from) {
void OpProto_Attr::MergeFrom(const OpProto_Attr &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpProto.Attr)
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Attr.name)
}
::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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Attr.comment)
}
::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 {
......@@ -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) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -3543,7 +3545,8 @@ 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;
......@@ -3562,8 +3565,8 @@ bool OpProto::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_inputs()));
} else {
goto handle_unusual;
}
......@@ -3574,8 +3577,8 @@ bool OpProto::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_outputs()));
} else {
goto handle_unusual;
}
......@@ -3586,8 +3589,8 @@ bool OpProto::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_attrs()));
} else {
goto handle_unusual;
}
......@@ -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;
......@@ -3750,11 +3753,11 @@ size_t OpProto::ByteSizeLong() const {
}
void OpProto::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const OpProto*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const OpProto *>(&from));
}
void OpProto::MergeFrom(const OpProto& from) {
void OpProto::MergeFrom(const OpProto &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.OpProto)
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(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 {
......@@ -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) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -4129,7 +4133,8 @@ 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;
......@@ -4160,16 +4165,13 @@ bool VarType_TensorDesc::MergePartialFromCodedStream(
if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
DO_((
::google::protobuf::internal::WireFormatLite::
ReadRepeatedPrimitive<
::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::
static_cast<::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::
ReadPackedPrimitiveNoInline<
::google::protobuf::int64,
::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
......@@ -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<const VarType_TensorDesc*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const VarType_TensorDesc *>(&from));
}
void VarType_TensorDesc::MergeFrom(const VarType_TensorDesc& from) {
void VarType_TensorDesc::MergeFrom(const VarType_TensorDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.TensorDesc)
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,12 +4348,12 @@ 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_;
......@@ -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<size_t>(reinterpret_cast<char*>(&lod_level_) -
reinterpret_cast<char*>(&tensor_)) +
static_cast<size_t>(reinterpret_cast<char *>(&lod_level_) -
reinterpret_cast<char *>(&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) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -4455,15 +4460,16 @@ 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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_tensor()));
} else {
goto handle_unusual;
}
......@@ -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<const VarType_LoDTensorDesc*>(&from));
*::google::protobuf::down_cast<const VarType_LoDTensorDesc *>(&from));
}
void VarType_LoDTensorDesc::MergeFrom(const VarType_LoDTensorDesc& from) {
void VarType_LoDTensorDesc::MergeFrom(const VarType_LoDTensorDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
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<const ::paddle_mobile::framework::
proto::VarType_TensorDesc*>(
&::paddle_mobile::framework::proto::
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) {
......@@ -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<size_t>(reinterpret_cast<char*>(&lod_level_) -
reinterpret_cast<char*>(&tensor_)) +
static_cast<size_t>(reinterpret_cast<char *>(&lod_level_) -
reinterpret_cast<char *>(&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) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -4795,15 +4807,16 @@ 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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_tensor()));
} else {
goto handle_unusual;
}
......@@ -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<const VarType_LoDTensorArrayDesc*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const VarType_LoDTensorArrayDesc *>(
&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<const ::paddle_mobile::framework::
proto::VarType_TensorDesc*>(
&::paddle_mobile::framework::proto::
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) {
......@@ -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) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -5120,7 +5138,8 @@ 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
......@@ -5128,8 +5147,8 @@ bool VarType_ReaderDesc::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_lod_tensor()));
} else {
goto handle_unusual;
}
......@@ -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<const VarType_ReaderDesc*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const VarType_ReaderDesc *>(&from));
}
void VarType_ReaderDesc::MergeFrom(const VarType_ReaderDesc& from) {
void VarType_ReaderDesc::MergeFrom(const VarType_ReaderDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.ReaderDesc)
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,29 +5273,29 @@ 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_;
......@@ -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<size_t>(reinterpret_cast<char*>(&data_type_) -
reinterpret_cast<char*>(&capacity_)) +
static_cast<size_t>(reinterpret_cast<char *>(&data_type_) -
reinterpret_cast<char *>(&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<size_t>(reinterpret_cast<char*>(&data_type_) -
reinterpret_cast<char*>(&capacity_)) +
static_cast<size_t>(reinterpret_cast<char *>(&data_type_) -
reinterpret_cast<char *>(&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<size_t>(reinterpret_cast<char*>(&data_type_) -
reinterpret_cast<char*>(&capacity_)) +
static_cast<size_t>(reinterpret_cast<char *>(&data_type_) -
reinterpret_cast<char *>(&capacity_)) +
sizeof(data_type_));
}
_has_bits_.Clear();
......@@ -5362,9 +5381,10 @@ void VarType_ChannelDesc::Clear() {
}
bool VarType_ChannelDesc::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -5378,7 +5398,8 @@ 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;
......@@ -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;
......@@ -5509,11 +5530,11 @@ size_t VarType_ChannelDesc::ByteSizeLong() const {
}
void VarType_ChannelDesc::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const VarType_ChannelDesc*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const VarType_ChannelDesc *>(&from));
}
void VarType_ChannelDesc::MergeFrom(const VarType_ChannelDesc& from) {
void VarType_ChannelDesc::MergeFrom(const VarType_ChannelDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.ChannelDesc)
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_);
......@@ -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) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -5693,7 +5716,8 @@ 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;
......@@ -5714,8 +5738,7 @@ bool VarType_Tuple::MergePartialFromCodedStream(
static_cast<::google::protobuf::uint32>(value));
}
} else if (static_cast<::google::protobuf::uint8>(tag) ==
static_cast<::google::protobuf::uint8>(
10u /* 10 & 0xFF */)) {
static_cast<::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::
ReadPackedEnumPreserveUnknowns(
input, 1,
......@@ -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<const VarType_Tuple*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const VarType_Tuple *>(&from));
}
void VarType_Tuple::MergeFrom(const VarType_Tuple& from) {
void VarType_Tuple::MergeFrom(const VarType_Tuple &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType.Tuple)
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,12 +5878,12 @@ 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<int>& VarType_Tuple::element_type()
const {
const ::google::protobuf::RepeatedField<int> &
VarType_Tuple::element_type() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.Tuple.element_type)
return element_type_;
}
::google::protobuf::RepeatedField<int>* VarType_Tuple::mutable_element_type() {
::google::protobuf::RepeatedField<int> *VarType_Tuple::mutable_element_type() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.Tuple.element_type)
return &element_type_;
}
......@@ -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<size_t>(reinterpret_cast<char*>(&type_) -
reinterpret_cast<char*>(&selected_rows_)) +
static_cast<size_t>(reinterpret_cast<char *>(&type_) -
reinterpret_cast<char *>(&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) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -6029,7 +6059,8 @@ 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;
......@@ -6041,8 +6072,7 @@ bool VarType::MergePartialFromCodedStream(
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>(
set_type(static_cast<::paddle_mobile::framework::proto::VarType_Type>(
value));
} else {
unknown_fields_stream.WriteVarint32(8u);
......@@ -6060,8 +6090,8 @@ bool VarType::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_selected_rows()));
} else {
goto handle_unusual;
}
......@@ -6073,8 +6103,8 @@ bool VarType::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_lod_tensor()));
} else {
goto handle_unusual;
}
......@@ -6086,8 +6116,8 @@ bool VarType::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_tensor_array()));
} else {
goto handle_unusual;
}
......@@ -6098,8 +6128,8 @@ bool VarType::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_reader()));
} else {
goto handle_unusual;
}
......@@ -6111,8 +6141,8 @@ bool VarType::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_channel()));
} else {
goto handle_unusual;
}
......@@ -6123,8 +6153,8 @@ bool VarType::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_tuple()));
} else {
goto handle_unusual;
}
......@@ -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<const VarType*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const VarType *>(&from));
}
void VarType::MergeFrom(const VarType& from) {
void VarType::MergeFrom(const VarType &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarType)
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<const ::paddle_mobile::framework::
proto::VarType_TensorDesc*>(
&::paddle_mobile::framework::proto::
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<const ::paddle_mobile::framework::
proto::VarType_LoDTensorDesc*>(
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<const ::paddle_mobile::framework::proto::
VarType_LoDTensorArrayDesc*>(
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<const ::paddle_mobile::framework::
proto::VarType_ReaderDesc*>(
&::paddle_mobile::framework::proto::
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<const ::paddle_mobile::framework::
proto::VarType_ChannelDesc*>(
&::paddle_mobile::framework::proto::
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) {
......@@ -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<size_t>(reinterpret_cast<char*>(&persistable_) -
reinterpret_cast<char*>(&type_)) +
static_cast<size_t>(reinterpret_cast<char *>(&persistable_) -
reinterpret_cast<char *>(&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) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -6817,7 +6861,8 @@ 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;
......@@ -6836,8 +6881,8 @@ bool VarDesc::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_type()));
} else {
goto handle_unusual;
}
......@@ -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;
......@@ -6961,11 +7006,11 @@ size_t VarDesc::ByteSizeLong() const {
}
void VarDesc::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const VarDesc*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const VarDesc *>(&from));
}
void VarDesc::MergeFrom(const VarDesc& from) {
void VarDesc::MergeFrom(const VarDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.VarDesc)
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(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) {
......@@ -7174,25 +7224,23 @@ 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<size_t>(reinterpret_cast<char*>(&forward_block_idx_) -
reinterpret_cast<char*>(&idx_)) +
static_cast<size_t>(reinterpret_cast<char *>(&forward_block_idx_) -
reinterpret_cast<char *>(&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<size_t>(reinterpret_cast<char*>(&parent_idx_) -
reinterpret_cast<char*>(&idx_)) +
::memset(&idx_, 0,
static_cast<size_t>(reinterpret_cast<char *>(&parent_idx_) -
reinterpret_cast<char *>(&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<size_t>(reinterpret_cast<char*>(&parent_idx_) -
reinterpret_cast<char*>(&idx_)) +
static_cast<size_t>(reinterpret_cast<char *>(&parent_idx_) -
reinterpret_cast<char *>(&idx_)) +
sizeof(parent_idx_));
forward_block_idx_ = -1;
}
......@@ -7243,9 +7291,10 @@ void BlockDesc::Clear() {
}
bool BlockDesc::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -7259,7 +7308,8 @@ 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;
......@@ -7269,8 +7319,8 @@ bool BlockDesc::MergePartialFromCodedStream(
set_has_idx();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32,
::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &idx_)));
::google::protobuf::internal::WireFormatLite::TYPE_INT32>(input,
&idx_)));
} else {
goto handle_unusual;
}
......@@ -7296,8 +7346,8 @@ bool BlockDesc::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_vars()));
} else {
goto handle_unusual;
}
......@@ -7308,8 +7358,8 @@ bool BlockDesc::MergePartialFromCodedStream(
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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_ops()));
} else {
goto handle_unusual;
}
......@@ -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;
......@@ -7469,11 +7519,11 @@ size_t BlockDesc::ByteSizeLong() const {
}
void BlockDesc::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const BlockDesc*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const BlockDesc *>(&from));
}
void BlockDesc::MergeFrom(const BlockDesc& from) {
void BlockDesc::MergeFrom(const BlockDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.BlockDesc)
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_;
......@@ -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) {
::google::protobuf::io::CodedInputStream *input) {
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(
......@@ -7732,15 +7782,16 @@ 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()));
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_blocks()));
} else {
goto handle_unusual;
}
......@@ -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<const ProgramDesc*>(&from));
const ::google::protobuf::MessageLite &from) {
MergeFrom(*::google::protobuf::down_cast<const ProgramDesc *>(&from));
}
void ProgramDesc::MergeFrom(const ProgramDesc& from) {
void ProgramDesc::MergeFrom(const ProgramDesc &from) {
// @@protoc_insertion_point(class_specific_merge_from_start:paddle_mobile.framework.proto.ProgramDesc)
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,28 +7913,28 @@ 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_;
......
......@@ -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<const OpDesc_Attr*>(
static inline const OpDesc_Attr *internal_default_instance() {
return reinterpret_cast<const OpDesc_Attr *>(
&_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<float>& floats() const;
::google::protobuf::RepeatedField<float>* mutable_floats();
const ::google::protobuf::RepeatedField<float> &floats() const;
::google::protobuf::RepeatedField<float> *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<bool>& bools() const;
::google::protobuf::RepeatedField<bool>* mutable_bools();
const ::google::protobuf::RepeatedField<bool> &bools() const;
::google::protobuf::RepeatedField<bool> *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<const OpDesc_Var*>(&_OpDesc_Var_default_instance_);
static inline const OpDesc_Var *internal_default_instance() {
return reinterpret_cast<const OpDesc_Var *>(&_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 &parameter() 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<const OpDesc*>(&_OpDesc_default_instance_);
static inline const OpDesc *internal_default_instance() {
return reinterpret_cast<const OpDesc *>(&_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<const OpProto_Var*>(
static inline const OpProto_Var *internal_default_instance() {
return reinterpret_cast<const OpProto_Var *>(
&_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<const OpProto_Attr*>(
static inline const OpProto_Attr *internal_default_instance() {
return reinterpret_cast<const OpProto_Attr *>(
&_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<const OpProto*>(&_OpProto_default_instance_);
static inline const OpProto *internal_default_instance() {
return reinterpret_cast<const OpProto *>(&_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<const VarType_TensorDesc*>(
static inline const VarType_TensorDesc *internal_default_instance() {
return reinterpret_cast<const VarType_TensorDesc *>(
&_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<const VarType_LoDTensorDesc*>(
static inline const VarType_LoDTensorDesc *internal_default_instance() {
return reinterpret_cast<const VarType_LoDTensorDesc *>(
&_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<const VarType_LoDTensorArrayDesc*>(
static inline const VarType_LoDTensorArrayDesc *internal_default_instance() {
return reinterpret_cast<const VarType_LoDTensorArrayDesc *>(
&_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<const VarType_ReaderDesc*>(
static inline const VarType_ReaderDesc *internal_default_instance() {
return reinterpret_cast<const VarType_ReaderDesc *>(
&_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<const VarType_ChannelDesc*>(
static inline const VarType_ChannelDesc *internal_default_instance() {
return reinterpret_cast<const VarType_ChannelDesc *>(
&_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<const VarType_Tuple*>(
static inline const VarType_Tuple *internal_default_instance() {
return reinterpret_cast<const VarType_Tuple *>(
&_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<int>& element_type() const;
::google::protobuf::RepeatedField<int>* mutable_element_type();
const ::google::protobuf::RepeatedField<int> &element_type() const;
::google::protobuf::RepeatedField<int> *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<const VarType*>(&_VarType_default_instance_);
static inline const VarType *internal_default_instance() {
return reinterpret_cast<const VarType *>(&_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<const VarDesc*>(&_VarDesc_default_instance_);
static inline const VarDesc *internal_default_instance() {
return reinterpret_cast<const VarDesc *>(&_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<const BlockDesc*>(&_BlockDesc_default_instance_);
static inline const BlockDesc *internal_default_instance() {
return reinterpret_cast<const BlockDesc *>(&_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<const ProgramDesc*>(
static inline const ProgramDesc *internal_default_instance() {
return reinterpret_cast<const ProgramDesc *>(
&_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_;
......@@ -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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.name)
}
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.s)
}
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<float>& OpDesc_Attr::floats()
const {
inline const ::google::protobuf::RepeatedField<float> &
OpDesc_Attr::floats() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.floats)
return floats_;
}
inline ::google::protobuf::RepeatedField<float>* OpDesc_Attr::mutable_floats() {
inline ::google::protobuf::RepeatedField<float> *OpDesc_Attr::mutable_floats() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.floats)
return &floats_;
}
......@@ -2821,63 +2837,63 @@ inline ::google::protobuf::RepeatedField<float>* 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<const char*>(value), size);
strings_.Mutable(index)->assign(reinterpret_cast<const char *>(value), size);
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Attr.strings)
}
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<const char*>(value), size);
inline void OpDesc_Attr::add_strings(const char *value, size_t size) {
strings_.Add()->assign(reinterpret_cast<const char *>(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<bool>& OpDesc_Attr::bools()
const {
inline const ::google::protobuf::RepeatedField<bool> &
OpDesc_Attr::bools() const {
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.bools)
return bools_;
}
inline ::google::protobuf::RepeatedField<bool>* OpDesc_Attr::mutable_bools() {
inline ::google::protobuf::RepeatedField<bool> *OpDesc_Attr::mutable_bools() {
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.bools)
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Var.parameter)
}
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<const char*>(value), size);
arguments_.Mutable(index)->assign(reinterpret_cast<const char *>(value),
size);
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpDesc.Var.arguments)
}
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<const char*>(value), size);
inline void OpDesc_Var::add_arguments(const char *value, size_t size) {
arguments_.Add()->assign(reinterpret_cast<const char *>(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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Var.name)
}
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Var.comment)
}
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Attr.name)
}
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(value), size));
// @@protoc_insertion_point(field_set_pointer:paddle_mobile.framework.proto.OpProto.Attr.comment)
}
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(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<const ::paddle_mobile::framework::
proto::VarType_TensorDesc*>(
&::paddle_mobile::framework::proto::
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<const ::paddle_mobile::framework::
proto::VarType_TensorDesc*>(
&::paddle_mobile::framework::proto::
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<int>&
inline const ::google::protobuf::RepeatedField<int> &
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<int>*
inline ::google::protobuf::RepeatedField<int> *
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<const ::paddle_mobile::framework::
proto::VarType_TensorDesc*>(
&::paddle_mobile::framework::proto::
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<const ::paddle_mobile::framework::
proto::VarType_LoDTensorDesc*>(
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<const ::paddle_mobile::framework::proto::
VarType_LoDTensorArrayDesc*>(
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<const ::paddle_mobile::framework::
proto::VarType_ReaderDesc*>(
&::paddle_mobile::framework::proto::
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<const ::paddle_mobile::framework::
proto::VarType_ChannelDesc*>(
&::paddle_mobile::framework::proto::
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<const char*>(value), size));
::std::string(reinterpret_cast<const char *>(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_;
......
......@@ -13,10 +13,10 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include "lod_tensor.h"
#include <stdint.h>
#include <string.h>
#include <algorithm>
#include <iterator>
#include <stdint.h>
#include <string.h>
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<int>(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()) {
......
......@@ -14,12 +14,12 @@ limitations under the License. */
#pragma once
#include "tensor.h"
#include "tensor_util.h"
#include <memory>
#include <string>
#include <utility>
#include <vector>
#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<size_t, size_t> = {11, 24}
std::pair<LoD, std::pair<size_t, size_t>> GetSubLoDAndAbsoluteOffset(
const LoD &lod, size_t start_idx, size_t end_idx, size_t start_level);
std::pair<LoD, std::pair<size_t, size_t>>
GetSubLoDAndAbsoluteOffset(const LoD &lod, size_t start_idx, size_t end_idx,
size_t start_level);
void AppendLoD(LoD *lod, const LoD &lod_length);
......
......@@ -26,7 +26,7 @@ namespace paddle_mobile {
namespace framework {
class OpDesc : PaddleMobileObject {
public:
public:
OpDesc(const proto::OpDesc &desc);
const std::vector<std::string> &Input(const std::string &name) const;
const std::vector<std::string> &Output(const std::string &name) const;
......@@ -40,7 +40,7 @@ class OpDesc : PaddleMobileObject {
const std::string &Type() { return desc_.type(); };
private:
private:
proto::OpDesc desc_;
VariableNameMap inputs_;
VariableNameMap outputs_;
......
......@@ -24,42 +24,38 @@ SOFTWARE.
namespace paddle_mobile {
namespace framework {
template <typename Dtype>
struct OpInfo {
template <typename Dtype> struct OpInfo {
OpCreator<Dtype> creator_;
const OpCreator<Dtype>& Creator() const {
const OpCreator<Dtype> &Creator() const {
// PADDLE_ENFORCE_NOT_NULL(creator_,
// "Operator Creator has not been registered");
return creator_;
}
};
template <typename Dtype>
class OpInfoMap;
template <typename Dtype> class OpInfoMap;
template <typename Dtype>
static OpInfoMap<Dtype>* g_op_info_map = nullptr;
template <typename Dtype> static OpInfoMap<Dtype> *g_op_info_map = nullptr;
template <typename Dtype>
class OpInfoMap {
public:
static OpInfoMap& Instance() {
template <typename Dtype> class OpInfoMap {
public:
static OpInfoMap &Instance() {
if (g_op_info_map<Dtype> == nullptr) {
g_op_info_map<Dtype> = new OpInfoMap();
}
return *g_op_info_map<Dtype>;
};
bool Has(const std::string& op_type) const {
bool Has(const std::string &op_type) const {
return map_.find(op_type) != map_.end();
}
void Insert(const std::string& type, const OpInfo<Dtype>& info) {
void Insert(const std::string &type, const OpInfo<Dtype> &info) {
// PADDLE_ENFORCE(!Has(type), "Operator %s has been registered", type);
map_.insert({type, info});
}
const OpInfo<Dtype>& Get(const std::string& type) const {
const OpInfo<Dtype> &Get(const std::string &type) const {
auto op_info_ptr = GetNullable(type);
// 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<Dtype>* GetNullable(const std::string& type) const {
const OpInfo<Dtype> *GetNullable(const std::string &type) const {
auto it = map_.find(type);
if (it == map_.end()) {
return nullptr;
......@@ -76,15 +72,15 @@ class OpInfoMap {
}
}
const std::unordered_map<std::string, OpInfo<Dtype>>& map() const {
const std::unordered_map<std::string, OpInfo<Dtype>> &map() const {
return map_;
}
std::unordered_map<std::string, OpInfo<Dtype>>* mutable_map() {
std::unordered_map<std::string, OpInfo<Dtype>> *mutable_map() {
return &map_;
}
private:
private:
OpInfoMap() = default;
std::unordered_map<std::string, OpInfo<Dtype>> map_;
......
......@@ -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<int>(key.data_type_) << LEFT_SHIFT;
int data_layout = static_cast<int>(key.data_layout_) << (LEFT_SHIFT * 2);
......@@ -44,18 +44,18 @@ 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_);
}
......
......@@ -23,23 +23,17 @@ namespace paddle_mobile {
namespace framework {
template <typename Dtype>
OperatorBase<Dtype>::OperatorBase(const std::string& type,
const VariableNameMap& inputs,
const VariableNameMap& outputs,
const AttributeMap& attrs,
OperatorBase<Dtype>::OperatorBase(const std::string &type,
const VariableNameMap &inputs,
const VariableNameMap &outputs,
const AttributeMap &attrs,
std::shared_ptr<Scope> scope)
: type_(type),
inputs_(inputs),
outputs_(outputs),
attrs_(attrs),
: type_(type), inputs_(inputs), outputs_(outputs), attrs_(attrs),
scope_(scope) {
CheckAllInputOutputSet();
}
template <typename Dtype>
void OperatorBase<Dtype>::Run() {
RunImpl();
}
template <typename Dtype> void OperatorBase<Dtype>::Run() { RunImpl(); }
template <typename Dtype>
void OperatorBase<Dtype>::CheckAllInputOutputSet() const {}
......
......@@ -35,50 +35,48 @@ SOFTWARE.
namespace paddle_mobile {
namespace framework {
template <typename Dtype>
class OperatorBase : PaddleMobileObject {
public:
OperatorBase(const std::string& type, const VariableNameMap& inputs,
const VariableNameMap& outputs, const AttributeMap& attrs,
template <typename Dtype> class OperatorBase : PaddleMobileObject {
public:
OperatorBase(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs, const AttributeMap &attrs,
std::shared_ptr<Scope> 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> scope_;
std::string type_;
VariableNameMap inputs_;
VariableNameMap outputs_;
AttributeMap attrs_;
private:
private:
void CheckAllInputOutputSet() const;
virtual void RunImpl() const = 0;
};
template <typename Dtype>
class OperatorWithKernel : public OperatorBase<Dtype> {
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> scope)
: OperatorBase<Dtype>(type, inputs, outputs, attrs, scope) {}
virtual void InferShape() const = 0;
protected:
protected:
virtual void RunImpl() const = 0;
private:
private:
};
template <typename Dtype, typename P>
class OpKernelBase : PaddleMobileObject {
public:
virtual void Compute(const P& para) const = 0;
template <typename Dtype, typename P> class OpKernelBase : PaddleMobileObject {
public:
virtual void Compute(const P &para) const = 0;
virtual ~OpKernelBase() = default;
};
......
......@@ -18,19 +18,19 @@ SOFTWARE.
#pragma once
#include <string>
#include "stdio.h"
#include <string>
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
......@@ -28,12 +28,12 @@ namespace framework {
template <typename Dtype, Precision P = Precision::FP32>
class Program : PaddleMobileObject {
public:
public:
std::shared_ptr<ProgramDesc> originProgram;
std::shared_ptr<ProgramDesc> optimizeProgram;
std::shared_ptr<Scope> scope;
private:
private:
};
} // namespace framework
......
......@@ -28,12 +28,12 @@ namespace paddle_mobile {
namespace framework {
class ProgramDesc : PaddleMobileObject {
public:
public:
ProgramDesc(const proto::ProgramDesc &desc);
std::shared_ptr<BlockDesc> Block(size_t idx);
const std::vector<std::shared_ptr<BlockDesc>> &Blocks() { return blocks_; };
private:
private:
std::vector<std::shared_ptr<BlockDesc>> blocks_;
proto::ProgramDesc desc_;
};
......
......@@ -18,38 +18,38 @@ SOFTWARE.
==============================================================================*/
#pragma once
#include "variable.h"
#include <list> //std::list
#include <mutex> //std::mutex
#include <unordered_map> //std::unordered_map
#include "variable.h"
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<std::string>& var_names);
void EraseVars(const std::vector<std::string> &var_names);
/// Find a variable in the scope or any of its ancestors. Returns
/// 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,21 +58,21 @@ class Scope {
std::vector<std::string> 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<std::string, Variable*> vars_;
mutable std::list<Scope*> kids_;
Scope const* parent_{nullptr};
mutable std::unordered_map<std::string, Variable *> vars_;
mutable std::list<Scope *> kids_;
Scope const *parent_{nullptr};
mutable std::mutex mutex_;
};
......
......@@ -27,8 +27,8 @@ namespace paddle_mobile {
namespace framework {
class SelectedRows {
public:
SelectedRows(const std::vector<int64_t>& rows, const int64_t& height)
public:
SelectedRows(const std::vector<int64_t> &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<int64_t>& rows() const { return rows_; }
const std::vector<int64_t> &rows() const { return rows_; }
std::vector<int64_t>* mutable_rows() { return &rows_; }
std::vector<int64_t> *mutable_rows() { return &rows_; }
void set_rows(const std::vector<int64_t>& rows) { rows_ = rows; }
void set_rows(const std::vector<int64_t> &rows) { rows_ = rows; }
/**
* get the index of id in rows
......@@ -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.
......
......@@ -26,11 +26,9 @@ limitations under the License. */
namespace paddle_mobile {
namespace framework {
template <typename... T>
struct SizeOfTypeFunctor;
template <typename... T> struct SizeOfTypeFunctor;
template <typename T>
struct SizeOfTypeFunctor<T> {
template <typename T> struct SizeOfTypeFunctor<T> {
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<T> {
}
};
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 <typename T>
inline T *data() {
template <typename T> inline T *data() {
check_memory_size();
// PADDLE_ENFORCE(std::is_same<T, void>::value ||
// holder_->type().hash_code() == typeid(T).hash_code(),
......@@ -84,8 +80,7 @@ class Tensor {
}
/*! Return a pointer to constant memory block. */
template <typename T>
inline const T *data() const {
template <typename T> inline const T *data() const {
check_memory_size();
// PADDLE_ENFORCE(std::is_same<T, void>::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 <typename T>
inline T *mutable_data() {
template <typename T> inline T *mutable_data() {
static_assert(std::is_pod<T>::value, "T must be POD");
return reinterpret_cast<T *>(mutable_data(typeid(T)));
}
......@@ -141,8 +135,7 @@ class Tensor {
*
* @note If not exist, then allocation.
*/
template <typename T>
inline T *mutable_data(DDim dims) {
template <typename T> inline T *mutable_data(DDim dims) {
static_assert(std::is_pod<T>::value, "T must be POD");
Resize(dims);
return mutable_data<T>();
......@@ -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<uint8_t *>(memory::Alloc(size)),
memory::PODDeleter<uint8_t>()),
size_(size),
type_(type) {
size_(size), type_(type) {
// PADDLE_ENFORCE_NOT_NULL(ptr_, "Insufficient %s
// memory to allocation.",
// (is_cpu_place(place_) ?
......
......@@ -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 <typename Predicate>
struct AnyDTypeVisitor {
template <typename Predicate> 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 <typename T>
void operator()() const {
template <typename T> void operator()() const {
// auto t = EigenVector<T>::Flatten(tensor_);
// auto o = EigenScalar<bool>::From(*out_);
// return any of predicate_(t) is true.
......@@ -68,18 +66,17 @@ struct AnyDTypeVisitor {
};
template <typename Predicate>
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>(predicate, tensor, out));
}
template <typename Predicate>
struct AnyVisitor {
const framework::Tensor& tensor_;
template <typename Predicate> 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<bool>();
}
};
template <typename Predicate>
inline bool Any(const framework::Tensor& tensor, Predicate predicate) {
inline bool Any(const framework::Tensor &tensor, Predicate predicate) {
AnyVisitor<Predicate> visitor(tensor, predicate);
// return platform::VisitPlace(visitor);
return visitor();
......@@ -104,36 +101,36 @@ inline bool Any(const framework::Tensor& tensor, Predicate predicate) {
struct ContainsNANPredicate {
template <typename T>
auto operator()(const T& eigen_vec) const
auto operator()(const T &eigen_vec) const
-> decltype(std::declval<T>().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 <typename T>
auto operator()(const T& eigen_vec) const
auto operator()(const T &eigen_vec) const
-> decltype(std::declval<T>().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) {
void TensorToStream(std::ostream &os, const Tensor &tensor) {
{ // the 1st field, uint32_t version
constexpr uint32_t version = 0;
os.write(reinterpret_cast<const char*>(&version), sizeof(version));
os.write(reinterpret_cast<const char *>(&version), sizeof(version));
}
{ // the 2nd field, tensor description
// int32_t size
......@@ -141,49 +138,48 @@ void TensorToStream(std::ostream& os, const Tensor& tensor) {
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<int>(dims.size()), 0);
std::copy(dims.begin(), dims.end(), pb_dims->begin());
int32_t size = desc.ByteSize();
os.write(reinterpret_cast<const char*>(&size), sizeof(size));
os.write(reinterpret_cast<const char *>(&size), sizeof(size));
auto out = desc.SerializeAsString();
os.write(out.data(), size);
}
{ // the 3rd field, tensor data
uint64_t size = tensor.memory_size();
auto* data_ptr = tensor.data<void>();
auto *data_ptr = tensor.data<void>();
// PADDLE_ENFORCE(size < std::numeric_limits<std::streamsize>::max(),
// "Index overflow when writing tensor");
os.write(static_cast<const char*>(data_ptr),
os.write(static_cast<const char *>(data_ptr),
static_cast<std::streamsize>(size));
}
}
struct DeserializedDataFunctor {
DeserializedDataFunctor(void** buf, Tensor* tensor)
DeserializedDataFunctor(void **buf, Tensor *tensor)
: buf_(buf), tensor_(tensor) {}
template <typename T>
void operator()() {
template <typename T> void operator()() {
*buf_ = tensor_->mutable_data<T>();
}
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<char*>(&version), sizeof(version));
is.read(reinterpret_cast<char *>(&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;
is.read(reinterpret_cast<char*>(&size), sizeof(size));
is.read(reinterpret_cast<char *>(&size), sizeof(size));
std::unique_ptr<char[]> buf(new char[size]);
is.read(reinterpret_cast<char*>(buf.get()), size);
is.read(reinterpret_cast<char *>(buf.get()), size);
// PADDLE_ENFORCE(desc.ParseFromArray(buf.get(), size),
// "Cannot parse tensor desc");
}
......@@ -192,11 +188,11 @@ void TensorFromStream(std::istream& is, framework::Tensor* tensor) {
dims.reserve(static_cast<size_t>(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<char*>(buf), tensor->memory_size());
is.read(static_cast<char *>(buf), tensor->memory_size());
}
}
......
......@@ -13,51 +13,51 @@ See the License for the specific language governing permissions and
limitations under the License. */
#pragma once
#include <vector>
#include "framework.pb.h"
#include "memory/t_malloc.h"
#include "platform/data_type.h"
#include "tensor.h"
#include <vector>
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 <typename T>
void TensorFromVector(const std::vector<T>& src, Tensor* dst);
void TensorFromVector(const std::vector<T> &src, Tensor *dst);
template <typename T>
void TesnorToVector(const Tensor& src, std::vector<T>* dst);
void TesnorToVector(const Tensor &src, std::vector<T> *dst);
bool TensorContainsNAN(const framework::Tensor& tensor);
bool 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 <typename T>
void TensorFromVector(const std::vector<T>& src, Tensor* dst) {
auto src_ptr = static_cast<const void*>(src.data());
void TensorFromVector(const std::vector<T> &src, Tensor *dst) {
auto src_ptr = static_cast<const void *>(src.data());
dst->Resize({static_cast<int64_t>(src.size())});
auto dst_ptr = static_cast<void*>(dst->mutable_data<T>());
auto dst_ptr = static_cast<void *>(dst->mutable_data<T>());
auto size = src.size() * sizeof(T);
memory::Copy(dst_ptr, src_ptr, size);
}
template <typename T>
void TensorToVector(const Tensor& src, std::vector<T>* dst) {
auto src_ptr = static_cast<const void*>(src.data<T>());
void TensorToVector(const Tensor &src, std::vector<T> *dst) {
auto src_ptr = static_cast<const void *>(src.data<T>());
auto size = src.numel() * sizeof(T);
dst->resize(src.numel());
auto dst_ptr = static_cast<void*>(dst->data());
auto dst_ptr = static_cast<void *>(dst->data());
memory::Copy(dst_ptr, src_ptr, size);
}
......
......@@ -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(); }
......@@ -80,7 +80,7 @@ class VarDesc {
return this->RepeatedToVector(tensor_desc().dims());
}
private:
private:
proto::VarDesc desc_;
};
......
......@@ -18,42 +18,39 @@ SOFTWARE.
==============================================================================*/
#pragma once
#include "paddle_mobile_object.h"
#include <iostream>
#include <memory>
#include <string>
#include <typeindex>
#include <typeinfo>
#include "paddle_mobile_object.h"
namespace paddle_mobile {
namespace framework {
class Variable : public PaddleMobileObject {
public:
public:
Variable() {}
~Variable() {}
template <typename T>
const T* Get() const {
return static_cast<const T*>(holder_->Ptr());
template <typename T> const T *Get() const {
return static_cast<const T *>(holder_->Ptr());
}
bool IsInitialized() const { return holder_ != nullptr; }
const std::string* Name() { return name_; }
const std::string *Name() { return name_; }
template <typename T>
T* GetMutable() {
template <typename T> T *GetMutable() {
if (!IsType<T>()) {
if (*Name() == "pixel") {
// std::cout << " reset " << *Name() << std::endl;
}
holder_.reset(new PlaceholderImp<T>(new T()));
}
return static_cast<T*>(holder_->Ptr());
return static_cast<T *>(holder_->Ptr());
}
template <typename T>
bool IsType() const {
template <typename T> 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 <typename T>
struct PlaceholderImp : public Placeholder {
explicit PlaceholderImp(T* ptr) : ptr_(ptr), type_(typeid(T)) {}
template <typename T> 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<void*>(ptr_.get());
virtual const std::type_info &Type() const { return type_; }
virtual void *Ptr() const override {
return static_cast<void *>(ptr_.get());
}
std::unique_ptr<T> ptr_;
const std::type_info& type_;
const std::type_info &type_;
};
std::unique_ptr<Placeholder> holder_;
friend class Scope;
const std::string* name_;
const std::string *name_;
};
} // namespace framework
} // namespace paddle_mobile
......@@ -143,8 +143,8 @@ void Loader<Dtype, P>::LoadVar(framework::LoDTensor *tensor,
};
template <typename Dtype, Precision P>
const framework::Program<Dtype, P> Loader<Dtype, P>::Load(
const std::string &dirname) {
const framework::Program<Dtype, P>
Loader<Dtype, P>::Load(const std::string &dirname) {
std::string model_filename = dirname + "/__model__";
std::string program_desc_str;
ReadBinaryFile(model_filename, &program_desc_str);
......
......@@ -29,10 +29,10 @@ namespace paddle_mobile {
template <typename Dtype, Precision P = Precision::FP32>
class Loader : PaddleMobileObject {
public:
public:
const framework::Program<Dtype, P> Load(const std::string &dirname);
private:
private:
void LoadVar(framework::LoDTensor *tensor, const std::string &file_path);
};
......
......@@ -37,11 +37,10 @@ void Free(void *ptr);
* std::unique_ptr<T> in tensor.h.
* static_cast
*/
template <typename T>
class PODDeleter {
template <typename T> class PODDeleter {
static_assert(std::is_pod<T>::value, "T must be POD");
public:
public:
explicit PODDeleter(){};
void operator()(T *ptr) { Free(static_cast<void *>(ptr)); }
......@@ -55,9 +54,8 @@ class PODDeleter {
* std::unique_ptr<T> in tensor.h.
* reinterpret_cast
*/
template <typename T>
class PlainDeleter {
public:
template <typename T> class PlainDeleter {
public:
explicit PlainDeleter(){};
void operator()(T *ptr) { Free(reinterpret_cast<void *>(ptr)); }
......
......@@ -28,9 +28,9 @@ using namespace framework;
template <typename DeviceType, typename T>
class ConvOp : public framework::OperatorWithKernel<DeviceType> {
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<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType>(type, inputs, outputs, attrs,
scope),
......@@ -39,7 +39,7 @@ class ConvOp : public framework::OperatorWithKernel<DeviceType> {
using framework::OperatorWithKernel<DeviceType>::OperatorWithKernel;
void InferShape() const override;
protected:
protected:
void RunImpl() const {
operators::ConvKernel<DeviceType, T, ConvParam> kernel;
kernel.Compute(param_);
......
......@@ -21,9 +21,9 @@ SOFTWARE.
namespace paddle_mobile {
namespace operators {
bool IsExpand(const std::vector<int64_t>& filter_dim,
const std::vector<int>& strides, const std::vector<int>& paddings,
const std::vector<int>& dilations) {
bool IsExpand(const std::vector<int64_t> &filter_dim,
const std::vector<int> &strides, const std::vector<int> &paddings,
const std::vector<int> &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<int>(filter_dim[j + 2]) == 1);
......@@ -35,8 +35,8 @@ bool IsExpand(const std::vector<int64_t>& filter_dim,
}
template <>
void ConvKernel<CPU, float, ConvParam>::Compute(const ConvParam& param) const {
const Tensor* input = param.Input();
void ConvKernel<CPU, float, ConvParam>::Compute(const ConvParam &param) const {
const Tensor *input = param.Input();
std::cout << " conv param " << param << std::endl;
......@@ -45,7 +45,7 @@ void ConvKernel<CPU, float, ConvParam>::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<T>(context.GetPlace());
int groups = param.Groups();
......
......@@ -31,7 +31,7 @@ using namespace framework;
template <typename DeviceType, typename T, typename P>
class ConvKernel : public framework::OpKernelBase<DeviceType, ConvParam> {
public:
public:
void Compute(const ConvParam &param) const;
};
}
......
......@@ -24,12 +24,11 @@ namespace math {
* col =
* [input_channels, filter_height, filter_width, output_height, output_width]
*/
template <class T>
class Im2ColFunctor<ColFormat::kCFO, CPU, T> {
public:
void operator()(const framework::Tensor& im, const std::vector<int>& dilation,
const std::vector<int>& stride,
const std::vector<int>& padding, framework::Tensor* col) {
template <class T> class Im2ColFunctor<ColFormat::kCFO, CPU, T> {
public:
void operator()(const framework::Tensor &im, const std::vector<int> &dilation,
const std::vector<int> &stride,
const std::vector<int> &padding, framework::Tensor *col) {
// PADDLE_ENFORCE(im.dims().size() == 3);
// PADDLE_ENFORCE(col->dims().size() == 5);
......@@ -58,8 +57,8 @@ class Im2ColFunctor<ColFormat::kCFO, CPU, T> {
int channels_col = im_channels * filter_height * filter_width;
const T* im_data = im.data<T>();
T* col_data = col->data<T>();
const T *im_data = im.data<T>();
T *col_data = col->data<T>();
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<ColFormat::kCFO, CPU, T> {
* col =
* [input_channels, filter_height, filter_width, output_height, output_width]
*/
template <class T>
class Col2ImFunctor<ColFormat::kCFO, CPU, T> {
public:
void operator()(const framework::Tensor& col,
const std::vector<int>& dilation,
const std::vector<int>& stride,
const std::vector<int>& padding, framework::Tensor* im) {
template <class T> class Col2ImFunctor<ColFormat::kCFO, CPU, T> {
public:
void operator()(const framework::Tensor &col,
const std::vector<int> &dilation,
const std::vector<int> &stride,
const std::vector<int> &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<ColFormat::kCFO, CPU, T> {
int channels_col = im_channels * filter_height * filter_width;
T* im_data = im->data<T>();
const T* col_data = col.data<T>();
T *im_data = im->data<T>();
const T *col_data = col.data<T>();
for (int c = 0; c < channels_col; ++c) {
int w_offset = c % filter_width;
......@@ -152,12 +150,11 @@ template class Col2ImFunctor<ColFormat::kCFO, CPU, double>;
* col =
* [output_height, output_width, input_channels, filter_height, filter_width]
*/
template <class T>
class Im2ColFunctor<ColFormat::kOCF, CPU, T> {
public:
void operator()(const framework::Tensor& im, const std::vector<int>& dilation,
const std::vector<int>& stride,
const std::vector<int>& padding, framework::Tensor* col) {
template <class T> class Im2ColFunctor<ColFormat::kOCF, CPU, T> {
public:
void operator()(const framework::Tensor &im, const std::vector<int> &dilation,
const std::vector<int> &stride,
const std::vector<int> &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<ColFormat::kOCF, CPU, T> {
// 1, col_width, "col_width and padding(padding_left, padding_right)
// are " "inconsistent.");
const T* im_data = im.data<T>();
T* col_data = col->data<T>();
const T *im_data = im.data<T>();
T *col_data = col->data<T>();
for (int col_row_idx = 0; col_row_idx < col_height; ++col_row_idx) {
for (int col_col_idx = 0; col_col_idx < col_width; ++col_col_idx) {
......@@ -220,13 +217,12 @@ class Im2ColFunctor<ColFormat::kOCF, CPU, T> {
* col =
* [output_height, output_width, input_channels, filter_height, filter_width]
*/
template <class T>
class Col2ImFunctor<ColFormat::kOCF, CPU, T> {
public:
void operator()(const framework::Tensor& col,
const std::vector<int>& dilation,
const std::vector<int>& stride,
const std::vector<int>& padding, framework::Tensor* im) {
template <class T> class Col2ImFunctor<ColFormat::kOCF, CPU, T> {
public:
void operator()(const framework::Tensor &col,
const std::vector<int> &dilation,
const std::vector<int> &stride,
const std::vector<int> &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<ColFormat::kOCF, CPU, T> {
// 1, col_width, "col_width and padding(padding_left, padding_right)
// are " "inconsistent.");
T* im_data = im->data<T>();
const T* col_data = col.data<T>();
T *im_data = im->data<T>();
const T *col_data = col.data<T>();
for (int col_row_idx = 0; col_row_idx < col_height; ++col_row_idx) {
for (int col_col_idx = 0; col_col_idx < col_width; ++col_col_idx) {
......
......@@ -79,19 +79,19 @@ enum class ColFormat { kCFO = 0, kOCF = 1 };
*/
template <ColFormat Format, typename DeviceType, typename T>
class Im2ColFunctor {
public:
void operator()(const framework::Tensor& im, const std::vector<int>& dilation,
const std::vector<int>& stride,
const std::vector<int>& padding, framework::Tensor* col);
public:
void operator()(const framework::Tensor &im, const std::vector<int> &dilation,
const std::vector<int> &stride,
const std::vector<int> &padding, framework::Tensor *col);
};
template <ColFormat Format, typename DeviceType, typename T>
class Col2ImFunctor {
public:
void operator()(const framework::Tensor& col,
const std::vector<int>& dilation,
const std::vector<int>& stride,
const std::vector<int>& padding, framework::Tensor* im);
public:
void operator()(const framework::Tensor &col,
const std::vector<int> &dilation,
const std::vector<int> &stride,
const std::vector<int> &padding, framework::Tensor *im);
};
} // namespace math
......
......@@ -21,7 +21,7 @@ namespace math {
template <>
void gemm<float>(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<float>(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB,
template <>
void gemm<double>(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<double>(const CBLAS_TRANSPOSE transA, const CBLAS_TRANSPOSE transB,
template <>
void gemm<float>(const bool transA, const bool transB, const int M, const int N,
const int K, const float alpha, const float* A, const int lda,
const 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<float>(const bool transA, const bool transB, const int M, const int N,
template <>
void gemm<double>(const bool transA, const bool transB, const int M,
const int N, const int K, const double alpha, const double* A,
const int 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<float>(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<float>(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<float>(const framework::Tensor& matrix_a, bool trans_a,
}
template <>
void matmul<double>(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<double>(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();
......
......@@ -14,9 +14,9 @@ limitations under the License. */
#pragma once
#include "framework/tensor.h"
#include <cblas.h>
#include <cmath>
#include "framework/tensor.h"
namespace paddle_mobile {
namespace operators {
......@@ -24,19 +24,19 @@ namespace math {
template <typename T>
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 <typename T>
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 <typename T>
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);
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
......@@ -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 <typename T>
class Vol2ColFunctor<CPU, T> {
public:
void operator()(const Tensor& vol, const std::vector<int>& dilations,
const std::vector<int>& strides,
const std::vector<int>& paddings, Tensor* col) const {
template <typename T> class Vol2ColFunctor<CPU, T> {
public:
void operator()(const Tensor &vol, const std::vector<int> &dilations,
const std::vector<int> &strides,
const std::vector<int> &paddings, Tensor *col) const {
// PADDLE_ENFORCE(vol.dims().size() == 4);
// PADDLE_ENFORCE(col->dims().size() == 7);
......@@ -69,8 +68,8 @@ class Vol2ColFunctor<CPU, T> {
// "input_width and output_width are "
// "mismatching.");
const T* vol_data = vol.data<T>();
T* col_data = col->data<T>();
const T *vol_data = vol.data<T>();
T *col_data = col->data<T>();
for (int c = 0; c < channels_col; ++c) {
int w_offset = c % filter_width;
......@@ -108,12 +107,11 @@ class Vol2ColFunctor<CPU, T> {
* [input_channels, filter_depth, filter_height, filter_width,
* output_depth, output_height, output_width]
*/
template <typename T>
class Col2VolFunctor<CPU, T> {
public:
void operator()(const Tensor& col, const std::vector<int>& dilations,
const std::vector<int>& strides,
const std::vector<int>& paddings, Tensor* vol) const {
template <typename T> class Col2VolFunctor<CPU, T> {
public:
void operator()(const Tensor &col, const std::vector<int> &dilations,
const std::vector<int> &strides,
const std::vector<int> &paddings, Tensor *vol) const {
// PADDLE_ENFORCE(vol->dims().size() == 4);
// PADDLE_ENFORCE(col.dims().size() == 7);
......@@ -151,8 +149,8 @@ class Col2VolFunctor<CPU, T> {
// output_width,
// "input_width and output_width are "
// "mismatching.");
T* vol_data = vol->data<T>();
const T* col_data = col.data<T>();
T *vol_data = vol->data<T>();
const T *col_data = col.data<T>();
for (int c = 0; c < channels_col; ++c) {
int w_offset = c % filter_width;
......
......@@ -64,20 +64,18 @@ namespace math {
*/
using Tensor = paddle_mobile::framework::Tensor;
template <typename DeviceType, typename T>
class Vol2ColFunctor {
public:
void operator()(const Tensor& vol, const std::vector<int>& dilations,
const std::vector<int>& strides,
const std::vector<int>& paddings, Tensor* col) const;
template <typename DeviceType, typename T> class Vol2ColFunctor {
public:
void operator()(const Tensor &vol, const std::vector<int> &dilations,
const std::vector<int> &strides,
const std::vector<int> &paddings, Tensor *col) const;
};
template <typename DeviceType, typename T>
class Col2VolFunctor {
public:
void operator()(const Tensor& col, const std::vector<int>& dilations,
const std::vector<int>& strides,
const std::vector<int>& paddings, Tensor* vol) const;
template <typename DeviceType, typename T> class Col2VolFunctor {
public:
void operator()(const Tensor &col, const std::vector<int> &dilations,
const std::vector<int> &strides,
const std::vector<int> &paddings, Tensor *vol) const;
};
} // namespace math
......
......@@ -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] << ") "
......
......@@ -30,8 +30,8 @@ namespace operators {
using namespace framework;
class OpParam : PaddleMobileObject {
public:
protected:
public:
protected:
template <typename T>
static T *InputFrom(const VariableNameMap &inputs, const Scope &scope) {
return GetVarValue<T>("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_;
......
......@@ -14,9 +14,9 @@ limitations under the License. */
#pragma once
#include "framework/framework.pb.h"
#include <string>
#include <typeindex>
#include "framework/framework.pb.h"
namespace paddle_mobile {
namespace framework {
......
......@@ -17,9 +17,9 @@ 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
private: \
classname(const classname &) = delete; \
classname(classname &&) = delete; \
classname &operator=(const classname &) = delete; \
classname &operator=(classname &&) = delete
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册