Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
7cc864ea
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
338
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7cc864ea
编写于
5月 20, 2018
作者:
朔-望
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update for google code style
上级
75ba2f3d
变更
97
显示空白变更内容
内联
并排
Showing
97 changed file
with
2435 addition
and
2450 deletion
+2435
-2450
src/common/log.h
src/common/log.h
+27
-21
src/common/type_define.h
src/common/type_define.h
+5
-4
src/common/types.h
src/common/types.h
+3
-2
src/common/variant.h
src/common/variant.h
+23
-11
src/framework/attribute.cpp
src/framework/attribute.cpp
+1
-1
src/framework/attribute.h
src/framework/attribute.h
+65
-60
src/framework/block_desc.cpp
src/framework/block_desc.cpp
+2
-2
src/framework/block_desc.h
src/framework/block_desc.h
+7
-6
src/framework/data_layout.h
src/framework/data_layout.h
+11
-11
src/framework/data_transform.cpp
src/framework/data_transform.cpp
+2
-2
src/framework/data_transform.h
src/framework/data_transform.h
+2
-2
src/framework/data_type.h
src/framework/data_type.h
+1
-1
src/framework/ddim.cc
src/framework/ddim.cc
+66
-51
src/framework/ddim.h
src/framework/ddim.h
+10
-6
src/framework/dim.h
src/framework/dim.h
+53
-29
src/framework/executor.cpp
src/framework/executor.cpp
+2
-2
src/framework/executor.h
src/framework/executor.h
+6
-5
src/framework/framework.pb.cpp
src/framework/framework.pb.cpp
+1292
-1332
src/framework/framework.pb.h
src/framework/framework.pb.h
+298
-315
src/framework/lod_tensor.cc
src/framework/lod_tensor.cc
+16
-26
src/framework/lod_tensor.h
src/framework/lod_tensor.h
+8
-9
src/framework/op_desc.cpp
src/framework/op_desc.cpp
+2
-2
src/framework/op_desc.h
src/framework/op_desc.h
+4
-4
src/framework/op_info.h
src/framework/op_info.h
+12
-8
src/framework/op_kernel_type.h
src/framework/op_kernel_type.h
+2
-2
src/framework/op_proto_maker.h
src/framework/op_proto_maker.h
+2
-2
src/framework/operator.cpp
src/framework/operator.cpp
+6
-3
src/framework/operator.h
src/framework/operator.h
+11
-9
src/framework/paddle_mobile_object.h
src/framework/paddle_mobile_object.h
+4
-4
src/framework/program-optimize/node.cpp
src/framework/program-optimize/node.cpp
+2
-2
src/framework/program-optimize/node.h
src/framework/program-optimize/node.h
+4
-4
src/framework/program-optimize/program_optimize.cpp
src/framework/program-optimize/program_optimize.cpp
+4
-4
src/framework/program-optimize/program_optimize.h
src/framework/program-optimize/program_optimize.h
+6
-6
src/framework/program.cpp
src/framework/program.cpp
+1
-1
src/framework/program.h
src/framework/program.h
+4
-4
src/framework/program_desc.cpp
src/framework/program_desc.cpp
+2
-2
src/framework/program_desc.h
src/framework/program_desc.h
+4
-4
src/framework/scope.cc
src/framework/scope.cc
+2
-2
src/framework/scope.h
src/framework/scope.h
+7
-7
src/framework/selected_rows.h
src/framework/selected_rows.h
+4
-4
src/framework/tensor.h
src/framework/tensor.h
+20
-12
src/framework/tensor_util.cc
src/framework/tensor_util.cc
+15
-11
src/framework/tensor_util.h
src/framework/tensor_util.h
+3
-3
src/framework/var_desc.cpp
src/framework/var_desc.cpp
+2
-2
src/framework/var_desc.h
src/framework/var_desc.h
+21
-21
src/framework/var_type.h
src/framework/var_type.h
+2
-2
src/framework/variable.h
src/framework/variable.h
+13
-9
src/io.cpp
src/io.cpp
+101
-167
src/io.h
src/io.h
+3
-3
src/memory/t_malloc.cc
src/memory/t_malloc.cc
+2
-2
src/memory/t_malloc.h
src/memory/t_malloc.h
+8
-6
src/operators/batchnorm_op.cpp
src/operators/batchnorm_op.cpp
+2
-2
src/operators/batchnorm_op.h
src/operators/batchnorm_op.h
+4
-4
src/operators/concat_op.cpp
src/operators/concat_op.cpp
+2
-2
src/operators/concat_op.h
src/operators/concat_op.h
+4
-4
src/operators/conv_op.cpp
src/operators/conv_op.cpp
+2
-2
src/operators/conv_op.h
src/operators/conv_op.h
+4
-4
src/operators/elementwise_add_op.cpp
src/operators/elementwise_add_op.cpp
+2
-2
src/operators/elementwise_add_op.h
src/operators/elementwise_add_op.h
+4
-4
src/operators/kernel/arm/batchnorm_kernel.cpp
src/operators/kernel/arm/batchnorm_kernel.cpp
+2
-2
src/operators/kernel/arm/concat_kernel.cpp
src/operators/kernel/arm/concat_kernel.cpp
+5
-4
src/operators/kernel/arm/conv_kernel.cpp
src/operators/kernel/arm/conv_kernel.cpp
+4
-3
src/operators/kernel/arm/elementwise_add_kernel.cpp
src/operators/kernel/arm/elementwise_add_kernel.cpp
+4
-3
src/operators/kernel/arm/lrn_kernel.cpp
src/operators/kernel/arm/lrn_kernel.cpp
+4
-3
src/operators/kernel/arm/mul_kernel.cpp
src/operators/kernel/arm/mul_kernel.cpp
+4
-3
src/operators/kernel/arm/pool_kernel.cpp
src/operators/kernel/arm/pool_kernel.cpp
+5
-4
src/operators/kernel/batchnorm_kernel.h
src/operators/kernel/batchnorm_kernel.h
+3
-3
src/operators/kernel/concat_kernel.h
src/operators/kernel/concat_kernel.h
+3
-3
src/operators/kernel/conv_kernel.h
src/operators/kernel/conv_kernel.h
+3
-3
src/operators/kernel/elementwise_add_kernel.h
src/operators/kernel/elementwise_add_kernel.h
+3
-3
src/operators/kernel/fpga/conv_kernel.cpp
src/operators/kernel/fpga/conv_kernel.cpp
+1
-1
src/operators/kernel/lrn_kernel.h
src/operators/kernel/lrn_kernel.h
+5
-4
src/operators/kernel/mul_kernel.h
src/operators/kernel/mul_kernel.h
+3
-3
src/operators/kernel/pool_kernel.h
src/operators/kernel/pool_kernel.h
+3
-3
src/operators/lrn_op.cpp
src/operators/lrn_op.cpp
+4
-3
src/operators/lrn_op.h
src/operators/lrn_op.h
+4
-4
src/operators/math/elementwise_op_function.h
src/operators/math/elementwise_op_function.h
+18
-14
src/operators/math/im2col.cc
src/operators/math/im2col.cc
+15
-11
src/operators/math/im2col.h
src/operators/math/im2col.h
+5
-5
src/operators/math/math_function.cc
src/operators/math/math_function.cc
+3
-3
src/operators/math/math_function.h
src/operators/math/math_function.h
+4
-4
src/operators/math/pool3x3.h
src/operators/math/pool3x3.h
+1
-1
src/operators/math/pool_2x2.h
src/operators/math/pool_2x2.h
+1
-1
src/operators/math/pooling.cpp
src/operators/math/pooling.cpp
+4
-5
src/operators/math/pooling.h
src/operators/math/pooling.h
+9
-7
src/operators/math/transform.h
src/operators/math/transform.h
+3
-3
src/operators/math/vol2col.cc
src/operators/math/vol2col.cc
+9
-7
src/operators/math/vol2col.h
src/operators/math/vol2col.h
+9
-7
src/operators/mul_op.cpp
src/operators/mul_op.cpp
+4
-3
src/operators/mul_op.h
src/operators/mul_op.h
+4
-4
src/operators/op_param.cpp
src/operators/op_param.cpp
+2
-2
src/operators/op_param.h
src/operators/op_param.h
+18
-18
src/operators/pool_op.cpp
src/operators/pool_op.cpp
+2
-2
src/operators/pool_op.h
src/operators/pool_op.h
+4
-4
src/platform/data_type.h
src/platform/data_type.h
+56
-56
src/platform/macros.h
src/platform/macros.h
+5
-5
test/operators/test_cov_op.cpp
test/operators/test_cov_op.cpp
+2
-2
未找到文件。
src/common/log.h
浏览文件 @
7cc864ea
...
@@ -51,12 +51,13 @@ struct Print;
...
@@ -51,12 +51,13 @@ struct Print;
struct
Print
{
struct
Print
{
friend
struct
ToLog
;
friend
struct
ToLog
;
template
<
typename
T
>
Print
&
operator
<<
(
T
const
&
value
)
{
template
<
typename
T
>
Print
&
operator
<<
(
T
const
&
value
)
{
buffer_
<<
value
;
buffer_
<<
value
;
return
*
this
;
return
*
this
;
}
}
private:
private:
void
print
(
LogLevel
level
)
{
void
print
(
LogLevel
level
)
{
buffer_
<<
std
::
endl
;
buffer_
<<
std
::
endl
;
if
(
level
==
kLOG_ERROR
)
{
if
(
level
==
kLOG_ERROR
)
{
...
@@ -76,14 +77,15 @@ struct ToLog {
...
@@ -76,14 +77,15 @@ struct ToLog {
printer_
<<
logs
[
level
]
<<
" "
<<
info
<<
":"
<<
std
::
string
(
blanks
,
' '
);
printer_
<<
logs
[
level
]
<<
" "
<<
info
<<
":"
<<
std
::
string
(
blanks
,
' '
);
}
}
template
<
typename
T
>
ToLog
&
operator
<<
(
T
const
&
value
)
{
template
<
typename
T
>
ToLog
&
operator
<<
(
T
const
&
value
)
{
printer_
<<
value
;
printer_
<<
value
;
return
*
this
;
return
*
this
;
}
}
~
ToLog
()
{
printer_
.
print
(
level_
);
}
~
ToLog
()
{
printer_
.
print
(
level_
);
}
private:
private:
LogLevel
level_
;
LogLevel
level_
;
Print
printer_
;
Print
printer_
;
};
};
...
@@ -140,15 +142,19 @@ enum LogLevel {
...
@@ -140,15 +142,19 @@ enum LogLevel {
struct
ToLog
;
struct
ToLog
;
struct
Print
{
struct
Print
{
friend
struct
ToLog
;
friend
struct
ToLog
;
template
<
typename
T
>
Print
&
operator
<<
(
T
const
&
value
)
{}
template
<
typename
T
>
Print
&
operator
<<
(
T
const
&
value
)
{}
private:
private:
};
};
struct
ToLog
{
struct
ToLog
{
ToLog
(
LogLevel
level
)
{}
ToLog
(
LogLevel
level
)
{}
template
<
typename
T
>
ToLog
&
operator
<<
(
T
const
&
value
)
{
return
*
this
;
}
template
<
typename
T
>
ToLog
&
operator
<<
(
T
const
&
value
)
{
return
*
this
;
}
};
};
#define LOG(level) \
#define LOG(level) \
...
...
src/common/type_define.h
浏览文件 @
7cc864ea
...
@@ -17,14 +17,15 @@ SOFTWARE.
...
@@ -17,14 +17,15 @@ SOFTWARE.
==============================================================================*/
==============================================================================*/
#pragma once;
#pragma once;
#include "framework/attribute.h"
#include <map>
#include <map>
#include <string>
#include <string>
#include "framework/attribute.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
framework
{
namespace
framework
{
template
<
typename
Dtype
>
class
OperatorBase
;
template
<
typename
Dtype
>
class
OperatorBase
;
class
OpDesc
;
class
OpDesc
;
class
BlockDesc
;
class
BlockDesc
;
class
InferShapeContext
;
class
InferShapeContext
;
...
...
src/common/types.h
浏览文件 @
7cc864ea
...
@@ -24,7 +24,8 @@ enum class Precision : int { FP32 = 0 };
...
@@ -24,7 +24,8 @@ enum class Precision : int { FP32 = 0 };
//! device type
//! device type
enum
DeviceTypeEnum
{
kINVALID
=
-
1
,
kCPU
=
0
,
kFPGA
=
1
,
kGPU_MALI
=
2
};
enum
DeviceTypeEnum
{
kINVALID
=
-
1
,
kCPU
=
0
,
kFPGA
=
1
,
kGPU_MALI
=
2
};
template
<
DeviceTypeEnum
T
>
struct
DeviceType
{};
template
<
DeviceTypeEnum
T
>
struct
DeviceType
{};
typedef
DeviceType
<
kCPU
>
CPU
;
typedef
DeviceType
<
kCPU
>
CPU
;
typedef
DeviceType
<
kFPGA
>
FPGA
;
typedef
DeviceType
<
kFPGA
>
FPGA
;
...
...
src/common/variant.h
浏览文件 @
7cc864ea
...
@@ -21,9 +21,13 @@ SOFTWARE.
...
@@ -21,9 +21,13 @@ SOFTWARE.
#pragma once
#pragma once
namespace
paddle_mobile
{
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
static
const
size_t
size
=
sizeof
(
F
)
>
VariantHelper
<
Ts
...
>::
size
?
sizeof
(
F
)
?
sizeof
(
F
)
:
VariantHelper
<
Ts
...
>::
size
;
:
VariantHelper
<
Ts
...
>::
size
;
...
@@ -37,7 +41,8 @@ template <typename F, typename... Ts> struct VariantHelper {
...
@@ -37,7 +41,8 @@ template <typename F, typename... Ts> struct VariantHelper {
}
}
};
};
template
<
typename
F
>
struct
VariantHelper
<
F
>
{
template
<
typename
F
>
struct
VariantHelper
<
F
>
{
static
const
size_t
size
=
sizeof
(
F
);
static
const
size_t
size
=
sizeof
(
F
);
inline
static
void
Destroy
(
size_t
id
,
void
*
data
)
{
inline
static
void
Destroy
(
size_t
id
,
void
*
data
)
{
if
(
id
==
typeid
(
F
).
hash_code
())
{
if
(
id
==
typeid
(
F
).
hash_code
())
{
...
@@ -48,8 +53,9 @@ template <typename F> struct VariantHelper<F> {
...
@@ -48,8 +53,9 @@ template <typename F> struct VariantHelper<F> {
}
}
};
};
template
<
size_t
size
>
class
RawData
{
template
<
size_t
size
>
public:
class
RawData
{
public:
char
data
[
size
];
char
data
[
size
];
RawData
()
{}
RawData
()
{}
RawData
(
const
RawData
&
raw_data
)
{
strcpy
(
data
,
raw_data
.
data
);
}
RawData
(
const
RawData
&
raw_data
)
{
strcpy
(
data
,
raw_data
.
data
);
}
...
@@ -58,7 +64,8 @@ public:
...
@@ -58,7 +64,8 @@ public:
// }
// }
};
};
template
<
typename
...
Ts
>
struct
Variant
{
template
<
typename
...
Ts
>
struct
Variant
{
Variant
(
const
Variant
&
variant
)
{
Variant
(
const
Variant
&
variant
)
{
// std::cout << " 赋值构造函数 " << std::endl;
// std::cout << " 赋值构造函数 " << std::endl;
type_id
=
variant
.
type_id
;
type_id
=
variant
.
type_id
;
...
@@ -70,13 +77,15 @@ template <typename... Ts> struct Variant {
...
@@ -70,13 +77,15 @@ template <typename... Ts> struct Variant {
// helper::Destroy(type_id, &data);
// 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
);
helper
::
Destroy
(
type_id
,
&
data
);
new
(
&
data
)
T
(
std
::
forward
<
Args
>
(
args
)...);
new
(
&
data
)
T
(
std
::
forward
<
Args
>
(
args
)...);
type_id
=
typeid
(
T
).
hash_code
();
type_id
=
typeid
(
T
).
hash_code
();
}
}
template
<
typename
T
>
T
&
Get
()
const
{
template
<
typename
T
>
T
&
Get
()
const
{
if
(
type_id
==
typeid
(
T
).
hash_code
())
{
if
(
type_id
==
typeid
(
T
).
hash_code
())
{
return
*
const_cast
<
T
*>
(
reinterpret_cast
<
const
T
*>
(
&
data
));
return
*
const_cast
<
T
*>
(
reinterpret_cast
<
const
T
*>
(
&
data
));
}
else
{
}
else
{
...
@@ -87,13 +96,16 @@ template <typename... Ts> struct Variant {
...
@@ -87,13 +96,16 @@ template <typename... Ts> struct Variant {
size_t
TypeId
()
const
{
return
type_id
;
}
size_t
TypeId
()
const
{
return
type_id
;
}
private:
private:
static
inline
size_t
invalid_type
()
{
return
typeid
(
void
).
hash_code
();
}
static
inline
size_t
invalid_type
()
{
return
typeid
(
void
).
hash_code
();
}
typedef
VariantHelper
<
Ts
...
>
helper
;
typedef
VariantHelper
<
Ts
...
>
helper
;
size_t
type_id
;
size_t
type_id
;
RawData
<
helper
::
size
>
data
;
RawData
<
helper
::
size
>
data
;
};
};
template
<
typename
T
>
struct
Vistor
{
typedef
T
type_t
;
};
template
<
typename
T
>
struct
Vistor
{
typedef
T
type_t
;
};
}
// namespace paddle_mobile
}
// namespace paddle_mobile
src/framework/attribute.cpp
浏览文件 @
7cc864ea
src/framework/attribute.h
浏览文件 @
7cc864ea
...
@@ -27,7 +27,7 @@ namespace framework {
...
@@ -27,7 +27,7 @@ namespace framework {
class
BlockDesc
;
class
BlockDesc
;
class
Attribute
{
class
Attribute
{
public:
public:
static
Attribute
GetAttrValue
(
const
proto
::
OpDesc
::
Attr
&
attr_desc
)
{
static
Attribute
GetAttrValue
(
const
proto
::
OpDesc
::
Attr
&
attr_desc
)
{
// std::cout << "begin get attr value" << std::endl;
// std::cout << "begin get attr value" << std::endl;
Attribute
attr
;
Attribute
attr
;
...
@@ -93,14 +93,18 @@ public:
...
@@ -93,14 +93,18 @@ public:
}
}
Attribute
()
{}
Attribute
()
{}
template
<
typename
T
,
typename
...
Args
>
Attribute
&
Set
(
Args
&&
...
args
)
{
template
<
typename
T
,
typename
...
Args
>
Attribute
&
Set
(
Args
&&
...
args
)
{
variant_
.
Set
<
T
>
(
args
...);
variant_
.
Set
<
T
>
(
args
...);
return
*
this
;
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
>
,
Variant
<
int
,
float
,
std
::
string
,
std
::
vector
<
int
>
,
std
::
vector
<
float
>
,
std
::
vector
<
std
::
string
>
,
bool
,
std
::
vector
<
bool
>
,
BlockDesc
*
,
std
::
vector
<
std
::
string
>
,
bool
,
std
::
vector
<
bool
>
,
BlockDesc
*
,
int64_t
>
int64_t
>
...
@@ -110,10 +114,11 @@ private:
...
@@ -110,10 +114,11 @@ private:
using
AttributeMap
=
std
::
unordered_map
<
std
::
string
,
Attribute
>
;
using
AttributeMap
=
std
::
unordered_map
<
std
::
string
,
Attribute
>
;
class
AttrReader
{
class
AttrReader
{
public:
public:
explicit
AttrReader
(
const
AttributeMap
&
attrs
)
:
attrs_
(
attrs
)
{}
explicit
AttrReader
(
const
AttributeMap
&
attrs
)
:
attrs_
(
attrs
)
{}
template
<
typename
T
>
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
// PADDLE_ENFORCE(attrs_.count(name) != 0, "%s should
// be in
// be in
// AttributeMap",
// AttributeMap",
...
@@ -121,7 +126,7 @@ public:
...
@@ -121,7 +126,7 @@ public:
return
((
Attribute
)
attrs_
.
at
(
name
)).
Get
<
T
>
();
return
((
Attribute
)
attrs_
.
at
(
name
)).
Get
<
T
>
();
}
}
private:
private:
const
AttributeMap
&
attrs_
;
const
AttributeMap
&
attrs_
;
};
};
...
...
src/framework/block_desc.cpp
浏览文件 @
7cc864ea
src/framework/block_desc.h
浏览文件 @
7cc864ea
...
@@ -27,7 +27,7 @@ namespace paddle_mobile {
...
@@ -27,7 +27,7 @@ namespace paddle_mobile {
namespace
framework
{
namespace
framework
{
class
BlockDesc
:
PaddleMobileObject
{
class
BlockDesc
:
PaddleMobileObject
{
public:
public:
BlockDesc
(
const
proto
::
BlockDesc
&
desc
);
BlockDesc
(
const
proto
::
BlockDesc
&
desc
);
const
int
&
ID
()
const
{
return
desc_
.
idx
();
}
const
int
&
ID
()
const
{
return
desc_
.
idx
();
}
...
@@ -45,7 +45,7 @@ public:
...
@@ -45,7 +45,7 @@ public:
std
::
vector
<
std
::
shared_ptr
<
VarDesc
>>
Vars
()
const
;
std
::
vector
<
std
::
shared_ptr
<
VarDesc
>>
Vars
()
const
;
std
::
vector
<
std
::
shared_ptr
<
OpDesc
>>
Ops
()
const
;
std
::
vector
<
std
::
shared_ptr
<
OpDesc
>>
Ops
()
const
;
private:
private:
proto
::
BlockDesc
desc_
;
proto
::
BlockDesc
desc_
;
std
::
vector
<
std
::
shared_ptr
<
OpDesc
>>
ops_
;
std
::
vector
<
std
::
shared_ptr
<
OpDesc
>>
ops_
;
std
::
unordered_map
<
std
::
string
,
std
::
shared_ptr
<
VarDesc
>>
vars_
;
std
::
unordered_map
<
std
::
string
,
std
::
shared_ptr
<
VarDesc
>>
vars_
;
...
@@ -56,7 +56,8 @@ private:
...
@@ -56,7 +56,8 @@ private:
namespace
std
{
namespace
std
{
template
<
>
struct
hash
<
paddle_mobile
::
framework
::
BlockDesc
>
{
template
<
>
struct
hash
<
paddle_mobile
::
framework
::
BlockDesc
>
{
typedef
paddle_mobile
::
framework
::
BlockDesc
argument_type
;
typedef
paddle_mobile
::
framework
::
BlockDesc
argument_type
;
typedef
std
::
size_t
result_type
;
typedef
std
::
size_t
result_type
;
result_type
operator
()(
argument_type
const
&
s
)
const
noexcept
{
result_type
operator
()(
argument_type
const
&
s
)
const
noexcept
{
...
...
src/framework/data_layout.h
浏览文件 @
7cc864ea
src/framework/data_transform.cpp
浏览文件 @
7cc864ea
src/framework/data_transform.h
浏览文件 @
7cc864ea
src/framework/data_type.h
浏览文件 @
7cc864ea
src/framework/ddim.cc
浏览文件 @
7cc864ea
...
@@ -19,11 +19,15 @@ namespace framework {
...
@@ -19,11 +19,15 @@ namespace framework {
/// @cond HIDDEN
/// @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
));
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
)
{
switch
(
n
)
{
...
@@ -90,24 +94,28 @@ DDim make_ddim(const std::vector<int> &dims) {
...
@@ -90,24 +94,28 @@ DDim make_ddim(const std::vector<int> &dims) {
// XXX For some reason, putting this in an anonymous namespace causes
// XXX For some reason, putting this in an anonymous namespace causes
// errors
// errors
struct
DynamicMutableIndexer
:
Vistor
<
int64_t
&>
{
struct
DynamicMutableIndexer
:
Vistor
<
int64_t
&>
{
public:
public:
explicit
DynamicMutableIndexer
(
int
idx
)
:
idx_
(
idx
)
{}
explicit
DynamicMutableIndexer
(
int
idx
)
:
idx_
(
idx
)
{}
template
<
int
D
>
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_
;
int
idx_
;
};
};
struct
DynamicConstIndexer
:
public
Vistor
<
int64_t
>
{
struct
DynamicConstIndexer
:
public
Vistor
<
int64_t
>
{
public:
public:
explicit
DynamicConstIndexer
(
int
idx
)
:
idx_
(
idx
)
{}
explicit
DynamicConstIndexer
(
int
idx
)
:
idx_
(
idx
)
{}
template
<
int
D
>
int64_t
operator
()(
const
Dim
<
D
>
&
dim
)
const
{
template
<
int
D
>
int64_t
operator
()(
const
Dim
<
D
>
&
dim
)
const
{
return
dim
[
idx_
];
return
dim
[
idx_
];
}
}
private:
private:
int
idx_
;
int
idx_
;
};
};
...
@@ -182,7 +190,8 @@ struct VectorizeVisitor : Vistor<void> {
...
@@ -182,7 +190,8 @@ struct VectorizeVisitor : Vistor<void> {
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
);
vector
.
push_back
(
t
.
head
);
this
->
operator
()(
t
.
tail
);
this
->
operator
()(
t
.
tail
);
}
}
...
@@ -207,7 +216,8 @@ std::vector<int> vectorize2int(const DDim &ddim) {
...
@@ -207,7 +216,8 @@ std::vector<int> vectorize2int(const DDim &ddim) {
}
}
struct
ProductVisitor
:
Vistor
<
int64_t
>
{
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
);
return
product
(
dim
);
}
}
};
};
...
@@ -233,7 +243,8 @@ struct SliceVectorizeVisitor : Vistor<void> {
...
@@ -233,7 +243,8 @@ struct SliceVectorizeVisitor : Vistor<void> {
// ddim slice.");
// ddim slice.");
}
}
template
<
int
S
>
void
operator
()(
const
Dim
<
S
>
&
dim
)
{
template
<
int
S
>
void
operator
()(
const
Dim
<
S
>
&
dim
)
{
if
(
begin
==
0
)
{
if
(
begin
==
0
)
{
vector
.
push_back
(
dim
.
head
);
vector
.
push_back
(
dim
.
head
);
}
else
{
}
else
{
...
@@ -264,7 +275,10 @@ DDim slice_ddim(const DDim &ddim, int begin, int end) {
...
@@ -264,7 +275,10 @@ DDim slice_ddim(const DDim &ddim, int begin, int end) {
/// \cond HIDDEN
/// \cond HIDDEN
struct
ArityVisitor
:
Vistor
<
int
>
{
struct
ArityVisitor
:
Vistor
<
int
>
{
template
<
int
D
>
int
operator
()(
Dim
<
D
>
)
const
{
return
D
;
}
template
<
int
D
>
int
operator
()(
Dim
<
D
>
)
const
{
return
D
;
}
};
};
/// \endcond
/// \endcond
...
@@ -282,11 +296,12 @@ int arity(const DDim &d) {
...
@@ -282,11 +296,12 @@ int arity(const DDim &d) {
struct
OSVistor
:
Vistor
<
std
::
ostream
&>
{
struct
OSVistor
:
Vistor
<
std
::
ostream
&>
{
OSVistor
(
std
::
ostream
&
os
)
:
os_
(
os
)
{}
OSVistor
(
std
::
ostream
&
os
)
:
os_
(
os
)
{}
template
<
int
D
>
std
::
ostream
&
operator
()(
Dim
<
D
>
dim
)
const
{
template
<
int
D
>
std
::
ostream
&
operator
()(
Dim
<
D
>
dim
)
const
{
return
os_
<<
dim
;
return
os_
<<
dim
;
}
}
private:
private:
std
::
ostream
&
os_
;
std
::
ostream
&
os_
;
};
};
...
...
src/framework/ddim.h
浏览文件 @
7cc864ea
...
@@ -14,12 +14,12 @@ limitations under the License. */
...
@@ -14,12 +14,12 @@ limitations under the License. */
#pragma once
#pragma once
#include "common/variant.h"
#include "dim.h"
#include <assert.h>
#include <assert.h>
#include <initializer_list>
#include <initializer_list>
#include <stdexcept>
#include <stdexcept>
#include <vector>
#include <vector>
#include "common/variant.h"
#include "dim.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
framework
{
namespace
framework
{
...
@@ -66,11 +66,15 @@ struct DDim {
...
@@ -66,11 +66,15 @@ struct DDim {
DDim
()
{
var
.
Set
<
Dim
<
1
>>
(
Dim
<
1
>
());
}
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
);
/*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
);
var
.
Set
<
Dim
<
D
>>
(
in
);
return
*
this
;
return
*
this
;
}
}
...
...
src/framework/dim.h
浏览文件 @
7cc864ea
...
@@ -24,7 +24,8 @@ namespace paddle_mobile {
...
@@ -24,7 +24,8 @@ namespace paddle_mobile {
namespace
framework
{
namespace
framework
{
// Statically sized, statically indexed dimension
// Statically sized, statically indexed dimension
template
<
int
i
>
struct
Dim
{
template
<
int
i
>
struct
Dim
{
static
constexpr
int
dimensions
=
i
;
static
constexpr
int
dimensions
=
i
;
template
<
typename
...
Args
>
template
<
typename
...
Args
>
...
@@ -70,7 +71,8 @@ template <int i> struct Dim {
...
@@ -70,7 +71,8 @@ template <int i> struct Dim {
};
};
// Base case specialization
// Base case specialization
template
<
>
struct
Dim
<
0
>
{
template
<
>
struct
Dim
<
0
>
{
static
constexpr
int
dimensions
=
0
;
static
constexpr
int
dimensions
=
0
;
HOSTDEVICE
HOSTDEVICE
...
@@ -105,28 +107,37 @@ template <> struct Dim<0> {
...
@@ -105,28 +107,37 @@ template <> struct Dim<0> {
namespace
{
namespace
{
// Helper for accessing Dim classes
// Helper for accessing Dim classes
template
<
int
i
>
struct
DimGetter
{
template
<
int
i
>
struct
DimGetter
{
// Return a copy if Dim is const
// 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
DimGetter
<
i
-
1
>::
impl
(
d
.
tail
);
}
}
// Return a reference if Dim is mutable
// 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
);
return
DimGetter
<
i
-
1
>::
impl
(
d
.
tail
);
}
}
};
};
// Eureka! We found the element!
// Eureka! We found the element!
template
<
>
struct
DimGetter
<
0
>
{
template
<
>
struct
DimGetter
<
0
>
{
// Return a copy if Dim is const
// 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
d
.
head
;
}
}
// Return a reference if Dim is mutable
// 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__
#ifndef __CUDA_ARCH__
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
throw
std
::
invalid_argument
(
"Tried to access a negative dimension"
);
throw
std
::
invalid_argument
(
"Tried to access a negative dimension"
);
...
@@ -140,7 +151,8 @@ template <int D> HOSTDEVICE int64_t &indexer(Dim<D> &dim, int idx) {
...
@@ -140,7 +151,8 @@ template <int D> HOSTDEVICE int64_t &indexer(Dim<D> &dim, int idx) {
return
indexer
(
dim
.
tail
,
idx
-
1
);
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__
#ifndef __CUDA_ARCH__
throw
std
::
invalid_argument
(
"Invalid index"
);
throw
std
::
invalid_argument
(
"Invalid index"
);
#else
#else
...
@@ -156,7 +168,8 @@ template <> HOSTDEVICE int64_t &indexer<0>(Dim<0> &dim, int idx) {
...
@@ -156,7 +168,8 @@ template <> HOSTDEVICE int64_t &indexer<0>(Dim<0> &dim, int idx) {
#endif
#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__
#ifndef __CUDA_ARCH__
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
throw
std
::
invalid_argument
(
"Tried to access a negative dimension"
);
throw
std
::
invalid_argument
(
"Tried to access a negative dimension"
);
...
@@ -170,7 +183,8 @@ template <int D> HOSTDEVICE int64_t indexer(const Dim<D> &dim, int idx) {
...
@@ -170,7 +183,8 @@ template <int D> HOSTDEVICE int64_t indexer(const Dim<D> &dim, int idx) {
return
indexer
(
dim
.
tail
,
idx
-
1
);
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__
#ifndef __CUDA_ARCH__
throw
std
::
invalid_argument
(
"Invalid index"
);
throw
std
::
invalid_argument
(
"Invalid index"
);
#else
#else
...
@@ -188,23 +202,27 @@ template <> HOSTDEVICE int64_t indexer<0>(const Dim<0> &dim, int idx) {
...
@@ -188,23 +202,27 @@ template <> HOSTDEVICE int64_t indexer<0>(const Dim<0> &dim, int idx) {
}
// namespace
}
// namespace
// Static access to constant Dim
// Static access to constant Dim
template
<
int
i
,
int
l
>
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
);
return
DimGetter
<
i
>::
impl
(
d
);
}
}
// Static access to mutable Dim
// 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
);
return
DimGetter
<
i
>::
impl
(
d
);
}
}
// Dynamic access to constant Dim
// 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;
// std::cout << "l: " << l << std::endl;
return
indexer
(
*
this
,
i
);
return
indexer
(
*
this
,
i
);
}
}
// Dynamic access to mutable Dim
// Dynamic access to mutable Dim
template
<
int
l
>
HOSTDEVICE
int64_t
&
Dim
<
l
>::
operator
[](
int
i
)
{
template
<
int
l
>
HOSTDEVICE
int64_t
&
Dim
<
l
>::
operator
[](
int
i
)
{
return
indexer
(
*
this
,
i
);
return
indexer
(
*
this
,
i
);
}
}
...
@@ -247,13 +265,15 @@ HOSTDEVICE inline int64_t linearize(const Dim<0> &a, const Dim<0> &b) {
...
@@ -247,13 +265,15 @@ HOSTDEVICE inline int64_t linearize(const Dim<0> &a, const Dim<0> &b) {
}
}
// Product of a Dim
// 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
);
return
prod
*
a
.
head
*
product
(
a
.
tail
);
}
}
// Base case product of a Dim
// Base case product of a Dim
// Notice it is inline because it is no longer a template
// Notice it is inline because it is no longer a template
template
<
>
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
;
return
prod
;
}
}
...
@@ -282,7 +302,8 @@ HOSTDEVICE Dim<i> ex_prefix_mul(const Dim<i> &src, int mul = 1) {
...
@@ -282,7 +302,8 @@ HOSTDEVICE Dim<i> ex_prefix_mul(const Dim<i> &src, int mul = 1) {
///\cond HIDDEN
///\cond HIDDEN
// Base case of ex_prefix_mul
// Base case of ex_prefix_mul
// Notice it is inline because it is no longer a template
// Notice it is inline because it is no longer a template
template
<
>
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
>
();
return
Dim
<
0
>
();
}
}
///\endcond
///\endcond
...
@@ -290,7 +311,8 @@ template <> HOSTDEVICE inline Dim<0> ex_prefix_mul(const Dim<0> &src, int mul) {
...
@@ -290,7 +311,8 @@ template <> HOSTDEVICE inline Dim<0> ex_prefix_mul(const Dim<0> &src, int mul) {
/**
/**
* Add two dimensions together
* 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
));
return
Dim
<
i
>
(
a
.
head
+
b
.
head
,
dim_plus
(
a
.
tail
,
b
.
tail
));
}
}
...
@@ -308,7 +330,8 @@ HOSTDEVICE Dim<i> operator+(const Dim<i> &lhs, const Dim<i> &rhs) {
...
@@ -308,7 +330,8 @@ HOSTDEVICE Dim<i> operator+(const Dim<i> &lhs, const Dim<i> &rhs) {
/**
/**
* Multiply two dimensions together
* 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
));
return
Dim
<
i
>
(
a
.
head
*
b
.
head
,
dim_mult
(
a
.
tail
,
b
.
tail
));
}
}
...
@@ -365,8 +388,8 @@ HOSTDEVICE Dim<sizeof...(Args)> make_dim(Args... idxes) {
...
@@ -365,8 +388,8 @@ HOSTDEVICE Dim<sizeof...(Args)> make_dim(Args... idxes) {
// Allows us to output a Dim
// Allows us to output a Dim
// XXX For some reason, overloading fails to resolve this correctly
// XXX For some reason, overloading fails to resolve this correctly
template
<
int
i
>
template
<
int
i
>
typename
std
::
enable_if
<
(
i
>
1
),
std
::
ostream
&>::
type
typename
std
::
enable_if
<
(
i
>
1
),
std
::
ostream
&>::
type
operator
<<
(
operator
<<
(
std
::
ostream
&
os
,
const
Dim
<
i
>
&
d
)
{
std
::
ostream
&
os
,
const
Dim
<
i
>
&
d
)
{
os
<<
d
.
head
<<
", "
<<
d
.
tail
;
os
<<
d
.
head
<<
", "
<<
d
.
tail
;
return
os
;
return
os
;
}
}
...
@@ -374,8 +397,8 @@ operator<<(std::ostream &os, const Dim<i> &d) {
...
@@ -374,8 +397,8 @@ operator<<(std::ostream &os, const Dim<i> &d) {
// Base case that allows us to output a Dim
// Base case that allows us to output a Dim
// XXX I wish this could be an overload instead of a template
// XXX I wish this could be an overload instead of a template
template
<
int
i
>
template
<
int
i
>
typename
std
::
enable_if
<
(
i
==
1
),
std
::
ostream
&>::
type
typename
std
::
enable_if
<
(
i
==
1
),
std
::
ostream
&>::
type
operator
<<
(
operator
<<
(
std
::
ostream
&
os
,
const
Dim
<
i
>
&
d
)
{
std
::
ostream
&
os
,
const
Dim
<
i
>
&
d
)
{
os
<<
d
.
head
;
os
<<
d
.
head
;
return
os
;
return
os
;
}
}
...
@@ -384,7 +407,8 @@ inline std::ostream &operator<<(std::ostream &os, const Dim<0> &d) {
...
@@ -384,7 +407,8 @@ inline std::ostream &operator<<(std::ostream &os, const Dim<0> &d) {
return
os
;
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
;
std
::
stringstream
stream
;
stream
<<
*
this
;
stream
<<
*
this
;
...
...
src/framework/executor.cpp
浏览文件 @
7cc864ea
src/framework/executor.h
浏览文件 @
7cc864ea
...
@@ -34,15 +34,16 @@ SOFTWARE.
...
@@ -34,15 +34,16 @@ SOFTWARE.
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
framework
{
namespace
framework
{
template
<
typename
Dtype
>
class
Executor
{
template
<
typename
Dtype
>
public:
class
Executor
{
public:
Executor
();
Executor
();
Executor
(
const
Program
<
Dtype
>
p
);
Executor
(
const
Program
<
Dtype
>
p
);
std
::
shared_ptr
<
Tensor
>
predict
(
Tensor
&
t
);
std
::
shared_ptr
<
Tensor
>
predict
(
Tensor
&
t
);
public:
public:
const
framework
::
Program
<
Dtype
>
program_
;
const
framework
::
Program
<
Dtype
>
program_
;
std
::
shared_ptr
<
ProgramDesc
>
to_predict_program_
;
std
::
shared_ptr
<
ProgramDesc
>
to_predict_program_
;
...
...
src/framework/framework.pb.cpp
浏览文件 @
7cc864ea
...
@@ -18,73 +18,73 @@ namespace paddle_mobile {
...
@@ -18,73 +18,73 @@ namespace paddle_mobile {
namespace
framework
{
namespace
framework
{
namespace
proto
{
namespace
proto
{
class
OpDesc_AttrDefaultTypeInternal
{
class
OpDesc_AttrDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
OpDesc_Attr
>
_instance
;
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
OpDesc_Attr
>
_instance
;
}
_OpDesc_Attr_default_instance_
;
}
_OpDesc_Attr_default_instance_
;
class
OpDesc_VarDefaultTypeInternal
{
class
OpDesc_VarDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
OpDesc_Var
>
_instance
;
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
OpDesc_Var
>
_instance
;
}
_OpDesc_Var_default_instance_
;
}
_OpDesc_Var_default_instance_
;
class
OpDescDefaultTypeInternal
{
class
OpDescDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
OpDesc
>
_instance
;
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
OpDesc
>
_instance
;
}
_OpDesc_default_instance_
;
}
_OpDesc_default_instance_
;
class
OpProto_VarDefaultTypeInternal
{
class
OpProto_VarDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
OpProto_Var
>
_instance
;
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
OpProto_Var
>
_instance
;
}
_OpProto_Var_default_instance_
;
}
_OpProto_Var_default_instance_
;
class
OpProto_AttrDefaultTypeInternal
{
class
OpProto_AttrDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
OpProto_Attr
>
_instance
;
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
OpProto_Attr
>
_instance
;
}
_OpProto_Attr_default_instance_
;
}
_OpProto_Attr_default_instance_
;
class
OpProtoDefaultTypeInternal
{
class
OpProtoDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
OpProto
>
_instance
;
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
OpProto
>
_instance
;
}
_OpProto_default_instance_
;
}
_OpProto_default_instance_
;
class
VarType_TensorDescDefaultTypeInternal
{
class
VarType_TensorDescDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarType_TensorDesc
>
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarType_TensorDesc
>
_instance
;
_instance
;
}
_VarType_TensorDesc_default_instance_
;
}
_VarType_TensorDesc_default_instance_
;
class
VarType_LoDTensorDescDefaultTypeInternal
{
class
VarType_LoDTensorDescDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarType_LoDTensorDesc
>
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarType_LoDTensorDesc
>
_instance
;
_instance
;
}
_VarType_LoDTensorDesc_default_instance_
;
}
_VarType_LoDTensorDesc_default_instance_
;
class
VarType_LoDTensorArrayDescDefaultTypeInternal
{
class
VarType_LoDTensorArrayDescDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarType_LoDTensorArrayDesc
>
VarType_LoDTensorArrayDesc
>
_instance
;
_instance
;
}
_VarType_LoDTensorArrayDesc_default_instance_
;
}
_VarType_LoDTensorArrayDesc_default_instance_
;
class
VarType_ReaderDescDefaultTypeInternal
{
class
VarType_ReaderDescDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarType_ReaderDesc
>
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarType_ReaderDesc
>
_instance
;
_instance
;
}
_VarType_ReaderDesc_default_instance_
;
}
_VarType_ReaderDesc_default_instance_
;
class
VarType_ChannelDescDefaultTypeInternal
{
class
VarType_ChannelDescDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarType_ChannelDesc
>
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarType_ChannelDesc
>
_instance
;
_instance
;
}
_VarType_ChannelDesc_default_instance_
;
}
_VarType_ChannelDesc_default_instance_
;
class
VarType_TupleDefaultTypeInternal
{
class
VarType_TupleDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarType_Tuple
>
_instance
;
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarType_Tuple
>
_instance
;
}
_VarType_Tuple_default_instance_
;
}
_VarType_Tuple_default_instance_
;
class
VarTypeDefaultTypeInternal
{
class
VarTypeDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarType
>
_instance
;
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarType
>
_instance
;
}
_VarType_default_instance_
;
}
_VarType_default_instance_
;
class
VarDescDefaultTypeInternal
{
class
VarDescDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarDesc
>
_instance
;
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
VarDesc
>
_instance
;
}
_VarDesc_default_instance_
;
}
_VarDesc_default_instance_
;
class
BlockDescDefaultTypeInternal
{
class
BlockDescDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
BlockDesc
>
_instance
;
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
BlockDesc
>
_instance
;
}
_BlockDesc_default_instance_
;
}
_BlockDesc_default_instance_
;
class
ProgramDescDefaultTypeInternal
{
class
ProgramDescDefaultTypeInternal
{
public:
public:
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
ProgramDesc
>
_instance
;
::
google
::
protobuf
::
internal
::
ExplicitlyConstructed
<
ProgramDesc
>
_instance
;
}
_ProgramDesc_default_instance_
;
}
_ProgramDesc_default_instance_
;
...
@@ -321,9 +321,14 @@ OpDesc_Attr::OpDesc_Attr()
...
@@ -321,9 +321,14 @@ OpDesc_Attr::OpDesc_Attr()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc.Attr)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc.Attr)
}
}
OpDesc_Attr
::
OpDesc_Attr
(
const
OpDesc_Attr
&
from
)
OpDesc_Attr
::
OpDesc_Attr
(
const
OpDesc_Attr
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
ints_
(
from
.
ints_
),
_internal_metadata_
(
NULL
),
floats_
(
from
.
floats_
),
strings_
(
from
.
strings_
),
bools_
(
from
.
bools_
)
{
_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_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
name_
.
UnsafeSetDefault
(
name_
.
UnsafeSetDefault
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
...
@@ -423,8 +428,7 @@ void OpDesc_Attr::Clear() {
...
@@ -423,8 +428,7 @@ void OpDesc_Attr::Clear() {
bool
OpDesc_Attr
::
MergePartialFromCodedStream
(
bool
OpDesc_Attr
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -438,8 +442,7 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
...
@@ -438,8 +442,7 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// required string name = 1;
// required string name = 1;
...
@@ -464,8 +467,8 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
...
@@ -464,8 +467,8 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
int
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_ENUM
>
(
int
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_ENUM
>
(
input
,
&
value
)));
input
,
&
value
)));
if
(
::
paddle_mobile
::
framework
::
proto
::
AttrType_IsValid
(
value
))
{
if
(
::
paddle_mobile
::
framework
::
proto
::
AttrType_IsValid
(
value
))
{
set_type
(
set_type
(
static_cast
<::
paddle_mobile
::
framework
::
proto
::
AttrType
>
(
static_cast
<::
paddle_mobile
::
framework
::
proto
::
AttrType
>
(
value
));
value
));
}
else
{
}
else
{
unknown_fields_stream
.
WriteVarint32
(
16u
);
unknown_fields_stream
.
WriteVarint32
(
16u
);
unknown_fields_stream
.
WriteVarint32
(
unknown_fields_stream
.
WriteVarint32
(
...
@@ -523,13 +526,16 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
...
@@ -523,13 +526,16 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
48u
/* 48 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
48u
/* 48 & 0xFF */
))
{
DO_
((
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadRepeatedPrimitive
<
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadRepeatedPrimitive
<
::
google
::
protobuf
::
int32
,
::
google
::
protobuf
::
int32
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_INT32
>
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_INT32
>
(
1
,
48u
,
input
,
this
->
mutable_ints
())));
1
,
48u
,
input
,
this
->
mutable_ints
())));
}
else
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
}
else
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
50u
/* 50 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
50u
/* 50 & 0xFF */
))
{
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadPackedPrimitiveNoInline
<
ReadPackedPrimitiveNoInline
<
::
google
::
protobuf
::
int32
,
::
google
::
protobuf
::
int32
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_INT32
>
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_INT32
>
(
...
@@ -545,13 +551,16 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
...
@@ -545,13 +551,16 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
61u
/* 61 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
61u
/* 61 & 0xFF */
))
{
DO_
((
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadRepeatedPrimitive
<
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadRepeatedPrimitive
<
float
,
float
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_FLOAT
>
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_FLOAT
>
(
1
,
61u
,
input
,
this
->
mutable_floats
())));
1
,
61u
,
input
,
this
->
mutable_floats
())));
}
else
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
}
else
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
58u
/* 58 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
58u
/* 58 & 0xFF */
))
{
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadPackedPrimitiveNoInline
<
ReadPackedPrimitiveNoInline
<
float
,
float
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_FLOAT
>
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_FLOAT
>
(
...
@@ -592,12 +601,14 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
...
@@ -592,12 +601,14 @@ bool OpDesc_Attr::MergePartialFromCodedStream(
case
11
:
{
case
11
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
88u
/* 88 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
88u
/* 88 & 0xFF */
))
{
DO_
((
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadRepeatedPrimitive
<
ReadRepeatedPrimitive
<
bool
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_BOOL
>
(
bool
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_BOOL
>
(
1
,
88u
,
input
,
this
->
mutable_bools
())));
1
,
88u
,
input
,
this
->
mutable_bools
())));
}
else
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
}
else
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
90u
/* 90 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
90u
/* 90 & 0xFF */
))
{
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadPackedPrimitiveNoInline
<
ReadPackedPrimitiveNoInline
<
bool
,
bool
,
...
@@ -914,21 +925,18 @@ void OpDesc_Attr::MergeFrom(const OpDesc_Attr &from) {
...
@@ -914,21 +925,18 @@ void OpDesc_Attr::MergeFrom(const OpDesc_Attr &from) {
void
OpDesc_Attr
::
CopyFrom
(
const
OpDesc_Attr
&
from
)
{
void
OpDesc_Attr
::
CopyFrom
(
const
OpDesc_Attr
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpDesc.Attr)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpDesc.Attr)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
bool
OpDesc_Attr
::
IsInitialized
()
const
{
bool
OpDesc_Attr
::
IsInitialized
()
const
{
if
((
_has_bits_
[
0
]
&
0x00000005
)
!=
0x00000005
)
if
((
_has_bits_
[
0
]
&
0x00000005
)
!=
0x00000005
)
return
false
;
return
false
;
return
true
;
return
true
;
}
}
void
OpDesc_Attr
::
Swap
(
OpDesc_Attr
*
other
)
{
void
OpDesc_Attr
::
Swap
(
OpDesc_Attr
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
OpDesc_Attr
::
InternalSwap
(
OpDesc_Attr
*
other
)
{
void
OpDesc_Attr
::
InternalSwap
(
OpDesc_Attr
*
other
)
{
...
@@ -1157,13 +1165,13 @@ void OpDesc_Attr::add_ints(::google::protobuf::int32 value) {
...
@@ -1157,13 +1165,13 @@ void OpDesc_Attr::add_ints(::google::protobuf::int32 value) {
ints_
.
Add
(
value
);
ints_
.
Add
(
value
);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.ints)
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.ints)
}
}
const
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int32
>
&
const
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int32
>
OpDesc_Attr
::
ints
()
const
{
&
OpDesc_Attr
::
ints
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.ints)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.ints)
return
ints_
;
return
ints_
;
}
}
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int32
>
*
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int32
>
OpDesc_Attr
::
mutable_ints
()
{
*
OpDesc_Attr
::
mutable_ints
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.ints)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.ints)
return
&
ints_
;
return
&
ints_
;
}
}
...
@@ -1245,13 +1253,13 @@ void OpDesc_Attr::add_strings(const char *value, size_t size) {
...
@@ -1245,13 +1253,13 @@ void OpDesc_Attr::add_strings(const char *value, size_t size) {
strings_
.
Add
()
->
assign
(
reinterpret_cast
<
const
char
*>
(
value
),
size
);
strings_
.
Add
()
->
assign
(
reinterpret_cast
<
const
char
*>
(
value
),
size
);
// @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Attr.strings)
// @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Attr.strings)
}
}
const
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
&
const
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
OpDesc_Attr
::
strings
()
const
{
&
OpDesc_Attr
::
strings
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.strings)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return
strings_
;
return
strings_
;
}
}
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
*
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
OpDesc_Attr
::
mutable_strings
()
{
*
OpDesc_Attr
::
mutable_strings
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.strings)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return
&
strings_
;
return
&
strings_
;
}
}
...
@@ -1354,8 +1362,10 @@ OpDesc_Var::OpDesc_Var()
...
@@ -1354,8 +1362,10 @@ OpDesc_Var::OpDesc_Var()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc.Var)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc.Var)
}
}
OpDesc_Var
::
OpDesc_Var
(
const
OpDesc_Var
&
from
)
OpDesc_Var
::
OpDesc_Var
(
const
OpDesc_Var
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
_internal_metadata_
(
NULL
),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
arguments_
(
from
.
arguments_
)
{
arguments_
(
from
.
arguments_
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
parameter_
.
UnsafeSetDefault
(
parameter_
.
UnsafeSetDefault
(
...
@@ -1421,8 +1431,7 @@ void OpDesc_Var::Clear() {
...
@@ -1421,8 +1431,7 @@ void OpDesc_Var::Clear() {
bool
OpDesc_Var
::
MergePartialFromCodedStream
(
bool
OpDesc_Var
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -1436,8 +1445,7 @@ bool OpDesc_Var::MergePartialFromCodedStream(
...
@@ -1436,8 +1445,7 @@ bool OpDesc_Var::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// required string parameter = 1;
// required string parameter = 1;
...
@@ -1558,21 +1566,18 @@ void OpDesc_Var::MergeFrom(const OpDesc_Var &from) {
...
@@ -1558,21 +1566,18 @@ void OpDesc_Var::MergeFrom(const OpDesc_Var &from) {
void
OpDesc_Var
::
CopyFrom
(
const
OpDesc_Var
&
from
)
{
void
OpDesc_Var
::
CopyFrom
(
const
OpDesc_Var
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpDesc.Var)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpDesc.Var)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
bool
OpDesc_Var
::
IsInitialized
()
const
{
bool
OpDesc_Var
::
IsInitialized
()
const
{
if
((
_has_bits_
[
0
]
&
0x00000001
)
!=
0x00000001
)
if
((
_has_bits_
[
0
]
&
0x00000001
)
!=
0x00000001
)
return
false
;
return
false
;
return
true
;
return
true
;
}
}
void
OpDesc_Var
::
Swap
(
OpDesc_Var
*
other
)
{
void
OpDesc_Var
::
Swap
(
OpDesc_Var
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
OpDesc_Var
::
InternalSwap
(
OpDesc_Var
*
other
)
{
void
OpDesc_Var
::
InternalSwap
(
OpDesc_Var
*
other
)
{
...
@@ -1713,13 +1718,13 @@ void OpDesc_Var::add_arguments(const char *value, size_t size) {
...
@@ -1713,13 +1718,13 @@ void OpDesc_Var::add_arguments(const char *value, size_t size) {
arguments_
.
Add
()
->
assign
(
reinterpret_cast
<
const
char
*>
(
value
),
size
);
arguments_
.
Add
()
->
assign
(
reinterpret_cast
<
const
char
*>
(
value
),
size
);
// @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Var.arguments)
// @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Var.arguments)
}
}
const
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
&
const
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
OpDesc_Var
::
arguments
()
const
{
&
OpDesc_Var
::
arguments
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Var.arguments)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return
arguments_
;
return
arguments_
;
}
}
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
*
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
OpDesc_Var
::
mutable_arguments
()
{
*
OpDesc_Var
::
mutable_arguments
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Var.arguments)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return
&
arguments_
;
return
&
arguments_
;
}
}
...
@@ -1745,9 +1750,13 @@ OpDesc::OpDesc()
...
@@ -1745,9 +1750,13 @@ OpDesc::OpDesc()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpDesc)
}
}
OpDesc
::
OpDesc
(
const
OpDesc
&
from
)
OpDesc
::
OpDesc
(
const
OpDesc
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
inputs_
(
from
.
inputs_
),
_internal_metadata_
(
NULL
),
outputs_
(
from
.
outputs_
),
attrs_
(
from
.
attrs_
)
{
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
inputs_
(
from
.
inputs_
),
outputs_
(
from
.
outputs_
),
attrs_
(
from
.
attrs_
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
type_
.
UnsafeSetDefault
(
type_
.
UnsafeSetDefault
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
...
@@ -1817,8 +1826,7 @@ void OpDesc::Clear() {
...
@@ -1817,8 +1826,7 @@ void OpDesc::Clear() {
bool
OpDesc
::
MergePartialFromCodedStream
(
bool
OpDesc
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -1832,8 +1840,7 @@ bool OpDesc::MergePartialFromCodedStream(
...
@@ -1832,8 +1840,7 @@ bool OpDesc::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// repeated .paddle_mobile.framework.proto.OpDesc.Var inputs
// repeated .paddle_mobile.framework.proto.OpDesc.Var inputs
...
@@ -1841,8 +1848,8 @@ bool OpDesc::MergePartialFromCodedStream(
...
@@ -1841,8 +1848,8 @@ bool OpDesc::MergePartialFromCodedStream(
case
1
:
{
case
1
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
10u
/* 10 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
10u
/* 10 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
add_inputs
()));
ReadMessageNoVirtual
(
input
,
add_inputs
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -1854,8 +1861,8 @@ bool OpDesc::MergePartialFromCodedStream(
...
@@ -1854,8 +1861,8 @@ bool OpDesc::MergePartialFromCodedStream(
case
2
:
{
case
2
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
18u
/* 18 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
18u
/* 18 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
add_outputs
()));
ReadMessageNoVirtual
(
input
,
add_outputs
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -1879,8 +1886,8 @@ bool OpDesc::MergePartialFromCodedStream(
...
@@ -1879,8 +1886,8 @@ bool OpDesc::MergePartialFromCodedStream(
case
4
:
{
case
4
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
34u
/* 34 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
34u
/* 34 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
add_attrs
()));
ReadMessageNoVirtual
(
input
,
add_attrs
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -2061,15 +2068,13 @@ void OpDesc::MergeFrom(const OpDesc &from) {
...
@@ -2061,15 +2068,13 @@ void OpDesc::MergeFrom(const OpDesc &from) {
void
OpDesc
::
CopyFrom
(
const
OpDesc
&
from
)
{
void
OpDesc
::
CopyFrom
(
const
OpDesc
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpDesc)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpDesc)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
bool
OpDesc
::
IsInitialized
()
const
{
bool
OpDesc
::
IsInitialized
()
const
{
if
((
_has_bits_
[
0
]
&
0x00000001
)
!=
0x00000001
)
if
((
_has_bits_
[
0
]
&
0x00000001
)
!=
0x00000001
)
return
false
;
return
false
;
if
(
!::
google
::
protobuf
::
internal
::
AllAreInitialized
(
this
->
inputs
()))
if
(
!::
google
::
protobuf
::
internal
::
AllAreInitialized
(
this
->
inputs
()))
return
false
;
return
false
;
if
(
!::
google
::
protobuf
::
internal
::
AllAreInitialized
(
this
->
outputs
()))
if
(
!::
google
::
protobuf
::
internal
::
AllAreInitialized
(
this
->
outputs
()))
...
@@ -2080,8 +2085,7 @@ bool OpDesc::IsInitialized() const {
...
@@ -2080,8 +2085,7 @@ bool OpDesc::IsInitialized() const {
}
}
void
OpDesc
::
Swap
(
OpDesc
*
other
)
{
void
OpDesc
::
Swap
(
OpDesc
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
OpDesc
::
InternalSwap
(
OpDesc
*
other
)
{
void
OpDesc
::
InternalSwap
(
OpDesc
*
other
)
{
...
@@ -2169,13 +2173,13 @@ void OpDesc::set_allocated_type(::std::string *type) {
...
@@ -2169,13 +2173,13 @@ void OpDesc::set_allocated_type(::std::string *type) {
// repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1;
// repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1;
int
OpDesc
::
inputs_size
()
const
{
return
inputs_
.
size
();
}
int
OpDesc
::
inputs_size
()
const
{
return
inputs_
.
size
();
}
void
OpDesc
::
clear_inputs
()
{
inputs_
.
Clear
();
}
void
OpDesc
::
clear_inputs
()
{
inputs_
.
Clear
();
}
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
&
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
&
OpDesc
::
inputs
(
OpDesc
::
inputs
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.inputs)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.inputs)
return
inputs_
.
Get
(
index
);
return
inputs_
.
Get
(
index
);
}
}
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
OpDesc
::
mutable_inputs
(
OpDesc
::
mutable_inputs
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.inputs)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.inputs)
return
inputs_
.
Mutable
(
index
);
return
inputs_
.
Mutable
(
index
);
}
}
...
@@ -2184,14 +2188,14 @@ OpDesc::mutable_inputs(int index) {
...
@@ -2184,14 +2188,14 @@ OpDesc::mutable_inputs(int index) {
return
inputs_
.
Add
();
return
inputs_
.
Add
();
}
}
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
OpDesc
::
mutable_inputs
()
{
*
OpDesc
::
mutable_inputs
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.inputs)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.inputs)
return
&
inputs_
;
return
&
inputs_
;
}
}
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
&
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
OpDesc
::
inputs
()
const
{
&
OpDesc
::
inputs
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.inputs)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.inputs)
return
inputs_
;
return
inputs_
;
}
}
...
@@ -2199,13 +2203,13 @@ OpDesc::inputs() const {
...
@@ -2199,13 +2203,13 @@ OpDesc::inputs() const {
// repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2;
// repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2;
int
OpDesc
::
outputs_size
()
const
{
return
outputs_
.
size
();
}
int
OpDesc
::
outputs_size
()
const
{
return
outputs_
.
size
();
}
void
OpDesc
::
clear_outputs
()
{
outputs_
.
Clear
();
}
void
OpDesc
::
clear_outputs
()
{
outputs_
.
Clear
();
}
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
&
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
&
OpDesc
::
outputs
(
OpDesc
::
outputs
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.outputs)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.outputs)
return
outputs_
.
Get
(
index
);
return
outputs_
.
Get
(
index
);
}
}
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
OpDesc
::
mutable_outputs
(
OpDesc
::
mutable_outputs
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.outputs)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.outputs)
return
outputs_
.
Mutable
(
index
);
return
outputs_
.
Mutable
(
index
);
}
}
...
@@ -2214,14 +2218,14 @@ OpDesc::mutable_outputs(int index) {
...
@@ -2214,14 +2218,14 @@ OpDesc::mutable_outputs(int index) {
return
outputs_
.
Add
();
return
outputs_
.
Add
();
}
}
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
OpDesc
::
mutable_outputs
()
{
*
OpDesc
::
mutable_outputs
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.outputs)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.outputs)
return
&
outputs_
;
return
&
outputs_
;
}
}
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
&
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
OpDesc
::
outputs
()
const
{
&
OpDesc
::
outputs
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.outputs)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.outputs)
return
outputs_
;
return
outputs_
;
}
}
...
@@ -2229,13 +2233,13 @@ OpDesc::outputs() const {
...
@@ -2229,13 +2233,13 @@ OpDesc::outputs() const {
// repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4;
// repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4;
int
OpDesc
::
attrs_size
()
const
{
return
attrs_
.
size
();
}
int
OpDesc
::
attrs_size
()
const
{
return
attrs_
.
size
();
}
void
OpDesc
::
clear_attrs
()
{
attrs_
.
Clear
();
}
void
OpDesc
::
clear_attrs
()
{
attrs_
.
Clear
();
}
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
&
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
&
OpDesc
::
attrs
(
OpDesc
::
attrs
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.attrs)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.attrs)
return
attrs_
.
Get
(
index
);
return
attrs_
.
Get
(
index
);
}
}
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
*
OpDesc
::
mutable_attrs
(
OpDesc
::
mutable_attrs
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.attrs)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.attrs)
return
attrs_
.
Mutable
(
index
);
return
attrs_
.
Mutable
(
index
);
}
}
...
@@ -2244,14 +2248,14 @@ OpDesc::mutable_attrs(int index) {
...
@@ -2244,14 +2248,14 @@ OpDesc::mutable_attrs(int index) {
return
attrs_
.
Add
();
return
attrs_
.
Add
();
}
}
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
>
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
>
OpDesc
::
mutable_attrs
()
{
*
OpDesc
::
mutable_attrs
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.attrs)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.attrs)
return
&
attrs_
;
return
&
attrs_
;
}
}
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
>
&
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
>
OpDesc
::
attrs
()
const
{
&
OpDesc
::
attrs
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.attrs)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.attrs)
return
attrs_
;
return
attrs_
;
}
}
...
@@ -2297,8 +2301,10 @@ OpProto_Var::OpProto_Var()
...
@@ -2297,8 +2301,10 @@ OpProto_Var::OpProto_Var()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto.Var)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto.Var)
}
}
OpProto_Var
::
OpProto_Var
(
const
OpProto_Var
&
from
)
OpProto_Var
::
OpProto_Var
(
const
OpProto_Var
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
(
NULL
),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
name_
.
UnsafeSetDefault
(
name_
.
UnsafeSetDefault
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
...
@@ -2395,8 +2401,7 @@ void OpProto_Var::Clear() {
...
@@ -2395,8 +2401,7 @@ void OpProto_Var::Clear() {
bool
OpProto_Var
::
MergePartialFromCodedStream
(
bool
OpProto_Var
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -2410,8 +2415,7 @@ bool OpProto_Var::MergePartialFromCodedStream(
...
@@ -2410,8 +2415,7 @@ bool OpProto_Var::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// required string name = 1;
// required string name = 1;
...
@@ -2644,21 +2648,18 @@ void OpProto_Var::MergeFrom(const OpProto_Var &from) {
...
@@ -2644,21 +2648,18 @@ void OpProto_Var::MergeFrom(const OpProto_Var &from) {
void
OpProto_Var
::
CopyFrom
(
const
OpProto_Var
&
from
)
{
void
OpProto_Var
::
CopyFrom
(
const
OpProto_Var
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpProto.Var)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpProto.Var)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
bool
OpProto_Var
::
IsInitialized
()
const
{
bool
OpProto_Var
::
IsInitialized
()
const
{
if
((
_has_bits_
[
0
]
&
0x00000003
)
!=
0x00000003
)
if
((
_has_bits_
[
0
]
&
0x00000003
)
!=
0x00000003
)
return
false
;
return
false
;
return
true
;
return
true
;
}
}
void
OpProto_Var
::
Swap
(
OpProto_Var
*
other
)
{
void
OpProto_Var
::
Swap
(
OpProto_Var
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
OpProto_Var
::
InternalSwap
(
OpProto_Var
*
other
)
{
void
OpProto_Var
::
InternalSwap
(
OpProto_Var
*
other
)
{
...
@@ -2893,8 +2894,10 @@ OpProto_Attr::OpProto_Attr()
...
@@ -2893,8 +2894,10 @@ OpProto_Attr::OpProto_Attr()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto.Attr)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto.Attr)
}
}
OpProto_Attr
::
OpProto_Attr
(
const
OpProto_Attr
&
from
)
OpProto_Attr
::
OpProto_Attr
(
const
OpProto_Attr
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
(
NULL
),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
name_
.
UnsafeSetDefault
(
name_
.
UnsafeSetDefault
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
...
@@ -2991,8 +2994,7 @@ void OpProto_Attr::Clear() {
...
@@ -2991,8 +2994,7 @@ void OpProto_Attr::Clear() {
bool
OpProto_Attr
::
MergePartialFromCodedStream
(
bool
OpProto_Attr
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -3006,8 +3008,7 @@ bool OpProto_Attr::MergePartialFromCodedStream(
...
@@ -3006,8 +3008,7 @@ bool OpProto_Attr::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// required string name = 1;
// required string name = 1;
...
@@ -3032,8 +3033,8 @@ bool OpProto_Attr::MergePartialFromCodedStream(
...
@@ -3032,8 +3033,8 @@ bool OpProto_Attr::MergePartialFromCodedStream(
int
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_ENUM
>
(
int
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_ENUM
>
(
input
,
&
value
)));
input
,
&
value
)));
if
(
::
paddle_mobile
::
framework
::
proto
::
AttrType_IsValid
(
value
))
{
if
(
::
paddle_mobile
::
framework
::
proto
::
AttrType_IsValid
(
value
))
{
set_type
(
set_type
(
static_cast
<::
paddle_mobile
::
framework
::
proto
::
AttrType
>
(
static_cast
<::
paddle_mobile
::
framework
::
proto
::
AttrType
>
(
value
));
value
));
}
else
{
}
else
{
unknown_fields_stream
.
WriteVarint32
(
16u
);
unknown_fields_stream
.
WriteVarint32
(
16u
);
unknown_fields_stream
.
WriteVarint32
(
unknown_fields_stream
.
WriteVarint32
(
...
@@ -3227,21 +3228,18 @@ void OpProto_Attr::MergeFrom(const OpProto_Attr &from) {
...
@@ -3227,21 +3228,18 @@ void OpProto_Attr::MergeFrom(const OpProto_Attr &from) {
void
OpProto_Attr
::
CopyFrom
(
const
OpProto_Attr
&
from
)
{
void
OpProto_Attr
::
CopyFrom
(
const
OpProto_Attr
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpProto.Attr)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpProto.Attr)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
bool
OpProto_Attr
::
IsInitialized
()
const
{
bool
OpProto_Attr
::
IsInitialized
()
const
{
if
((
_has_bits_
[
0
]
&
0x00000007
)
!=
0x00000007
)
if
((
_has_bits_
[
0
]
&
0x00000007
)
!=
0x00000007
)
return
false
;
return
false
;
return
true
;
return
true
;
}
}
void
OpProto_Attr
::
Swap
(
OpProto_Attr
*
other
)
{
void
OpProto_Attr
::
Swap
(
OpProto_Attr
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
OpProto_Attr
::
InternalSwap
(
OpProto_Attr
*
other
)
{
void
OpProto_Attr
::
InternalSwap
(
OpProto_Attr
*
other
)
{
...
@@ -3457,9 +3455,13 @@ OpProto::OpProto()
...
@@ -3457,9 +3455,13 @@ OpProto::OpProto()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.OpProto)
}
}
OpProto
::
OpProto
(
const
OpProto
&
from
)
OpProto
::
OpProto
(
const
OpProto
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
inputs_
(
from
.
inputs_
),
_internal_metadata_
(
NULL
),
outputs_
(
from
.
outputs_
),
attrs_
(
from
.
attrs_
)
{
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
inputs_
(
from
.
inputs_
),
outputs_
(
from
.
outputs_
),
attrs_
(
from
.
attrs_
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
type_
.
UnsafeSetDefault
(
type_
.
UnsafeSetDefault
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
...
@@ -3545,8 +3547,7 @@ void OpProto::Clear() {
...
@@ -3545,8 +3547,7 @@ void OpProto::Clear() {
bool
OpProto
::
MergePartialFromCodedStream
(
bool
OpProto
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -3560,8 +3561,7 @@ bool OpProto::MergePartialFromCodedStream(
...
@@ -3560,8 +3561,7 @@ bool OpProto::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// required string type = 1;
// required string type = 1;
...
@@ -3581,8 +3581,8 @@ bool OpProto::MergePartialFromCodedStream(
...
@@ -3581,8 +3581,8 @@ bool OpProto::MergePartialFromCodedStream(
case
2
:
{
case
2
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
18u
/* 18 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
18u
/* 18 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
add_inputs
()));
ReadMessageNoVirtual
(
input
,
add_inputs
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -3594,8 +3594,8 @@ bool OpProto::MergePartialFromCodedStream(
...
@@ -3594,8 +3594,8 @@ bool OpProto::MergePartialFromCodedStream(
case
3
:
{
case
3
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
26u
/* 26 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
26u
/* 26 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
add_outputs
()));
ReadMessageNoVirtual
(
input
,
add_outputs
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -3607,8 +3607,8 @@ bool OpProto::MergePartialFromCodedStream(
...
@@ -3607,8 +3607,8 @@ bool OpProto::MergePartialFromCodedStream(
case
4
:
{
case
4
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
34u
/* 34 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
34u
/* 34 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
add_attrs
()));
ReadMessageNoVirtual
(
input
,
add_attrs
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -3810,15 +3810,13 @@ void OpProto::MergeFrom(const OpProto &from) {
...
@@ -3810,15 +3810,13 @@ void OpProto::MergeFrom(const OpProto &from) {
void
OpProto
::
CopyFrom
(
const
OpProto
&
from
)
{
void
OpProto
::
CopyFrom
(
const
OpProto
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpProto)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.OpProto)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
bool
OpProto
::
IsInitialized
()
const
{
bool
OpProto
::
IsInitialized
()
const
{
if
((
_has_bits_
[
0
]
&
0x00000003
)
!=
0x00000003
)
if
((
_has_bits_
[
0
]
&
0x00000003
)
!=
0x00000003
)
return
false
;
return
false
;
if
(
!::
google
::
protobuf
::
internal
::
AllAreInitialized
(
this
->
inputs
()))
if
(
!::
google
::
protobuf
::
internal
::
AllAreInitialized
(
this
->
inputs
()))
return
false
;
return
false
;
if
(
!::
google
::
protobuf
::
internal
::
AllAreInitialized
(
this
->
outputs
()))
if
(
!::
google
::
protobuf
::
internal
::
AllAreInitialized
(
this
->
outputs
()))
...
@@ -3829,8 +3827,7 @@ bool OpProto::IsInitialized() const {
...
@@ -3829,8 +3827,7 @@ bool OpProto::IsInitialized() const {
}
}
void
OpProto
::
Swap
(
OpProto
*
other
)
{
void
OpProto
::
Swap
(
OpProto
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
OpProto
::
InternalSwap
(
OpProto
*
other
)
{
void
OpProto
::
InternalSwap
(
OpProto
*
other
)
{
...
@@ -3918,13 +3915,13 @@ void OpProto::set_allocated_type(::std::string *type) {
...
@@ -3918,13 +3915,13 @@ void OpProto::set_allocated_type(::std::string *type) {
// repeated .paddle_mobile.framework.proto.OpProto.Var inputs = 2;
// repeated .paddle_mobile.framework.proto.OpProto.Var inputs = 2;
int
OpProto
::
inputs_size
()
const
{
return
inputs_
.
size
();
}
int
OpProto
::
inputs_size
()
const
{
return
inputs_
.
size
();
}
void
OpProto
::
clear_inputs
()
{
inputs_
.
Clear
();
}
void
OpProto
::
clear_inputs
()
{
inputs_
.
Clear
();
}
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
&
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
&
OpProto
::
inputs
(
OpProto
::
inputs
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.inputs)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.inputs)
return
inputs_
.
Get
(
index
);
return
inputs_
.
Get
(
index
);
}
}
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
OpProto
::
mutable_inputs
(
OpProto
::
mutable_inputs
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.inputs)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.inputs)
return
inputs_
.
Mutable
(
index
);
return
inputs_
.
Mutable
(
index
);
}
}
...
@@ -3933,14 +3930,14 @@ OpProto::mutable_inputs(int index) {
...
@@ -3933,14 +3930,14 @@ OpProto::mutable_inputs(int index) {
return
inputs_
.
Add
();
return
inputs_
.
Add
();
}
}
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
*
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
OpProto
::
mutable_inputs
()
{
*
OpProto
::
mutable_inputs
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.inputs)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.inputs)
return
&
inputs_
;
return
&
inputs_
;
}
}
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
&
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
OpProto
::
inputs
()
const
{
&
OpProto
::
inputs
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.inputs)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.inputs)
return
inputs_
;
return
inputs_
;
}
}
...
@@ -3948,13 +3945,13 @@ OpProto::inputs() const {
...
@@ -3948,13 +3945,13 @@ OpProto::inputs() const {
// repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3;
// repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3;
int
OpProto
::
outputs_size
()
const
{
return
outputs_
.
size
();
}
int
OpProto
::
outputs_size
()
const
{
return
outputs_
.
size
();
}
void
OpProto
::
clear_outputs
()
{
outputs_
.
Clear
();
}
void
OpProto
::
clear_outputs
()
{
outputs_
.
Clear
();
}
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
&
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
&
OpProto
::
outputs
(
OpProto
::
outputs
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.outputs)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.outputs)
return
outputs_
.
Get
(
index
);
return
outputs_
.
Get
(
index
);
}
}
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
OpProto
::
mutable_outputs
(
OpProto
::
mutable_outputs
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.outputs)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.outputs)
return
outputs_
.
Mutable
(
index
);
return
outputs_
.
Mutable
(
index
);
}
}
...
@@ -3963,14 +3960,14 @@ OpProto::mutable_outputs(int index) {
...
@@ -3963,14 +3960,14 @@ OpProto::mutable_outputs(int index) {
return
outputs_
.
Add
();
return
outputs_
.
Add
();
}
}
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
*
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
OpProto
::
mutable_outputs
()
{
*
OpProto
::
mutable_outputs
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.outputs)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.outputs)
return
&
outputs_
;
return
&
outputs_
;
}
}
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
&
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
OpProto
::
outputs
()
const
{
&
OpProto
::
outputs
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.outputs)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.outputs)
return
outputs_
;
return
outputs_
;
}
}
...
@@ -3978,13 +3975,13 @@ OpProto::outputs() const {
...
@@ -3978,13 +3975,13 @@ OpProto::outputs() const {
// repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4;
// repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4;
int
OpProto
::
attrs_size
()
const
{
return
attrs_
.
size
();
}
int
OpProto
::
attrs_size
()
const
{
return
attrs_
.
size
();
}
void
OpProto
::
clear_attrs
()
{
attrs_
.
Clear
();
}
void
OpProto
::
clear_attrs
()
{
attrs_
.
Clear
();
}
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
&
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
&
OpProto
::
attrs
(
OpProto
::
attrs
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.attrs)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.attrs)
return
attrs_
.
Get
(
index
);
return
attrs_
.
Get
(
index
);
}
}
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
*
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
*
OpProto
::
mutable_attrs
(
OpProto
::
mutable_attrs
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.attrs)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.attrs)
return
attrs_
.
Mutable
(
index
);
return
attrs_
.
Mutable
(
index
);
}
}
...
@@ -3993,14 +3990,14 @@ OpProto::mutable_attrs(int index) {
...
@@ -3993,14 +3990,14 @@ OpProto::mutable_attrs(int index) {
return
attrs_
.
Add
();
return
attrs_
.
Add
();
}
}
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
>
*
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
>
OpProto
::
mutable_attrs
()
{
*
OpProto
::
mutable_attrs
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.attrs)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.attrs)
return
&
attrs_
;
return
&
attrs_
;
}
}
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
>
&
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
>
OpProto
::
attrs
()
const
{
&
OpProto
::
attrs
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.attrs)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.attrs)
return
attrs_
;
return
attrs_
;
}
}
...
@@ -4089,8 +4086,11 @@ VarType_TensorDesc::VarType_TensorDesc()
...
@@ -4089,8 +4086,11 @@ VarType_TensorDesc::VarType_TensorDesc()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.TensorDesc)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.TensorDesc)
}
}
VarType_TensorDesc
::
VarType_TensorDesc
(
const
VarType_TensorDesc
&
from
)
VarType_TensorDesc
::
VarType_TensorDesc
(
const
VarType_TensorDesc
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
dims_
(
from
.
dims_
)
{
_internal_metadata_
(
NULL
),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
dims_
(
from
.
dims_
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
data_type_
=
from
.
data_type_
;
data_type_
=
from
.
data_type_
;
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.TensorDesc)
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.TensorDesc)
...
@@ -4118,8 +4118,8 @@ const VarType_TensorDesc &VarType_TensorDesc::default_instance() {
...
@@ -4118,8 +4118,8 @@ const VarType_TensorDesc &VarType_TensorDesc::default_instance() {
return
*
internal_default_instance
();
return
*
internal_default_instance
();
}
}
VarType_TensorDesc
*
VarType_TensorDesc
*
VarType_TensorDesc
::
New
(
VarType_TensorDesc
::
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
{
::
google
::
protobuf
::
Arena
*
arena
)
const
{
VarType_TensorDesc
*
n
=
new
VarType_TensorDesc
;
VarType_TensorDesc
*
n
=
new
VarType_TensorDesc
;
if
(
arena
!=
NULL
)
{
if
(
arena
!=
NULL
)
{
arena
->
Own
(
n
);
arena
->
Own
(
n
);
...
@@ -4142,8 +4142,7 @@ void VarType_TensorDesc::Clear() {
...
@@ -4142,8 +4142,7 @@ void VarType_TensorDesc::Clear() {
bool
VarType_TensorDesc
::
MergePartialFromCodedStream
(
bool
VarType_TensorDesc
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -4157,8 +4156,7 @@ bool VarType_TensorDesc::MergePartialFromCodedStream(
...
@@ -4157,8 +4156,7 @@ bool VarType_TensorDesc::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// required .paddle_mobile.framework.proto.VarType.Type
// required .paddle_mobile.framework.proto.VarType.Type
...
@@ -4190,13 +4188,16 @@ bool VarType_TensorDesc::MergePartialFromCodedStream(
...
@@ -4190,13 +4188,16 @@ bool VarType_TensorDesc::MergePartialFromCodedStream(
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
16u
/* 16 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
16u
/* 16 & 0xFF */
))
{
DO_
((
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadRepeatedPrimitive
<
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadRepeatedPrimitive
<
::
google
::
protobuf
::
int64
,
::
google
::
protobuf
::
int64
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_INT64
>
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_INT64
>
(
1
,
16u
,
input
,
this
->
mutable_dims
())));
1
,
16u
,
input
,
this
->
mutable_dims
())));
}
else
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
}
else
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
18u
/* 18 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
18u
/* 18 & 0xFF */
))
{
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadPackedPrimitiveNoInline
<
ReadPackedPrimitiveNoInline
<
::
google
::
protobuf
::
int64
,
::
google
::
protobuf
::
int64
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_INT64
>
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_INT64
>
(
...
@@ -4301,21 +4302,18 @@ void VarType_TensorDesc::MergeFrom(const VarType_TensorDesc &from) {
...
@@ -4301,21 +4302,18 @@ void VarType_TensorDesc::MergeFrom(const VarType_TensorDesc &from) {
void
VarType_TensorDesc
::
CopyFrom
(
const
VarType_TensorDesc
&
from
)
{
void
VarType_TensorDesc
::
CopyFrom
(
const
VarType_TensorDesc
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.TensorDesc)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.TensorDesc)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
bool
VarType_TensorDesc
::
IsInitialized
()
const
{
bool
VarType_TensorDesc
::
IsInitialized
()
const
{
if
((
_has_bits_
[
0
]
&
0x00000001
)
!=
0x00000001
)
if
((
_has_bits_
[
0
]
&
0x00000001
)
!=
0x00000001
)
return
false
;
return
false
;
return
true
;
return
true
;
}
}
void
VarType_TensorDesc
::
Swap
(
VarType_TensorDesc
*
other
)
{
void
VarType_TensorDesc
::
Swap
(
VarType_TensorDesc
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
VarType_TensorDesc
::
InternalSwap
(
VarType_TensorDesc
*
other
)
{
void
VarType_TensorDesc
::
InternalSwap
(
VarType_TensorDesc
*
other
)
{
...
@@ -4347,8 +4345,8 @@ void VarType_TensorDesc::clear_data_type() {
...
@@ -4347,8 +4345,8 @@ void VarType_TensorDesc::clear_data_type() {
data_type_
=
0
;
data_type_
=
0
;
clear_has_data_type
();
clear_has_data_type
();
}
}
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
VarType_TensorDesc
::
data_type
()
VarType_TensorDesc
::
data_type
()
const
{
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.TensorDesc.data_type)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.TensorDesc.data_type)
return
static_cast
<::
paddle_mobile
::
framework
::
proto
::
VarType_Type
>
(
return
static_cast
<::
paddle_mobile
::
framework
::
proto
::
VarType_Type
>
(
data_type_
);
data_type_
);
...
@@ -4376,13 +4374,13 @@ void VarType_TensorDesc::add_dims(::google::protobuf::int64 value) {
...
@@ -4376,13 +4374,13 @@ void VarType_TensorDesc::add_dims(::google::protobuf::int64 value) {
dims_
.
Add
(
value
);
dims_
.
Add
(
value
);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
}
}
const
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int64
>
&
const
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int64
>
VarType_TensorDesc
::
dims
()
const
{
&
VarType_TensorDesc
::
dims
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
return
dims_
;
return
dims_
;
}
}
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int64
>
*
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int64
>
VarType_TensorDesc
::
mutable_dims
()
{
*
VarType_TensorDesc
::
mutable_dims
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
return
&
dims_
;
return
&
dims_
;
}
}
...
@@ -4405,8 +4403,10 @@ VarType_LoDTensorDesc::VarType_LoDTensorDesc()
...
@@ -4405,8 +4403,10 @@ VarType_LoDTensorDesc::VarType_LoDTensorDesc()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
}
}
VarType_LoDTensorDesc
::
VarType_LoDTensorDesc
(
const
VarType_LoDTensorDesc
&
from
)
VarType_LoDTensorDesc
::
VarType_LoDTensorDesc
(
const
VarType_LoDTensorDesc
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
(
NULL
),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
if
(
from
.
has_tensor
())
{
if
(
from
.
has_tensor
())
{
tensor_
=
new
::
paddle_mobile
::
framework
::
proto
::
VarType_TensorDesc
(
tensor_
=
new
::
paddle_mobile
::
framework
::
proto
::
VarType_TensorDesc
(
...
@@ -4432,8 +4432,7 @@ VarType_LoDTensorDesc::~VarType_LoDTensorDesc() {
...
@@ -4432,8 +4432,7 @@ VarType_LoDTensorDesc::~VarType_LoDTensorDesc() {
}
}
void
VarType_LoDTensorDesc
::
SharedDtor
()
{
void
VarType_LoDTensorDesc
::
SharedDtor
()
{
if
(
this
!=
internal_default_instance
())
if
(
this
!=
internal_default_instance
())
delete
tensor_
;
delete
tensor_
;
}
}
void
VarType_LoDTensorDesc
::
SetCachedSize
(
int
size
)
const
{
void
VarType_LoDTensorDesc
::
SetCachedSize
(
int
size
)
const
{
...
@@ -4446,8 +4445,8 @@ const VarType_LoDTensorDesc &VarType_LoDTensorDesc::default_instance() {
...
@@ -4446,8 +4445,8 @@ const VarType_LoDTensorDesc &VarType_LoDTensorDesc::default_instance() {
return
*
internal_default_instance
();
return
*
internal_default_instance
();
}
}
VarType_LoDTensorDesc
*
VarType_LoDTensorDesc
*
VarType_LoDTensorDesc
::
New
(
VarType_LoDTensorDesc
::
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
{
::
google
::
protobuf
::
Arena
*
arena
)
const
{
VarType_LoDTensorDesc
*
n
=
new
VarType_LoDTensorDesc
;
VarType_LoDTensorDesc
*
n
=
new
VarType_LoDTensorDesc
;
if
(
arena
!=
NULL
)
{
if
(
arena
!=
NULL
)
{
arena
->
Own
(
n
);
arena
->
Own
(
n
);
...
@@ -4473,8 +4472,7 @@ void VarType_LoDTensorDesc::Clear() {
...
@@ -4473,8 +4472,7 @@ void VarType_LoDTensorDesc::Clear() {
bool
VarType_LoDTensorDesc
::
MergePartialFromCodedStream
(
bool
VarType_LoDTensorDesc
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -4488,8 +4486,7 @@ bool VarType_LoDTensorDesc::MergePartialFromCodedStream(
...
@@ -4488,8 +4486,7 @@ bool VarType_LoDTensorDesc::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// required
// required
...
@@ -4498,8 +4495,8 @@ bool VarType_LoDTensorDesc::MergePartialFromCodedStream(
...
@@ -4498,8 +4495,8 @@ bool VarType_LoDTensorDesc::MergePartialFromCodedStream(
case
1
:
{
case
1
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
10u
/* 10 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
10u
/* 10 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
mutable_tensor
()));
ReadMessageNoVirtual
(
input
,
mutable_tensor
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -4622,25 +4619,21 @@ void VarType_LoDTensorDesc::MergeFrom(const VarType_LoDTensorDesc &from) {
...
@@ -4622,25 +4619,21 @@ void VarType_LoDTensorDesc::MergeFrom(const VarType_LoDTensorDesc &from) {
void
VarType_LoDTensorDesc
::
CopyFrom
(
const
VarType_LoDTensorDesc
&
from
)
{
void
VarType_LoDTensorDesc
::
CopyFrom
(
const
VarType_LoDTensorDesc
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
bool
VarType_LoDTensorDesc
::
IsInitialized
()
const
{
bool
VarType_LoDTensorDesc
::
IsInitialized
()
const
{
if
((
_has_bits_
[
0
]
&
0x00000001
)
!=
0x00000001
)
if
((
_has_bits_
[
0
]
&
0x00000001
)
!=
0x00000001
)
return
false
;
return
false
;
if
(
has_tensor
())
{
if
(
has_tensor
())
{
if
(
!
this
->
tensor_
->
IsInitialized
())
if
(
!
this
->
tensor_
->
IsInitialized
())
return
false
;
return
false
;
}
}
return
true
;
return
true
;
}
}
void
VarType_LoDTensorDesc
::
Swap
(
VarType_LoDTensorDesc
*
other
)
{
void
VarType_LoDTensorDesc
::
Swap
(
VarType_LoDTensorDesc
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
VarType_LoDTensorDesc
::
InternalSwap
(
VarType_LoDTensorDesc
*
other
)
{
void
VarType_LoDTensorDesc
::
InternalSwap
(
VarType_LoDTensorDesc
*
other
)
{
...
@@ -4756,8 +4749,10 @@ VarType_LoDTensorArrayDesc::VarType_LoDTensorArrayDesc()
...
@@ -4756,8 +4749,10 @@ VarType_LoDTensorArrayDesc::VarType_LoDTensorArrayDesc()
}
}
VarType_LoDTensorArrayDesc
::
VarType_LoDTensorArrayDesc
(
VarType_LoDTensorArrayDesc
::
VarType_LoDTensorArrayDesc
(
const
VarType_LoDTensorArrayDesc
&
from
)
const
VarType_LoDTensorArrayDesc
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
(
NULL
),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
if
(
from
.
has_tensor
())
{
if
(
from
.
has_tensor
())
{
tensor_
=
new
::
paddle_mobile
::
framework
::
proto
::
VarType_TensorDesc
(
tensor_
=
new
::
paddle_mobile
::
framework
::
proto
::
VarType_TensorDesc
(
...
@@ -4783,8 +4778,7 @@ VarType_LoDTensorArrayDesc::~VarType_LoDTensorArrayDesc() {
...
@@ -4783,8 +4778,7 @@ VarType_LoDTensorArrayDesc::~VarType_LoDTensorArrayDesc() {
}
}
void
VarType_LoDTensorArrayDesc
::
SharedDtor
()
{
void
VarType_LoDTensorArrayDesc
::
SharedDtor
()
{
if
(
this
!=
internal_default_instance
())
if
(
this
!=
internal_default_instance
())
delete
tensor_
;
delete
tensor_
;
}
}
void
VarType_LoDTensorArrayDesc
::
SetCachedSize
(
int
size
)
const
{
void
VarType_LoDTensorArrayDesc
::
SetCachedSize
(
int
size
)
const
{
...
@@ -4798,8 +4792,8 @@ VarType_LoDTensorArrayDesc::default_instance() {
...
@@ -4798,8 +4792,8 @@ VarType_LoDTensorArrayDesc::default_instance() {
return
*
internal_default_instance
();
return
*
internal_default_instance
();
}
}
VarType_LoDTensorArrayDesc
*
VarType_LoDTensorArrayDesc
*
VarType_LoDTensorArrayDesc
::
New
(
VarType_LoDTensorArrayDesc
::
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
{
::
google
::
protobuf
::
Arena
*
arena
)
const
{
VarType_LoDTensorArrayDesc
*
n
=
new
VarType_LoDTensorArrayDesc
;
VarType_LoDTensorArrayDesc
*
n
=
new
VarType_LoDTensorArrayDesc
;
if
(
arena
!=
NULL
)
{
if
(
arena
!=
NULL
)
{
arena
->
Own
(
n
);
arena
->
Own
(
n
);
...
@@ -4825,8 +4819,7 @@ void VarType_LoDTensorArrayDesc::Clear() {
...
@@ -4825,8 +4819,7 @@ void VarType_LoDTensorArrayDesc::Clear() {
bool
VarType_LoDTensorArrayDesc
::
MergePartialFromCodedStream
(
bool
VarType_LoDTensorArrayDesc
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -4840,8 +4833,7 @@ bool VarType_LoDTensorArrayDesc::MergePartialFromCodedStream(
...
@@ -4840,8 +4833,7 @@ bool VarType_LoDTensorArrayDesc::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// required
// required
...
@@ -4850,8 +4842,8 @@ bool VarType_LoDTensorArrayDesc::MergePartialFromCodedStream(
...
@@ -4850,8 +4842,8 @@ bool VarType_LoDTensorArrayDesc::MergePartialFromCodedStream(
case
1
:
{
case
1
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
10u
/* 10 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
10u
/* 10 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
mutable_tensor
()));
ReadMessageNoVirtual
(
input
,
mutable_tensor
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -4976,25 +4968,21 @@ void VarType_LoDTensorArrayDesc::MergeFrom(
...
@@ -4976,25 +4968,21 @@ void VarType_LoDTensorArrayDesc::MergeFrom(
void
VarType_LoDTensorArrayDesc
::
CopyFrom
(
void
VarType_LoDTensorArrayDesc
::
CopyFrom
(
const
VarType_LoDTensorArrayDesc
&
from
)
{
const
VarType_LoDTensorArrayDesc
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
bool
VarType_LoDTensorArrayDesc
::
IsInitialized
()
const
{
bool
VarType_LoDTensorArrayDesc
::
IsInitialized
()
const
{
if
((
_has_bits_
[
0
]
&
0x00000001
)
!=
0x00000001
)
if
((
_has_bits_
[
0
]
&
0x00000001
)
!=
0x00000001
)
return
false
;
return
false
;
if
(
has_tensor
())
{
if
(
has_tensor
())
{
if
(
!
this
->
tensor_
->
IsInitialized
())
if
(
!
this
->
tensor_
->
IsInitialized
())
return
false
;
return
false
;
}
}
return
true
;
return
true
;
}
}
void
VarType_LoDTensorArrayDesc
::
Swap
(
VarType_LoDTensorArrayDesc
*
other
)
{
void
VarType_LoDTensorArrayDesc
::
Swap
(
VarType_LoDTensorArrayDesc
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
VarType_LoDTensorArrayDesc
::
InternalSwap
(
void
VarType_LoDTensorArrayDesc
::
InternalSwap
(
...
@@ -5113,8 +5101,10 @@ VarType_ReaderDesc::VarType_ReaderDesc()
...
@@ -5113,8 +5101,10 @@ VarType_ReaderDesc::VarType_ReaderDesc()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.ReaderDesc)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.ReaderDesc)
}
}
VarType_ReaderDesc
::
VarType_ReaderDesc
(
const
VarType_ReaderDesc
&
from
)
VarType_ReaderDesc
::
VarType_ReaderDesc
(
const
VarType_ReaderDesc
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
_internal_metadata_
(
NULL
),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
lod_tensor_
(
from
.
lod_tensor_
)
{
lod_tensor_
(
from
.
lod_tensor_
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.ReaderDesc)
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.ReaderDesc)
...
@@ -5139,8 +5129,8 @@ const VarType_ReaderDesc &VarType_ReaderDesc::default_instance() {
...
@@ -5139,8 +5129,8 @@ const VarType_ReaderDesc &VarType_ReaderDesc::default_instance() {
return
*
internal_default_instance
();
return
*
internal_default_instance
();
}
}
VarType_ReaderDesc
*
VarType_ReaderDesc
*
VarType_ReaderDesc
::
New
(
VarType_ReaderDesc
::
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
{
::
google
::
protobuf
::
Arena
*
arena
)
const
{
VarType_ReaderDesc
*
n
=
new
VarType_ReaderDesc
;
VarType_ReaderDesc
*
n
=
new
VarType_ReaderDesc
;
if
(
arena
!=
NULL
)
{
if
(
arena
!=
NULL
)
{
arena
->
Own
(
n
);
arena
->
Own
(
n
);
...
@@ -5162,8 +5152,7 @@ void VarType_ReaderDesc::Clear() {
...
@@ -5162,8 +5152,7 @@ void VarType_ReaderDesc::Clear() {
bool
VarType_ReaderDesc
::
MergePartialFromCodedStream
(
bool
VarType_ReaderDesc
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -5177,8 +5166,7 @@ bool VarType_ReaderDesc::MergePartialFromCodedStream(
...
@@ -5177,8 +5166,7 @@ bool VarType_ReaderDesc::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// repeated
// repeated
...
@@ -5187,8 +5175,8 @@ bool VarType_ReaderDesc::MergePartialFromCodedStream(
...
@@ -5187,8 +5175,8 @@ bool VarType_ReaderDesc::MergePartialFromCodedStream(
case
1
:
{
case
1
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
10u
/* 10 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
10u
/* 10 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
add_lod_tensor
()));
ReadMessageNoVirtual
(
input
,
add_lod_tensor
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -5280,8 +5268,7 @@ void VarType_ReaderDesc::MergeFrom(const VarType_ReaderDesc &from) {
...
@@ -5280,8 +5268,7 @@ void VarType_ReaderDesc::MergeFrom(const VarType_ReaderDesc &from) {
void
VarType_ReaderDesc
::
CopyFrom
(
const
VarType_ReaderDesc
&
from
)
{
void
VarType_ReaderDesc
::
CopyFrom
(
const
VarType_ReaderDesc
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.ReaderDesc)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.ReaderDesc)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
...
@@ -5293,8 +5280,7 @@ bool VarType_ReaderDesc::IsInitialized() const {
...
@@ -5293,8 +5280,7 @@ bool VarType_ReaderDesc::IsInitialized() const {
}
}
void
VarType_ReaderDesc
::
Swap
(
VarType_ReaderDesc
*
other
)
{
void
VarType_ReaderDesc
::
Swap
(
VarType_ReaderDesc
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
VarType_ReaderDesc
::
InternalSwap
(
VarType_ReaderDesc
*
other
)
{
void
VarType_ReaderDesc
::
InternalSwap
(
VarType_ReaderDesc
*
other
)
{
...
@@ -5332,14 +5318,14 @@ VarType_ReaderDesc::add_lod_tensor() {
...
@@ -5332,14 +5318,14 @@ VarType_ReaderDesc::add_lod_tensor() {
return
lod_tensor_
.
Add
();
return
lod_tensor_
.
Add
();
}
}
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
>
*
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
>
VarType_ReaderDesc
::
mutable_lod_tensor
()
{
*
VarType_ReaderDesc
::
mutable_lod_tensor
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return
&
lod_tensor_
;
return
&
lod_tensor_
;
}
}
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
>
&
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
>
VarType_ReaderDesc
::
lod_tensor
()
const
{
&
VarType_ReaderDesc
::
lod_tensor
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return
lod_tensor_
;
return
lod_tensor_
;
}
}
...
@@ -5362,8 +5348,10 @@ VarType_ChannelDesc::VarType_ChannelDesc()
...
@@ -5362,8 +5348,10 @@ VarType_ChannelDesc::VarType_ChannelDesc()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.ChannelDesc)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.ChannelDesc)
}
}
VarType_ChannelDesc
::
VarType_ChannelDesc
(
const
VarType_ChannelDesc
&
from
)
VarType_ChannelDesc
::
VarType_ChannelDesc
(
const
VarType_ChannelDesc
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
(
NULL
),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
::
memcpy
(
&
capacity_
,
&
from
.
capacity_
,
::
memcpy
(
&
capacity_
,
&
from
.
capacity_
,
static_cast
<
size_t
>
(
reinterpret_cast
<
char
*>
(
&
data_type_
)
-
static_cast
<
size_t
>
(
reinterpret_cast
<
char
*>
(
&
data_type_
)
-
...
@@ -5397,8 +5385,8 @@ const VarType_ChannelDesc &VarType_ChannelDesc::default_instance() {
...
@@ -5397,8 +5385,8 @@ const VarType_ChannelDesc &VarType_ChannelDesc::default_instance() {
return
*
internal_default_instance
();
return
*
internal_default_instance
();
}
}
VarType_ChannelDesc
*
VarType_ChannelDesc
*
VarType_ChannelDesc
::
New
(
VarType_ChannelDesc
::
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
{
::
google
::
protobuf
::
Arena
*
arena
)
const
{
VarType_ChannelDesc
*
n
=
new
VarType_ChannelDesc
;
VarType_ChannelDesc
*
n
=
new
VarType_ChannelDesc
;
if
(
arena
!=
NULL
)
{
if
(
arena
!=
NULL
)
{
arena
->
Own
(
n
);
arena
->
Own
(
n
);
...
@@ -5426,8 +5414,7 @@ void VarType_ChannelDesc::Clear() {
...
@@ -5426,8 +5414,7 @@ void VarType_ChannelDesc::Clear() {
bool
VarType_ChannelDesc
::
MergePartialFromCodedStream
(
bool
VarType_ChannelDesc
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -5441,8 +5428,7 @@ bool VarType_ChannelDesc::MergePartialFromCodedStream(
...
@@ -5441,8 +5428,7 @@ bool VarType_ChannelDesc::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// required .paddle_mobile.framework.proto.VarType.Type
// required .paddle_mobile.framework.proto.VarType.Type
...
@@ -5602,21 +5588,18 @@ void VarType_ChannelDesc::MergeFrom(const VarType_ChannelDesc &from) {
...
@@ -5602,21 +5588,18 @@ void VarType_ChannelDesc::MergeFrom(const VarType_ChannelDesc &from) {
void
VarType_ChannelDesc
::
CopyFrom
(
const
VarType_ChannelDesc
&
from
)
{
void
VarType_ChannelDesc
::
CopyFrom
(
const
VarType_ChannelDesc
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.ChannelDesc)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.ChannelDesc)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
bool
VarType_ChannelDesc
::
IsInitialized
()
const
{
bool
VarType_ChannelDesc
::
IsInitialized
()
const
{
if
((
_has_bits_
[
0
]
&
0x00000003
)
!=
0x00000003
)
if
((
_has_bits_
[
0
]
&
0x00000003
)
!=
0x00000003
)
return
false
;
return
false
;
return
true
;
return
true
;
}
}
void
VarType_ChannelDesc
::
Swap
(
VarType_ChannelDesc
*
other
)
{
void
VarType_ChannelDesc
::
Swap
(
VarType_ChannelDesc
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
VarType_ChannelDesc
::
InternalSwap
(
VarType_ChannelDesc
*
other
)
{
void
VarType_ChannelDesc
::
InternalSwap
(
VarType_ChannelDesc
*
other
)
{
...
@@ -5648,8 +5631,8 @@ void VarType_ChannelDesc::clear_data_type() {
...
@@ -5648,8 +5631,8 @@ void VarType_ChannelDesc::clear_data_type() {
data_type_
=
0
;
data_type_
=
0
;
clear_has_data_type
();
clear_has_data_type
();
}
}
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
VarType_ChannelDesc
::
data_type
()
VarType_ChannelDesc
::
data_type
()
const
{
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.ChannelDesc.data_type)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.ChannelDesc.data_type)
return
static_cast
<::
paddle_mobile
::
framework
::
proto
::
VarType_Type
>
(
return
static_cast
<::
paddle_mobile
::
framework
::
proto
::
VarType_Type
>
(
data_type_
);
data_type_
);
...
@@ -5701,8 +5684,10 @@ VarType_Tuple::VarType_Tuple()
...
@@ -5701,8 +5684,10 @@ VarType_Tuple::VarType_Tuple()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.Tuple)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType.Tuple)
}
}
VarType_Tuple
::
VarType_Tuple
(
const
VarType_Tuple
&
from
)
VarType_Tuple
::
VarType_Tuple
(
const
VarType_Tuple
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
_internal_metadata_
(
NULL
),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
element_type_
(
from
.
element_type_
)
{
element_type_
(
from
.
element_type_
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.Tuple)
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.VarType.Tuple)
...
@@ -5749,8 +5734,7 @@ void VarType_Tuple::Clear() {
...
@@ -5749,8 +5734,7 @@ void VarType_Tuple::Clear() {
bool
VarType_Tuple
::
MergePartialFromCodedStream
(
bool
VarType_Tuple
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -5764,8 +5748,7 @@ bool VarType_Tuple::MergePartialFromCodedStream(
...
@@ -5764,8 +5748,7 @@ bool VarType_Tuple::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// repeated .paddle_mobile.framework.proto.VarType.Type
// repeated .paddle_mobile.framework.proto.VarType.Type
...
@@ -5787,7 +5770,8 @@ bool VarType_Tuple::MergePartialFromCodedStream(
...
@@ -5787,7 +5770,8 @@ bool VarType_Tuple::MergePartialFromCodedStream(
static_cast
<::
google
::
protobuf
::
uint32
>
(
value
));
static_cast
<::
google
::
protobuf
::
uint32
>
(
value
));
}
}
}
else
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
}
else
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
10u
/* 10 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
10u
/* 10 & 0xFF */
))
{
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadPackedEnumPreserveUnknowns
(
ReadPackedEnumPreserveUnknowns
(
input
,
1
,
input
,
1
,
...
@@ -5880,8 +5864,7 @@ void VarType_Tuple::MergeFrom(const VarType_Tuple &from) {
...
@@ -5880,8 +5864,7 @@ void VarType_Tuple::MergeFrom(const VarType_Tuple &from) {
void
VarType_Tuple
::
CopyFrom
(
const
VarType_Tuple
&
from
)
{
void
VarType_Tuple
::
CopyFrom
(
const
VarType_Tuple
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.Tuple)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType.Tuple)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
...
@@ -5889,8 +5872,7 @@ void VarType_Tuple::CopyFrom(const VarType_Tuple &from) {
...
@@ -5889,8 +5872,7 @@ void VarType_Tuple::CopyFrom(const VarType_Tuple &from) {
bool
VarType_Tuple
::
IsInitialized
()
const
{
return
true
;
}
bool
VarType_Tuple
::
IsInitialized
()
const
{
return
true
;
}
void
VarType_Tuple
::
Swap
(
VarType_Tuple
*
other
)
{
void
VarType_Tuple
::
Swap
(
VarType_Tuple
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
VarType_Tuple
::
InternalSwap
(
VarType_Tuple
*
other
)
{
void
VarType_Tuple
::
InternalSwap
(
VarType_Tuple
*
other
)
{
...
@@ -5912,8 +5894,8 @@ void VarType_Tuple::InternalSwap(VarType_Tuple *other) {
...
@@ -5912,8 +5894,8 @@ void VarType_Tuple::InternalSwap(VarType_Tuple *other) {
// = 1;
// = 1;
int
VarType_Tuple
::
element_type_size
()
const
{
return
element_type_
.
size
();
}
int
VarType_Tuple
::
element_type_size
()
const
{
return
element_type_
.
size
();
}
void
VarType_Tuple
::
clear_element_type
()
{
element_type_
.
Clear
();
}
void
VarType_Tuple
::
clear_element_type
()
{
element_type_
.
Clear
();
}
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
VarType_Tuple
::
element_type
(
VarType_Tuple
::
element_type
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.Tuple.element_type)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.Tuple.element_type)
return
static_cast
<::
paddle_mobile
::
framework
::
proto
::
VarType_Type
>
(
return
static_cast
<::
paddle_mobile
::
framework
::
proto
::
VarType_Type
>
(
element_type_
.
Get
(
index
));
element_type_
.
Get
(
index
));
...
@@ -5930,8 +5912,8 @@ void VarType_Tuple::add_element_type(
...
@@ -5930,8 +5912,8 @@ void VarType_Tuple::add_element_type(
element_type_
.
Add
(
value
);
element_type_
.
Add
(
value
);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.Tuple.element_type)
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.Tuple.element_type)
}
}
const
::
google
::
protobuf
::
RepeatedField
<
int
>
&
const
::
google
::
protobuf
::
RepeatedField
<
int
>
&
VarType_Tuple
::
element_type
()
VarType_Tuple
::
element_type
()
const
{
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.Tuple.element_type)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.Tuple.element_type)
return
element_type_
;
return
element_type_
;
}
}
...
@@ -5963,8 +5945,10 @@ VarType::VarType()
...
@@ -5963,8 +5945,10 @@ VarType::VarType()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarType)
}
}
VarType
::
VarType
(
const
VarType
&
from
)
VarType
::
VarType
(
const
VarType
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
(
NULL
),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
if
(
from
.
has_selected_rows
())
{
if
(
from
.
has_selected_rows
())
{
selected_rows_
=
new
::
paddle_mobile
::
framework
::
proto
::
VarType_TensorDesc
(
selected_rows_
=
new
::
paddle_mobile
::
framework
::
proto
::
VarType_TensorDesc
(
...
@@ -6020,18 +6004,12 @@ VarType::~VarType() {
...
@@ -6020,18 +6004,12 @@ VarType::~VarType() {
}
}
void
VarType
::
SharedDtor
()
{
void
VarType
::
SharedDtor
()
{
if
(
this
!=
internal_default_instance
())
if
(
this
!=
internal_default_instance
())
delete
selected_rows_
;
delete
selected_rows_
;
if
(
this
!=
internal_default_instance
())
delete
lod_tensor_
;
if
(
this
!=
internal_default_instance
())
if
(
this
!=
internal_default_instance
())
delete
tensor_array_
;
delete
lod_tensor_
;
if
(
this
!=
internal_default_instance
())
delete
reader_
;
if
(
this
!=
internal_default_instance
())
if
(
this
!=
internal_default_instance
())
delete
channel_
;
delete
tensor_array_
;
if
(
this
!=
internal_default_instance
())
delete
tuple_
;
if
(
this
!=
internal_default_instance
())
delete
reader_
;
if
(
this
!=
internal_default_instance
())
delete
channel_
;
if
(
this
!=
internal_default_instance
())
delete
tuple_
;
}
}
void
VarType
::
SetCachedSize
(
int
size
)
const
{
void
VarType
::
SetCachedSize
(
int
size
)
const
{
...
@@ -6096,8 +6074,7 @@ void VarType::Clear() {
...
@@ -6096,8 +6074,7 @@ void VarType::Clear() {
bool
VarType
::
MergePartialFromCodedStream
(
bool
VarType
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -6111,8 +6088,7 @@ bool VarType::MergePartialFromCodedStream(
...
@@ -6111,8 +6088,7 @@ bool VarType::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// required .paddle_mobile.framework.proto.VarType.Type type
// required .paddle_mobile.framework.proto.VarType.Type type
...
@@ -6125,7 +6101,8 @@ bool VarType::MergePartialFromCodedStream(
...
@@ -6125,7 +6101,8 @@ bool VarType::MergePartialFromCodedStream(
int
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_ENUM
>
(
int
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_ENUM
>
(
input
,
&
value
)));
input
,
&
value
)));
if
(
::
paddle_mobile
::
framework
::
proto
::
VarType_Type_IsValid
(
value
))
{
if
(
::
paddle_mobile
::
framework
::
proto
::
VarType_Type_IsValid
(
value
))
{
set_type
(
static_cast
<::
paddle_mobile
::
framework
::
proto
::
VarType_Type
>
(
set_type
(
static_cast
<::
paddle_mobile
::
framework
::
proto
::
VarType_Type
>
(
value
));
value
));
}
else
{
}
else
{
unknown_fields_stream
.
WriteVarint32
(
8u
);
unknown_fields_stream
.
WriteVarint32
(
8u
);
...
@@ -6144,8 +6121,8 @@ bool VarType::MergePartialFromCodedStream(
...
@@ -6144,8 +6121,8 @@ bool VarType::MergePartialFromCodedStream(
case
2
:
{
case
2
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
18u
/* 18 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
18u
/* 18 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
mutable_selected_rows
()));
ReadMessageNoVirtual
(
input
,
mutable_selected_rows
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -6158,8 +6135,8 @@ bool VarType::MergePartialFromCodedStream(
...
@@ -6158,8 +6135,8 @@ bool VarType::MergePartialFromCodedStream(
case
3
:
{
case
3
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
26u
/* 26 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
26u
/* 26 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
mutable_lod_tensor
()));
ReadMessageNoVirtual
(
input
,
mutable_lod_tensor
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -6172,8 +6149,8 @@ bool VarType::MergePartialFromCodedStream(
...
@@ -6172,8 +6149,8 @@ bool VarType::MergePartialFromCodedStream(
case
4
:
{
case
4
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
34u
/* 34 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
34u
/* 34 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
mutable_tensor_array
()));
ReadMessageNoVirtual
(
input
,
mutable_tensor_array
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -6186,8 +6163,8 @@ bool VarType::MergePartialFromCodedStream(
...
@@ -6186,8 +6163,8 @@ bool VarType::MergePartialFromCodedStream(
case
5
:
{
case
5
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
42u
/* 42 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
42u
/* 42 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
mutable_reader
()));
ReadMessageNoVirtual
(
input
,
mutable_reader
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -6201,8 +6178,8 @@ bool VarType::MergePartialFromCodedStream(
...
@@ -6201,8 +6178,8 @@ bool VarType::MergePartialFromCodedStream(
case
6
:
{
case
6
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
50u
/* 50 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
50u
/* 50 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
mutable_channel
()));
ReadMessageNoVirtual
(
input
,
mutable_channel
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -6214,8 +6191,8 @@ bool VarType::MergePartialFromCodedStream(
...
@@ -6214,8 +6191,8 @@ bool VarType::MergePartialFromCodedStream(
case
7
:
{
case
7
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
58u
/* 58 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
58u
/* 58 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
mutable_tuple
()));
ReadMessageNoVirtual
(
input
,
mutable_tuple
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -6440,41 +6417,33 @@ void VarType::MergeFrom(const VarType &from) {
...
@@ -6440,41 +6417,33 @@ void VarType::MergeFrom(const VarType &from) {
void
VarType
::
CopyFrom
(
const
VarType
&
from
)
{
void
VarType
::
CopyFrom
(
const
VarType
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarType)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
bool
VarType
::
IsInitialized
()
const
{
bool
VarType
::
IsInitialized
()
const
{
if
((
_has_bits_
[
0
]
&
0x00000040
)
!=
0x00000040
)
if
((
_has_bits_
[
0
]
&
0x00000040
)
!=
0x00000040
)
return
false
;
return
false
;
if
(
has_selected_rows
())
{
if
(
has_selected_rows
())
{
if
(
!
this
->
selected_rows_
->
IsInitialized
())
if
(
!
this
->
selected_rows_
->
IsInitialized
())
return
false
;
return
false
;
}
}
if
(
has_lod_tensor
())
{
if
(
has_lod_tensor
())
{
if
(
!
this
->
lod_tensor_
->
IsInitialized
())
if
(
!
this
->
lod_tensor_
->
IsInitialized
())
return
false
;
return
false
;
}
}
if
(
has_tensor_array
())
{
if
(
has_tensor_array
())
{
if
(
!
this
->
tensor_array_
->
IsInitialized
())
if
(
!
this
->
tensor_array_
->
IsInitialized
())
return
false
;
return
false
;
}
}
if
(
has_reader
())
{
if
(
has_reader
())
{
if
(
!
this
->
reader_
->
IsInitialized
())
if
(
!
this
->
reader_
->
IsInitialized
())
return
false
;
return
false
;
}
}
if
(
has_channel
())
{
if
(
has_channel
())
{
if
(
!
this
->
channel_
->
IsInitialized
())
if
(
!
this
->
channel_
->
IsInitialized
())
return
false
;
return
false
;
}
}
return
true
;
return
true
;
}
}
void
VarType
::
Swap
(
VarType
*
other
)
{
void
VarType
::
Swap
(
VarType
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
VarType
::
InternalSwap
(
VarType
*
other
)
{
void
VarType
::
InternalSwap
(
VarType
*
other
)
{
...
@@ -6691,8 +6660,8 @@ void VarType::clear_reader() {
...
@@ -6691,8 +6660,8 @@ void VarType::clear_reader() {
reader_
->::
paddle_mobile
::
framework
::
proto
::
VarType_ReaderDesc
::
Clear
();
reader_
->::
paddle_mobile
::
framework
::
proto
::
VarType_ReaderDesc
::
Clear
();
clear_has_reader
();
clear_has_reader
();
}
}
const
::
paddle_mobile
::
framework
::
proto
::
VarType_ReaderDesc
&
const
::
paddle_mobile
::
framework
::
proto
::
VarType_ReaderDesc
&
VarType
::
reader
()
VarType
::
reader
()
const
{
const
{
const
::
paddle_mobile
::
framework
::
proto
::
VarType_ReaderDesc
*
p
=
reader_
;
const
::
paddle_mobile
::
framework
::
proto
::
VarType_ReaderDesc
*
p
=
reader_
;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.reader)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.reader)
return
p
!=
NULL
return
p
!=
NULL
...
@@ -6741,8 +6710,8 @@ void VarType::clear_channel() {
...
@@ -6741,8 +6710,8 @@ void VarType::clear_channel() {
channel_
->::
paddle_mobile
::
framework
::
proto
::
VarType_ChannelDesc
::
Clear
();
channel_
->::
paddle_mobile
::
framework
::
proto
::
VarType_ChannelDesc
::
Clear
();
clear_has_channel
();
clear_has_channel
();
}
}
const
::
paddle_mobile
::
framework
::
proto
::
VarType_ChannelDesc
&
const
::
paddle_mobile
::
framework
::
proto
::
VarType_ChannelDesc
&
VarType
::
channel
()
VarType
::
channel
()
const
{
const
{
const
::
paddle_mobile
::
framework
::
proto
::
VarType_ChannelDesc
*
p
=
channel_
;
const
::
paddle_mobile
::
framework
::
proto
::
VarType_ChannelDesc
*
p
=
channel_
;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.channel)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.channel)
return
p
!=
NULL
return
p
!=
NULL
...
@@ -6846,8 +6815,10 @@ VarDesc::VarDesc()
...
@@ -6846,8 +6815,10 @@ VarDesc::VarDesc()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarDesc)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.VarDesc)
}
}
VarDesc
::
VarDesc
(
const
VarDesc
&
from
)
VarDesc
::
VarDesc
(
const
VarDesc
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
(
NULL
),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
name_
.
UnsafeSetDefault
(
name_
.
UnsafeSetDefault
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
...
@@ -6883,8 +6854,7 @@ VarDesc::~VarDesc() {
...
@@ -6883,8 +6854,7 @@ VarDesc::~VarDesc() {
void
VarDesc
::
SharedDtor
()
{
void
VarDesc
::
SharedDtor
()
{
name_
.
DestroyNoArena
(
name_
.
DestroyNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
if
(
this
!=
internal_default_instance
())
if
(
this
!=
internal_default_instance
())
delete
type_
;
delete
type_
;
}
}
void
VarDesc
::
SetCachedSize
(
int
size
)
const
{
void
VarDesc
::
SetCachedSize
(
int
size
)
const
{
...
@@ -6931,8 +6901,7 @@ void VarDesc::Clear() {
...
@@ -6931,8 +6901,7 @@ void VarDesc::Clear() {
bool
VarDesc
::
MergePartialFromCodedStream
(
bool
VarDesc
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -6946,8 +6915,7 @@ bool VarDesc::MergePartialFromCodedStream(
...
@@ -6946,8 +6915,7 @@ bool VarDesc::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// required string name = 1;
// required string name = 1;
...
@@ -6966,8 +6934,8 @@ bool VarDesc::MergePartialFromCodedStream(
...
@@ -6966,8 +6934,8 @@ bool VarDesc::MergePartialFromCodedStream(
case
2
:
{
case
2
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
18u
/* 18 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
18u
/* 18 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
mutable_type
()));
ReadMessageNoVirtual
(
input
,
mutable_type
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -7123,25 +7091,21 @@ void VarDesc::MergeFrom(const VarDesc &from) {
...
@@ -7123,25 +7091,21 @@ void VarDesc::MergeFrom(const VarDesc &from) {
void
VarDesc
::
CopyFrom
(
const
VarDesc
&
from
)
{
void
VarDesc
::
CopyFrom
(
const
VarDesc
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarDesc)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.VarDesc)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
bool
VarDesc
::
IsInitialized
()
const
{
bool
VarDesc
::
IsInitialized
()
const
{
if
((
_has_bits_
[
0
]
&
0x00000003
)
!=
0x00000003
)
if
((
_has_bits_
[
0
]
&
0x00000003
)
!=
0x00000003
)
return
false
;
return
false
;
if
(
has_type
())
{
if
(
has_type
())
{
if
(
!
this
->
type_
->
IsInitialized
())
if
(
!
this
->
type_
->
IsInitialized
())
return
false
;
return
false
;
}
}
return
true
;
return
true
;
}
}
void
VarDesc
::
Swap
(
VarDesc
*
other
)
{
void
VarDesc
::
Swap
(
VarDesc
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
VarDesc
::
InternalSwap
(
VarDesc
*
other
)
{
void
VarDesc
::
InternalSwap
(
VarDesc
*
other
)
{
...
@@ -7229,8 +7193,7 @@ bool VarDesc::has_type() const { return (_has_bits_[0] & 0x00000002u) != 0; }
...
@@ -7229,8 +7193,7 @@ bool VarDesc::has_type() const { return (_has_bits_[0] & 0x00000002u) != 0; }
void
VarDesc
::
set_has_type
()
{
_has_bits_
[
0
]
|=
0x00000002u
;
}
void
VarDesc
::
set_has_type
()
{
_has_bits_
[
0
]
|=
0x00000002u
;
}
void
VarDesc
::
clear_has_type
()
{
_has_bits_
[
0
]
&=
~
0x00000002u
;
}
void
VarDesc
::
clear_has_type
()
{
_has_bits_
[
0
]
&=
~
0x00000002u
;
}
void
VarDesc
::
clear_type
()
{
void
VarDesc
::
clear_type
()
{
if
(
type_
!=
NULL
)
if
(
type_
!=
NULL
)
type_
->::
paddle_mobile
::
framework
::
proto
::
VarType
::
Clear
();
type_
->::
paddle_mobile
::
framework
::
proto
::
VarType
::
Clear
();
clear_has_type
();
clear_has_type
();
}
}
const
::
paddle_mobile
::
framework
::
proto
::
VarType
&
VarDesc
::
type
()
const
{
const
::
paddle_mobile
::
framework
::
proto
::
VarType
&
VarDesc
::
type
()
const
{
...
@@ -7310,8 +7273,11 @@ BlockDesc::BlockDesc()
...
@@ -7310,8 +7273,11 @@ BlockDesc::BlockDesc()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.BlockDesc)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.BlockDesc)
}
}
BlockDesc
::
BlockDesc
(
const
BlockDesc
&
from
)
BlockDesc
::
BlockDesc
(
const
BlockDesc
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
vars_
(
from
.
vars_
),
_internal_metadata_
(
NULL
),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
vars_
(
from
.
vars_
),
ops_
(
from
.
ops_
)
{
ops_
(
from
.
ops_
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
::
memcpy
(
&
idx_
,
&
from
.
idx_
,
::
memcpy
(
&
idx_
,
&
from
.
idx_
,
...
@@ -7378,8 +7344,7 @@ void BlockDesc::Clear() {
...
@@ -7378,8 +7344,7 @@ void BlockDesc::Clear() {
bool
BlockDesc
::
MergePartialFromCodedStream
(
bool
BlockDesc
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -7393,8 +7358,7 @@ bool BlockDesc::MergePartialFromCodedStream(
...
@@ -7393,8 +7358,7 @@ bool BlockDesc::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// required int32 idx = 1;
// required int32 idx = 1;
...
@@ -7404,8 +7368,8 @@ bool BlockDesc::MergePartialFromCodedStream(
...
@@ -7404,8 +7368,8 @@ bool BlockDesc::MergePartialFromCodedStream(
set_has_idx
();
set_has_idx
();
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadPrimitive
<
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadPrimitive
<
::
google
::
protobuf
::
int32
,
::
google
::
protobuf
::
int32
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_INT32
>
(
input
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_INT32
>
(
&
idx_
)));
input
,
&
idx_
)));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -7431,8 +7395,8 @@ bool BlockDesc::MergePartialFromCodedStream(
...
@@ -7431,8 +7395,8 @@ bool BlockDesc::MergePartialFromCodedStream(
case
3
:
{
case
3
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
26u
/* 26 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
26u
/* 26 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
add_vars
()));
ReadMessageNoVirtual
(
input
,
add_vars
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -7443,8 +7407,8 @@ bool BlockDesc::MergePartialFromCodedStream(
...
@@ -7443,8 +7407,8 @@ bool BlockDesc::MergePartialFromCodedStream(
case
4
:
{
case
4
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
34u
/* 34 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
34u
/* 34 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
add_ops
()));
ReadMessageNoVirtual
(
input
,
add_ops
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -7634,15 +7598,13 @@ void BlockDesc::MergeFrom(const BlockDesc &from) {
...
@@ -7634,15 +7598,13 @@ void BlockDesc::MergeFrom(const BlockDesc &from) {
void
BlockDesc
::
CopyFrom
(
const
BlockDesc
&
from
)
{
void
BlockDesc
::
CopyFrom
(
const
BlockDesc
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.BlockDesc)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.BlockDesc)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
bool
BlockDesc
::
IsInitialized
()
const
{
bool
BlockDesc
::
IsInitialized
()
const
{
if
((
_has_bits_
[
0
]
&
0x00000003
)
!=
0x00000003
)
if
((
_has_bits_
[
0
]
&
0x00000003
)
!=
0x00000003
)
return
false
;
return
false
;
if
(
!::
google
::
protobuf
::
internal
::
AllAreInitialized
(
this
->
vars
()))
if
(
!::
google
::
protobuf
::
internal
::
AllAreInitialized
(
this
->
vars
()))
return
false
;
return
false
;
if
(
!::
google
::
protobuf
::
internal
::
AllAreInitialized
(
this
->
ops
()))
if
(
!::
google
::
protobuf
::
internal
::
AllAreInitialized
(
this
->
ops
()))
...
@@ -7651,8 +7613,7 @@ bool BlockDesc::IsInitialized() const {
...
@@ -7651,8 +7613,7 @@ bool BlockDesc::IsInitialized() const {
}
}
void
BlockDesc
::
Swap
(
BlockDesc
*
other
)
{
void
BlockDesc
::
Swap
(
BlockDesc
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
BlockDesc
::
InternalSwap
(
BlockDesc
*
other
)
{
void
BlockDesc
::
InternalSwap
(
BlockDesc
*
other
)
{
...
@@ -7715,8 +7676,8 @@ void BlockDesc::set_parent_idx(::google::protobuf::int32 value) {
...
@@ -7715,8 +7676,8 @@ void BlockDesc::set_parent_idx(::google::protobuf::int32 value) {
// repeated .paddle_mobile.framework.proto.VarDesc vars = 3;
// repeated .paddle_mobile.framework.proto.VarDesc vars = 3;
int
BlockDesc
::
vars_size
()
const
{
return
vars_
.
size
();
}
int
BlockDesc
::
vars_size
()
const
{
return
vars_
.
size
();
}
void
BlockDesc
::
clear_vars
()
{
vars_
.
Clear
();
}
void
BlockDesc
::
clear_vars
()
{
vars_
.
Clear
();
}
const
::
paddle_mobile
::
framework
::
proto
::
VarDesc
&
const
::
paddle_mobile
::
framework
::
proto
::
VarDesc
&
BlockDesc
::
vars
(
BlockDesc
::
vars
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.vars)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.vars)
return
vars_
.
Get
(
index
);
return
vars_
.
Get
(
index
);
}
}
...
@@ -7734,8 +7695,8 @@ BlockDesc::vars(int index) const {
...
@@ -7734,8 +7695,8 @@ BlockDesc::vars(int index) const {
return
&
vars_
;
return
&
vars_
;
}
}
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
VarDesc
>
&
::
paddle_mobile
::
framework
::
proto
::
VarDesc
>
BlockDesc
::
vars
()
const
{
&
BlockDesc
::
vars
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.vars)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.vars)
return
vars_
;
return
vars_
;
}
}
...
@@ -7743,8 +7704,8 @@ BlockDesc::vars() const {
...
@@ -7743,8 +7704,8 @@ BlockDesc::vars() const {
// repeated .paddle_mobile.framework.proto.OpDesc ops = 4;
// repeated .paddle_mobile.framework.proto.OpDesc ops = 4;
int
BlockDesc
::
ops_size
()
const
{
return
ops_
.
size
();
}
int
BlockDesc
::
ops_size
()
const
{
return
ops_
.
size
();
}
void
BlockDesc
::
clear_ops
()
{
ops_
.
Clear
();
}
void
BlockDesc
::
clear_ops
()
{
ops_
.
Clear
();
}
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc
&
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc
&
BlockDesc
::
ops
(
BlockDesc
::
ops
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.ops)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.ops)
return
ops_
.
Get
(
index
);
return
ops_
.
Get
(
index
);
}
}
...
@@ -7762,8 +7723,8 @@ BlockDesc::ops(int index) const {
...
@@ -7762,8 +7723,8 @@ BlockDesc::ops(int index) const {
return
&
ops_
;
return
&
ops_
;
}
}
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc
>
&
::
paddle_mobile
::
framework
::
proto
::
OpDesc
>
BlockDesc
::
ops
()
const
{
&
BlockDesc
::
ops
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.ops)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.ops)
return
ops_
;
return
ops_
;
}
}
...
@@ -7805,8 +7766,11 @@ ProgramDesc::ProgramDesc()
...
@@ -7805,8 +7766,11 @@ ProgramDesc::ProgramDesc()
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.ProgramDesc)
// @@protoc_insertion_point(constructor:paddle_mobile.framework.proto.ProgramDesc)
}
}
ProgramDesc
::
ProgramDesc
(
const
ProgramDesc
&
from
)
ProgramDesc
::
ProgramDesc
(
const
ProgramDesc
&
from
)
:
::
google
::
protobuf
::
MessageLite
(),
_internal_metadata_
(
NULL
),
:
::
google
::
protobuf
::
MessageLite
(),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
blocks_
(
from
.
blocks_
)
{
_internal_metadata_
(
NULL
),
_has_bits_
(
from
.
_has_bits_
),
_cached_size_
(
0
),
blocks_
(
from
.
blocks_
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.ProgramDesc)
// @@protoc_insertion_point(copy_constructor:paddle_mobile.framework.proto.ProgramDesc)
}
}
...
@@ -7852,8 +7816,7 @@ void ProgramDesc::Clear() {
...
@@ -7852,8 +7816,7 @@ void ProgramDesc::Clear() {
bool
ProgramDesc
::
MergePartialFromCodedStream
(
bool
ProgramDesc
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) \
#define DO_(EXPRESSION) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) \
if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
goto failure
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
uint32
tag
;
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
io
::
LazyStringOutputStream
unknown_fields_string
(
::
google
::
protobuf
::
NewPermanentCallback
(
::
google
::
protobuf
::
NewPermanentCallback
(
...
@@ -7867,8 +7830,7 @@ bool ProgramDesc::MergePartialFromCodedStream(
...
@@ -7867,8 +7830,7 @@ bool ProgramDesc::MergePartialFromCodedStream(
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
::
std
::
pair
<::
google
::
protobuf
::
uint32
,
bool
>
p
=
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
input
->
ReadTagWithCutoffNoLastTag
(
127u
);
tag
=
p
.
first
;
tag
=
p
.
first
;
if
(
!
p
.
second
)
if
(
!
p
.
second
)
goto
handle_unusual
;
goto
handle_unusual
;
switch
(
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// repeated .paddle_mobile.framework.proto.BlockDesc blocks
// repeated .paddle_mobile.framework.proto.BlockDesc blocks
...
@@ -7876,8 +7838,8 @@ bool ProgramDesc::MergePartialFromCodedStream(
...
@@ -7876,8 +7838,8 @@ bool ProgramDesc::MergePartialFromCodedStream(
case
1
:
{
case
1
:
{
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
if
(
static_cast
<::
google
::
protobuf
::
uint8
>
(
tag
)
==
static_cast
<::
google
::
protobuf
::
uint8
>
(
10u
/* 10 & 0xFF */
))
{
static_cast
<::
google
::
protobuf
::
uint8
>
(
10u
/* 10 & 0xFF */
))
{
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadMessageNoVirtual
(
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
input
,
add_blocks
()));
ReadMessageNoVirtual
(
input
,
add_blocks
()));
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
...
@@ -7964,8 +7926,7 @@ void ProgramDesc::MergeFrom(const ProgramDesc &from) {
...
@@ -7964,8 +7926,7 @@ void ProgramDesc::MergeFrom(const ProgramDesc &from) {
void
ProgramDesc
::
CopyFrom
(
const
ProgramDesc
&
from
)
{
void
ProgramDesc
::
CopyFrom
(
const
ProgramDesc
&
from
)
{
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.ProgramDesc)
// @@protoc_insertion_point(class_specific_copy_from_start:paddle_mobile.framework.proto.ProgramDesc)
if
(
&
from
==
this
)
if
(
&
from
==
this
)
return
;
return
;
Clear
();
Clear
();
MergeFrom
(
from
);
MergeFrom
(
from
);
}
}
...
@@ -7977,8 +7938,7 @@ bool ProgramDesc::IsInitialized() const {
...
@@ -7977,8 +7938,7 @@ bool ProgramDesc::IsInitialized() const {
}
}
void
ProgramDesc
::
Swap
(
ProgramDesc
*
other
)
{
void
ProgramDesc
::
Swap
(
ProgramDesc
*
other
)
{
if
(
other
==
this
)
if
(
other
==
this
)
return
;
return
;
InternalSwap
(
other
);
InternalSwap
(
other
);
}
}
void
ProgramDesc
::
InternalSwap
(
ProgramDesc
*
other
)
{
void
ProgramDesc
::
InternalSwap
(
ProgramDesc
*
other
)
{
...
@@ -7999,13 +7959,13 @@ void ProgramDesc::InternalSwap(ProgramDesc *other) {
...
@@ -7999,13 +7959,13 @@ void ProgramDesc::InternalSwap(ProgramDesc *other) {
// repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1;
// repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1;
int
ProgramDesc
::
blocks_size
()
const
{
return
blocks_
.
size
();
}
int
ProgramDesc
::
blocks_size
()
const
{
return
blocks_
.
size
();
}
void
ProgramDesc
::
clear_blocks
()
{
blocks_
.
Clear
();
}
void
ProgramDesc
::
clear_blocks
()
{
blocks_
.
Clear
();
}
const
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
&
const
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
&
ProgramDesc
::
blocks
(
ProgramDesc
::
blocks
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.ProgramDesc.blocks)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.ProgramDesc.blocks)
return
blocks_
.
Get
(
index
);
return
blocks_
.
Get
(
index
);
}
}
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
*
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
*
ProgramDesc
::
mutable_blocks
(
ProgramDesc
::
mutable_blocks
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.ProgramDesc.blocks)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.ProgramDesc.blocks)
return
blocks_
.
Mutable
(
index
);
return
blocks_
.
Mutable
(
index
);
}
}
...
@@ -8014,14 +7974,14 @@ ProgramDesc::mutable_blocks(int index) {
...
@@ -8014,14 +7974,14 @@ ProgramDesc::mutable_blocks(int index) {
return
blocks_
.
Add
();
return
blocks_
.
Add
();
}
}
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
>
*
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
>
ProgramDesc
::
mutable_blocks
()
{
*
ProgramDesc
::
mutable_blocks
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.ProgramDesc.blocks)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.ProgramDesc.blocks)
return
&
blocks_
;
return
&
blocks_
;
}
}
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
>
&
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
>
ProgramDesc
::
blocks
()
const
{
&
ProgramDesc
::
blocks
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.ProgramDesc.blocks)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.ProgramDesc.blocks)
return
blocks_
;
return
blocks_
;
}
}
...
...
src/framework/framework.pb.h
浏览文件 @
7cc864ea
...
@@ -160,7 +160,7 @@ class OpDesc_Attr
...
@@ -160,7 +160,7 @@ class OpDesc_Attr
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc.Attr)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc.Attr)
*/
*/
{
{
public:
public:
OpDesc_Attr
();
OpDesc_Attr
();
virtual
~
OpDesc_Attr
();
virtual
~
OpDesc_Attr
();
...
@@ -177,8 +177,7 @@ public:
...
@@ -177,8 +177,7 @@ public:
inline
OpDesc_Attr
&
operator
=
(
OpDesc_Attr
&&
from
)
noexcept
{
inline
OpDesc_Attr
&
operator
=
(
OpDesc_Attr
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -224,17 +223,17 @@ public:
...
@@ -224,17 +223,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
OpDesc_Attr
*
other
);
void
InternalSwap
(
OpDesc_Attr
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -250,8 +249,8 @@ public:
...
@@ -250,8 +249,8 @@ public:
::
google
::
protobuf
::
int32
ints
(
int
index
)
const
;
::
google
::
protobuf
::
int32
ints
(
int
index
)
const
;
void
set_ints
(
int
index
,
::
google
::
protobuf
::
int32
value
);
void
set_ints
(
int
index
,
::
google
::
protobuf
::
int32
value
);
void
add_ints
(
::
google
::
protobuf
::
int32
value
);
void
add_ints
(
::
google
::
protobuf
::
int32
value
);
const
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int32
>
&
const
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int32
>
&
ints
()
ints
()
const
;
const
;
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int32
>
*
mutable_ints
();
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int32
>
*
mutable_ints
();
// repeated float floats = 7;
// repeated float floats = 7;
...
@@ -369,7 +368,7 @@ public:
...
@@ -369,7 +368,7 @@ public:
void
set_block_idx
(
::
google
::
protobuf
::
int32
value
);
void
set_block_idx
(
::
google
::
protobuf
::
int32
value
);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc.Attr)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc.Attr)
private:
private:
void
set_has_name
();
void
set_has_name
();
void
clear_has_name
();
void
clear_has_name
();
void
set_has_type
();
void
set_has_type
();
...
@@ -415,7 +414,7 @@ class OpDesc_Var
...
@@ -415,7 +414,7 @@ class OpDesc_Var
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc.Var)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc.Var)
*/
*/
{
{
public:
public:
OpDesc_Var
();
OpDesc_Var
();
virtual
~
OpDesc_Var
();
virtual
~
OpDesc_Var
();
...
@@ -432,8 +431,7 @@ public:
...
@@ -432,8 +431,7 @@ public:
inline
OpDesc_Var
&
operator
=
(
OpDesc_Var
&&
from
)
noexcept
{
inline
OpDesc_Var
&
operator
=
(
OpDesc_Var
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -478,17 +476,17 @@ public:
...
@@ -478,17 +476,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
OpDesc_Var
*
other
);
void
InternalSwap
(
OpDesc_Var
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -535,7 +533,7 @@ public:
...
@@ -535,7 +533,7 @@ public:
void
set_allocated_parameter
(
::
std
::
string
*
parameter
);
void
set_allocated_parameter
(
::
std
::
string
*
parameter
);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc.Var)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc.Var)
private:
private:
void
set_has_parameter
();
void
set_has_parameter
();
void
clear_has_parameter
();
void
clear_has_parameter
();
...
@@ -554,7 +552,7 @@ class OpDesc
...
@@ -554,7 +552,7 @@ class OpDesc
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpDesc)
*/
*/
{
{
public:
public:
OpDesc
();
OpDesc
();
virtual
~
OpDesc
();
virtual
~
OpDesc
();
...
@@ -569,8 +567,7 @@ public:
...
@@ -569,8 +567,7 @@ public:
inline
OpDesc
&
operator
=
(
OpDesc
&&
from
)
noexcept
{
inline
OpDesc
&
operator
=
(
OpDesc
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -615,17 +612,17 @@ public:
...
@@ -615,17 +612,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
OpDesc
*
other
);
void
InternalSwap
(
OpDesc
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -646,11 +643,11 @@ public:
...
@@ -646,11 +643,11 @@ public:
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
mutable_inputs
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
mutable_inputs
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
add_inputs
();
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
add_inputs
();
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
mutable_inputs
();
*
mutable_inputs
();
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
&
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
inputs
()
const
;
&
inputs
()
const
;
// repeated .paddle_mobile.framework.proto.OpDesc.Var outputs =
// repeated .paddle_mobile.framework.proto.OpDesc.Var outputs =
// 2;
// 2;
...
@@ -661,11 +658,11 @@ public:
...
@@ -661,11 +658,11 @@ public:
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
mutable_outputs
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
mutable_outputs
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
add_outputs
();
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
add_outputs
();
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
mutable_outputs
();
*
mutable_outputs
();
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
&
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
outputs
()
const
;
&
outputs
()
const
;
// repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs =
// repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs =
// 4;
// 4;
...
@@ -676,11 +673,11 @@ public:
...
@@ -676,11 +673,11 @@ public:
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
*
mutable_attrs
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
*
mutable_attrs
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
*
add_attrs
();
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
*
add_attrs
();
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
>
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
>
mutable_attrs
();
*
mutable_attrs
();
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
>
&
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
>
attrs
()
const
;
&
attrs
()
const
;
// required string type = 3;
// required string type = 3;
bool
has_type
()
const
;
bool
has_type
()
const
;
...
@@ -705,7 +702,7 @@ public:
...
@@ -705,7 +702,7 @@ public:
void
set_is_target
(
bool
value
);
void
set_is_target
(
bool
value
);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpDesc)
private:
private:
void
set_has_type
();
void
set_has_type
();
void
clear_has_type
();
void
clear_has_type
();
void
set_has_is_target
();
void
set_has_is_target
();
...
@@ -735,7 +732,7 @@ class OpProto_Var
...
@@ -735,7 +732,7 @@ class OpProto_Var
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto.Var)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto.Var)
*/
*/
{
{
public:
public:
OpProto_Var
();
OpProto_Var
();
virtual
~
OpProto_Var
();
virtual
~
OpProto_Var
();
...
@@ -752,8 +749,7 @@ public:
...
@@ -752,8 +749,7 @@ public:
inline
OpProto_Var
&
operator
=
(
OpProto_Var
&&
from
)
noexcept
{
inline
OpProto_Var
&
operator
=
(
OpProto_Var
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -799,17 +795,17 @@ public:
...
@@ -799,17 +795,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
OpProto_Var
*
other
);
void
InternalSwap
(
OpProto_Var
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -870,7 +866,7 @@ public:
...
@@ -870,7 +866,7 @@ public:
void
set_dispensable
(
bool
value
);
void
set_dispensable
(
bool
value
);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto.Var)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto.Var)
private:
private:
void
set_has_name
();
void
set_has_name
();
void
clear_has_name
();
void
clear_has_name
();
void
set_has_comment
();
void
set_has_comment
();
...
@@ -903,7 +899,7 @@ class OpProto_Attr
...
@@ -903,7 +899,7 @@ class OpProto_Attr
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto.Attr)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto.Attr)
*/
*/
{
{
public:
public:
OpProto_Attr
();
OpProto_Attr
();
virtual
~
OpProto_Attr
();
virtual
~
OpProto_Attr
();
...
@@ -920,8 +916,7 @@ public:
...
@@ -920,8 +916,7 @@ public:
inline
OpProto_Attr
&
operator
=
(
OpProto_Attr
&&
from
)
noexcept
{
inline
OpProto_Attr
&
operator
=
(
OpProto_Attr
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -967,17 +962,17 @@ public:
...
@@ -967,17 +962,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
OpProto_Attr
*
other
);
void
InternalSwap
(
OpProto_Attr
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -1031,7 +1026,7 @@ public:
...
@@ -1031,7 +1026,7 @@ public:
void
set_generated
(
bool
value
);
void
set_generated
(
bool
value
);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto.Attr)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto.Attr)
private:
private:
void
set_has_name
();
void
set_has_name
();
void
clear_has_name
();
void
clear_has_name
();
void
set_has_type
();
void
set_has_type
();
...
@@ -1061,7 +1056,7 @@ class OpProto
...
@@ -1061,7 +1056,7 @@ class OpProto
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.OpProto)
*/
*/
{
{
public:
public:
OpProto
();
OpProto
();
virtual
~
OpProto
();
virtual
~
OpProto
();
...
@@ -1076,8 +1071,7 @@ public:
...
@@ -1076,8 +1071,7 @@ public:
inline
OpProto
&
operator
=
(
OpProto
&&
from
)
noexcept
{
inline
OpProto
&
operator
=
(
OpProto
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -1122,17 +1116,17 @@ public:
...
@@ -1122,17 +1116,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
OpProto
*
other
);
void
InternalSwap
(
OpProto
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -1153,27 +1147,27 @@ public:
...
@@ -1153,27 +1147,27 @@ public:
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
mutable_inputs
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
mutable_inputs
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
add_inputs
();
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
add_inputs
();
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
*
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
mutable_inputs
();
*
mutable_inputs
();
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
&
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
inputs
()
const
;
&
inputs
()
const
;
// repeated .paddle_mobile.framework.proto.OpProto.Var outputs =
// repeated .paddle_mobile.framework.proto.OpProto.Var outputs =
// 3;
// 3;
int
outputs_size
()
const
;
int
outputs_size
()
const
;
void
clear_outputs
();
void
clear_outputs
();
static
const
int
kOutputsFieldNumber
=
3
;
static
const
int
kOutputsFieldNumber
=
3
;
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
&
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
&
outputs
(
outputs
(
int
index
)
const
;
int
index
)
const
;
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
mutable_outputs
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
mutable_outputs
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
add_outputs
();
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
add_outputs
();
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
*
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
mutable_outputs
();
*
mutable_outputs
();
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
&
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
outputs
()
const
;
&
outputs
()
const
;
// repeated .paddle_mobile.framework.proto.OpProto.Attr attrs =
// repeated .paddle_mobile.framework.proto.OpProto.Attr attrs =
// 4;
// 4;
...
@@ -1184,11 +1178,11 @@ public:
...
@@ -1184,11 +1178,11 @@ public:
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
*
mutable_attrs
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
*
mutable_attrs
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
*
add_attrs
();
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
*
add_attrs
();
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
>
*
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
>
mutable_attrs
();
*
mutable_attrs
();
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
>
&
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
>
attrs
()
const
;
&
attrs
()
const
;
// required string type = 1;
// required string type = 1;
bool
has_type
()
const
;
bool
has_type
()
const
;
...
@@ -1221,7 +1215,7 @@ public:
...
@@ -1221,7 +1215,7 @@ public:
void
set_allocated_comment
(
::
std
::
string
*
comment
);
void
set_allocated_comment
(
::
std
::
string
*
comment
);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.OpProto)
private:
private:
void
set_has_type
();
void
set_has_type
();
void
clear_has_type
();
void
clear_has_type
();
void
set_has_comment
();
void
set_has_comment
();
...
@@ -1254,7 +1248,7 @@ class VarType_TensorDesc
...
@@ -1254,7 +1248,7 @@ class VarType_TensorDesc
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.TensorDesc)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.TensorDesc)
*/
*/
{
{
public:
public:
VarType_TensorDesc
();
VarType_TensorDesc
();
virtual
~
VarType_TensorDesc
();
virtual
~
VarType_TensorDesc
();
...
@@ -1272,8 +1266,7 @@ public:
...
@@ -1272,8 +1266,7 @@ public:
inline
VarType_TensorDesc
&
operator
=
(
VarType_TensorDesc
&&
from
)
noexcept
{
inline
VarType_TensorDesc
&
operator
=
(
VarType_TensorDesc
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -1303,8 +1296,8 @@ public:
...
@@ -1303,8 +1296,8 @@ public:
inline
VarType_TensorDesc
*
New
()
const
PROTOBUF_FINAL
{
return
New
(
NULL
);
}
inline
VarType_TensorDesc
*
New
()
const
PROTOBUF_FINAL
{
return
New
(
NULL
);
}
VarType_TensorDesc
*
VarType_TensorDesc
*
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
PROTOBUF_FINAL
;
PROTOBUF_FINAL
;
void
CheckTypeAndMergeFrom
(
const
::
google
::
protobuf
::
MessageLite
&
from
)
void
CheckTypeAndMergeFrom
(
const
::
google
::
protobuf
::
MessageLite
&
from
)
PROTOBUF_FINAL
;
PROTOBUF_FINAL
;
void
CopyFrom
(
const
VarType_TensorDesc
&
from
);
void
CopyFrom
(
const
VarType_TensorDesc
&
from
);
...
@@ -1320,17 +1313,17 @@ public:
...
@@ -1320,17 +1313,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
VarType_TensorDesc
*
other
);
void
InternalSwap
(
VarType_TensorDesc
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -1346,8 +1339,8 @@ public:
...
@@ -1346,8 +1339,8 @@ public:
::
google
::
protobuf
::
int64
dims
(
int
index
)
const
;
::
google
::
protobuf
::
int64
dims
(
int
index
)
const
;
void
set_dims
(
int
index
,
::
google
::
protobuf
::
int64
value
);
void
set_dims
(
int
index
,
::
google
::
protobuf
::
int64
value
);
void
add_dims
(
::
google
::
protobuf
::
int64
value
);
void
add_dims
(
::
google
::
protobuf
::
int64
value
);
const
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int64
>
&
const
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int64
>
&
dims
()
dims
()
const
;
const
;
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int64
>
*
mutable_dims
();
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int64
>
*
mutable_dims
();
// required .paddle_mobile.framework.proto.VarType.Type
// required .paddle_mobile.framework.proto.VarType.Type
...
@@ -1359,7 +1352,7 @@ public:
...
@@ -1359,7 +1352,7 @@ public:
void
set_data_type
(
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
value
);
void
set_data_type
(
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
value
);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.TensorDesc)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.TensorDesc)
private:
private:
void
set_has_data_type
();
void
set_has_data_type
();
void
clear_has_data_type
();
void
clear_has_data_type
();
...
@@ -1378,7 +1371,7 @@ class VarType_LoDTensorDesc
...
@@ -1378,7 +1371,7 @@ class VarType_LoDTensorDesc
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
*/
*/
{
{
public:
public:
VarType_LoDTensorDesc
();
VarType_LoDTensorDesc
();
virtual
~
VarType_LoDTensorDesc
();
virtual
~
VarType_LoDTensorDesc
();
...
@@ -1394,11 +1387,10 @@ public:
...
@@ -1394,11 +1387,10 @@ public:
*
this
=
::
std
::
move
(
from
);
*
this
=
::
std
::
move
(
from
);
}
}
inline
VarType_LoDTensorDesc
&
inline
VarType_LoDTensorDesc
&
operator
=
(
operator
=
(
VarType_LoDTensorDesc
&&
from
)
noexcept
{
VarType_LoDTensorDesc
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -1430,8 +1422,8 @@ public:
...
@@ -1430,8 +1422,8 @@ public:
inline
VarType_LoDTensorDesc
*
New
()
const
PROTOBUF_FINAL
{
return
New
(
NULL
);
}
inline
VarType_LoDTensorDesc
*
New
()
const
PROTOBUF_FINAL
{
return
New
(
NULL
);
}
VarType_LoDTensorDesc
*
VarType_LoDTensorDesc
*
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
PROTOBUF_FINAL
;
PROTOBUF_FINAL
;
void
CheckTypeAndMergeFrom
(
const
::
google
::
protobuf
::
MessageLite
&
from
)
void
CheckTypeAndMergeFrom
(
const
::
google
::
protobuf
::
MessageLite
&
from
)
PROTOBUF_FINAL
;
PROTOBUF_FINAL
;
void
CopyFrom
(
const
VarType_LoDTensorDesc
&
from
);
void
CopyFrom
(
const
VarType_LoDTensorDesc
&
from
);
...
@@ -1447,17 +1439,17 @@ public:
...
@@ -1447,17 +1439,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
VarType_LoDTensorDesc
*
other
);
void
InternalSwap
(
VarType_LoDTensorDesc
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -1485,7 +1477,7 @@ public:
...
@@ -1485,7 +1477,7 @@ public:
void
set_lod_level
(
::
google
::
protobuf
::
int32
value
);
void
set_lod_level
(
::
google
::
protobuf
::
int32
value
);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.LoDTensorDesc)
private:
private:
void
set_has_tensor
();
void
set_has_tensor
();
void
clear_has_tensor
();
void
clear_has_tensor
();
void
set_has_lod_level
();
void
set_has_lod_level
();
...
@@ -1506,14 +1498,14 @@ class VarType_LoDTensorArrayDesc
...
@@ -1506,14 +1498,14 @@ class VarType_LoDTensorArrayDesc
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc)
*/
*/
{
{
public:
public:
VarType_LoDTensorArrayDesc
();
VarType_LoDTensorArrayDesc
();
virtual
~
VarType_LoDTensorArrayDesc
();
virtual
~
VarType_LoDTensorArrayDesc
();
VarType_LoDTensorArrayDesc
(
const
VarType_LoDTensorArrayDesc
&
from
);
VarType_LoDTensorArrayDesc
(
const
VarType_LoDTensorArrayDesc
&
from
);
inline
VarType_LoDTensorArrayDesc
&
inline
VarType_LoDTensorArrayDesc
&
operator
=
(
operator
=
(
const
VarType_LoDTensorArrayDesc
&
from
)
{
const
VarType_LoDTensorArrayDesc
&
from
)
{
CopyFrom
(
from
);
CopyFrom
(
from
);
return
*
this
;
return
*
this
;
}
}
...
@@ -1523,11 +1515,10 @@ public:
...
@@ -1523,11 +1515,10 @@ public:
*
this
=
::
std
::
move
(
from
);
*
this
=
::
std
::
move
(
from
);
}
}
inline
VarType_LoDTensorArrayDesc
&
inline
VarType_LoDTensorArrayDesc
&
operator
=
(
operator
=
(
VarType_LoDTensorArrayDesc
&&
from
)
noexcept
{
VarType_LoDTensorArrayDesc
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -1562,8 +1553,8 @@ public:
...
@@ -1562,8 +1553,8 @@ public:
return
New
(
NULL
);
return
New
(
NULL
);
}
}
VarType_LoDTensorArrayDesc
*
VarType_LoDTensorArrayDesc
*
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
PROTOBUF_FINAL
;
PROTOBUF_FINAL
;
void
CheckTypeAndMergeFrom
(
const
::
google
::
protobuf
::
MessageLite
&
from
)
void
CheckTypeAndMergeFrom
(
const
::
google
::
protobuf
::
MessageLite
&
from
)
PROTOBUF_FINAL
;
PROTOBUF_FINAL
;
void
CopyFrom
(
const
VarType_LoDTensorArrayDesc
&
from
);
void
CopyFrom
(
const
VarType_LoDTensorArrayDesc
&
from
);
...
@@ -1579,17 +1570,17 @@ public:
...
@@ -1579,17 +1570,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
VarType_LoDTensorArrayDesc
*
other
);
void
InternalSwap
(
VarType_LoDTensorArrayDesc
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -1617,7 +1608,7 @@ public:
...
@@ -1617,7 +1608,7 @@ public:
void
set_lod_level
(
::
google
::
protobuf
::
int32
value
);
void
set_lod_level
(
::
google
::
protobuf
::
int32
value
);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc)
private:
private:
void
set_has_tensor
();
void
set_has_tensor
();
void
clear_has_tensor
();
void
clear_has_tensor
();
void
set_has_lod_level
();
void
set_has_lod_level
();
...
@@ -1638,7 +1629,7 @@ class VarType_ReaderDesc
...
@@ -1638,7 +1629,7 @@ class VarType_ReaderDesc
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.ReaderDesc)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.ReaderDesc)
*/
*/
{
{
public:
public:
VarType_ReaderDesc
();
VarType_ReaderDesc
();
virtual
~
VarType_ReaderDesc
();
virtual
~
VarType_ReaderDesc
();
...
@@ -1656,8 +1647,7 @@ public:
...
@@ -1656,8 +1647,7 @@ public:
inline
VarType_ReaderDesc
&
operator
=
(
VarType_ReaderDesc
&&
from
)
noexcept
{
inline
VarType_ReaderDesc
&
operator
=
(
VarType_ReaderDesc
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -1687,8 +1677,8 @@ public:
...
@@ -1687,8 +1677,8 @@ public:
inline
VarType_ReaderDesc
*
New
()
const
PROTOBUF_FINAL
{
return
New
(
NULL
);
}
inline
VarType_ReaderDesc
*
New
()
const
PROTOBUF_FINAL
{
return
New
(
NULL
);
}
VarType_ReaderDesc
*
VarType_ReaderDesc
*
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
PROTOBUF_FINAL
;
PROTOBUF_FINAL
;
void
CheckTypeAndMergeFrom
(
const
::
google
::
protobuf
::
MessageLite
&
from
)
void
CheckTypeAndMergeFrom
(
const
::
google
::
protobuf
::
MessageLite
&
from
)
PROTOBUF_FINAL
;
PROTOBUF_FINAL
;
void
CopyFrom
(
const
VarType_ReaderDesc
&
from
);
void
CopyFrom
(
const
VarType_ReaderDesc
&
from
);
...
@@ -1704,17 +1694,17 @@ public:
...
@@ -1704,17 +1694,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
VarType_ReaderDesc
*
other
);
void
InternalSwap
(
VarType_ReaderDesc
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -1729,20 +1719,20 @@ public:
...
@@ -1729,20 +1719,20 @@ public:
int
lod_tensor_size
()
const
;
int
lod_tensor_size
()
const
;
void
clear_lod_tensor
();
void
clear_lod_tensor
();
static
const
int
kLodTensorFieldNumber
=
1
;
static
const
int
kLodTensorFieldNumber
=
1
;
const
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
&
const
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
&
lod_tensor
(
lod_tensor
(
int
index
)
const
;
int
index
)
const
;
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
*
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
*
mutable_lod_tensor
(
mutable_lod_tensor
(
int
index
);
int
index
);
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
*
add_lod_tensor
();
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
*
add_lod_tensor
();
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
>
*
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
>
mutable_lod_tensor
();
*
mutable_lod_tensor
();
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
>
&
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
>
lod_tensor
()
const
;
&
lod_tensor
()
const
;
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.ReaderDesc)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.ReaderDesc)
private:
private:
::
google
::
protobuf
::
internal
::
InternalMetadataWithArenaLite
::
google
::
protobuf
::
internal
::
InternalMetadataWithArenaLite
_internal_metadata_
;
_internal_metadata_
;
::
google
::
protobuf
::
internal
::
HasBits
<
1
>
_has_bits_
;
::
google
::
protobuf
::
internal
::
HasBits
<
1
>
_has_bits_
;
...
@@ -1759,7 +1749,7 @@ class VarType_ChannelDesc
...
@@ -1759,7 +1749,7 @@ class VarType_ChannelDesc
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.ChannelDesc)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.ChannelDesc)
*/
*/
{
{
public:
public:
VarType_ChannelDesc
();
VarType_ChannelDesc
();
virtual
~
VarType_ChannelDesc
();
virtual
~
VarType_ChannelDesc
();
...
@@ -1777,8 +1767,7 @@ public:
...
@@ -1777,8 +1767,7 @@ public:
inline
VarType_ChannelDesc
&
operator
=
(
VarType_ChannelDesc
&&
from
)
noexcept
{
inline
VarType_ChannelDesc
&
operator
=
(
VarType_ChannelDesc
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -1810,8 +1799,8 @@ public:
...
@@ -1810,8 +1799,8 @@ public:
inline
VarType_ChannelDesc
*
New
()
const
PROTOBUF_FINAL
{
return
New
(
NULL
);
}
inline
VarType_ChannelDesc
*
New
()
const
PROTOBUF_FINAL
{
return
New
(
NULL
);
}
VarType_ChannelDesc
*
VarType_ChannelDesc
*
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
New
(
::
google
::
protobuf
::
Arena
*
arena
)
const
PROTOBUF_FINAL
;
PROTOBUF_FINAL
;
void
CheckTypeAndMergeFrom
(
const
::
google
::
protobuf
::
MessageLite
&
from
)
void
CheckTypeAndMergeFrom
(
const
::
google
::
protobuf
::
MessageLite
&
from
)
PROTOBUF_FINAL
;
PROTOBUF_FINAL
;
void
CopyFrom
(
const
VarType_ChannelDesc
&
from
);
void
CopyFrom
(
const
VarType_ChannelDesc
&
from
);
...
@@ -1827,17 +1816,17 @@ public:
...
@@ -1827,17 +1816,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
VarType_ChannelDesc
*
other
);
void
InternalSwap
(
VarType_ChannelDesc
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -1862,7 +1851,7 @@ public:
...
@@ -1862,7 +1851,7 @@ public:
void
set_data_type
(
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
value
);
void
set_data_type
(
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
value
);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.ChannelDesc)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.ChannelDesc)
private:
private:
void
set_has_data_type
();
void
set_has_data_type
();
void
clear_has_data_type
();
void
clear_has_data_type
();
void
set_has_capacity
();
void
set_has_capacity
();
...
@@ -1886,7 +1875,7 @@ class VarType_Tuple
...
@@ -1886,7 +1875,7 @@ class VarType_Tuple
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.Tuple)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType.Tuple)
*/
*/
{
{
public:
public:
VarType_Tuple
();
VarType_Tuple
();
virtual
~
VarType_Tuple
();
virtual
~
VarType_Tuple
();
...
@@ -1903,8 +1892,7 @@ public:
...
@@ -1903,8 +1892,7 @@ public:
inline
VarType_Tuple
&
operator
=
(
VarType_Tuple
&&
from
)
noexcept
{
inline
VarType_Tuple
&
operator
=
(
VarType_Tuple
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -1950,17 +1938,17 @@ public:
...
@@ -1950,17 +1938,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
VarType_Tuple
*
other
);
void
InternalSwap
(
VarType_Tuple
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -1982,7 +1970,7 @@ public:
...
@@ -1982,7 +1970,7 @@ public:
::
google
::
protobuf
::
RepeatedField
<
int
>
*
mutable_element_type
();
::
google
::
protobuf
::
RepeatedField
<
int
>
*
mutable_element_type
();
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.Tuple)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType.Tuple)
private:
private:
::
google
::
protobuf
::
internal
::
InternalMetadataWithArenaLite
::
google
::
protobuf
::
internal
::
InternalMetadataWithArenaLite
_internal_metadata_
;
_internal_metadata_
;
::
google
::
protobuf
::
internal
::
HasBits
<
1
>
_has_bits_
;
::
google
::
protobuf
::
internal
::
HasBits
<
1
>
_has_bits_
;
...
@@ -1997,7 +1985,7 @@ class VarType
...
@@ -1997,7 +1985,7 @@ class VarType
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarType)
*/
*/
{
{
public:
public:
VarType
();
VarType
();
virtual
~
VarType
();
virtual
~
VarType
();
...
@@ -2012,8 +2000,7 @@ public:
...
@@ -2012,8 +2000,7 @@ public:
inline
VarType
&
operator
=
(
VarType
&&
from
)
noexcept
{
inline
VarType
&
operator
=
(
VarType
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -2058,17 +2045,17 @@ public:
...
@@ -2058,17 +2045,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
VarType
*
other
);
void
InternalSwap
(
VarType
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -2117,8 +2104,8 @@ public:
...
@@ -2117,8 +2104,8 @@ public:
bool
has_selected_rows
()
const
;
bool
has_selected_rows
()
const
;
void
clear_selected_rows
();
void
clear_selected_rows
();
static
const
int
kSelectedRowsFieldNumber
=
2
;
static
const
int
kSelectedRowsFieldNumber
=
2
;
const
::
paddle_mobile
::
framework
::
proto
::
VarType_TensorDesc
&
const
::
paddle_mobile
::
framework
::
proto
::
VarType_TensorDesc
&
selected_rows
()
selected_rows
()
const
;
const
;
::
paddle_mobile
::
framework
::
proto
::
VarType_TensorDesc
*
::
paddle_mobile
::
framework
::
proto
::
VarType_TensorDesc
*
mutable_selected_rows
();
mutable_selected_rows
();
::
paddle_mobile
::
framework
::
proto
::
VarType_TensorDesc
*
::
paddle_mobile
::
framework
::
proto
::
VarType_TensorDesc
*
...
@@ -2132,8 +2119,8 @@ public:
...
@@ -2132,8 +2119,8 @@ public:
bool
has_lod_tensor
()
const
;
bool
has_lod_tensor
()
const
;
void
clear_lod_tensor
();
void
clear_lod_tensor
();
static
const
int
kLodTensorFieldNumber
=
3
;
static
const
int
kLodTensorFieldNumber
=
3
;
const
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
&
const
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
&
lod_tensor
()
lod_tensor
()
const
;
const
;
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
*
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
*
mutable_lod_tensor
();
mutable_lod_tensor
();
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
*
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
*
...
@@ -2187,8 +2174,8 @@ public:
...
@@ -2187,8 +2174,8 @@ public:
const
::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
&
tuple
()
const
;
const
::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
&
tuple
()
const
;
::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
*
mutable_tuple
();
::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
*
mutable_tuple
();
::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
*
release_tuple
();
::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
*
release_tuple
();
void
void
set_allocated_tuple
(
set_allocated_tuple
(
::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
*
tuple
);
::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
*
tuple
);
// required .paddle_mobile.framework.proto.VarType.Type type =
// required .paddle_mobile.framework.proto.VarType.Type type =
// 1;
// 1;
...
@@ -2199,7 +2186,7 @@ public:
...
@@ -2199,7 +2186,7 @@ public:
void
set_type
(
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
value
);
void
set_type
(
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
value
);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarType)
private:
private:
void
set_has_type
();
void
set_has_type
();
void
clear_has_type
();
void
clear_has_type
();
void
set_has_selected_rows
();
void
set_has_selected_rows
();
...
@@ -2235,7 +2222,7 @@ class VarDesc
...
@@ -2235,7 +2222,7 @@ class VarDesc
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarDesc)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.VarDesc)
*/
*/
{
{
public:
public:
VarDesc
();
VarDesc
();
virtual
~
VarDesc
();
virtual
~
VarDesc
();
...
@@ -2250,8 +2237,7 @@ public:
...
@@ -2250,8 +2237,7 @@ public:
inline
VarDesc
&
operator
=
(
VarDesc
&&
from
)
noexcept
{
inline
VarDesc
&
operator
=
(
VarDesc
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -2296,17 +2282,17 @@ public:
...
@@ -2296,17 +2282,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
VarDesc
*
other
);
void
InternalSwap
(
VarDesc
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -2347,7 +2333,7 @@ public:
...
@@ -2347,7 +2333,7 @@ public:
void
set_persistable
(
bool
value
);
void
set_persistable
(
bool
value
);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarDesc)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.VarDesc)
private:
private:
void
set_has_name
();
void
set_has_name
();
void
clear_has_name
();
void
clear_has_name
();
void
set_has_type
();
void
set_has_type
();
...
@@ -2374,7 +2360,7 @@ class BlockDesc
...
@@ -2374,7 +2360,7 @@ class BlockDesc
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.BlockDesc)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.BlockDesc)
*/
*/
{
{
public:
public:
BlockDesc
();
BlockDesc
();
virtual
~
BlockDesc
();
virtual
~
BlockDesc
();
...
@@ -2391,8 +2377,7 @@ public:
...
@@ -2391,8 +2377,7 @@ public:
inline
BlockDesc
&
operator
=
(
BlockDesc
&&
from
)
noexcept
{
inline
BlockDesc
&
operator
=
(
BlockDesc
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -2437,17 +2422,17 @@ public:
...
@@ -2437,17 +2422,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
BlockDesc
*
other
);
void
InternalSwap
(
BlockDesc
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -2464,11 +2449,11 @@ public:
...
@@ -2464,11 +2449,11 @@ public:
::
paddle_mobile
::
framework
::
proto
::
VarDesc
*
mutable_vars
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
VarDesc
*
mutable_vars
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
VarDesc
*
add_vars
();
::
paddle_mobile
::
framework
::
proto
::
VarDesc
*
add_vars
();
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
VarDesc
>
*
::
paddle_mobile
::
framework
::
proto
::
VarDesc
>
mutable_vars
();
*
mutable_vars
();
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
VarDesc
>
&
::
paddle_mobile
::
framework
::
proto
::
VarDesc
>
vars
()
const
;
&
vars
()
const
;
// repeated .paddle_mobile.framework.proto.OpDesc ops = 4;
// repeated .paddle_mobile.framework.proto.OpDesc ops = 4;
int
ops_size
()
const
;
int
ops_size
()
const
;
...
@@ -2478,11 +2463,11 @@ public:
...
@@ -2478,11 +2463,11 @@ public:
::
paddle_mobile
::
framework
::
proto
::
OpDesc
*
mutable_ops
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpDesc
*
mutable_ops
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
OpDesc
*
add_ops
();
::
paddle_mobile
::
framework
::
proto
::
OpDesc
*
add_ops
();
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc
>
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc
>
mutable_ops
();
*
mutable_ops
();
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc
>
&
::
paddle_mobile
::
framework
::
proto
::
OpDesc
>
ops
()
const
;
&
ops
()
const
;
// required int32 idx = 1;
// required int32 idx = 1;
bool
has_idx
()
const
;
bool
has_idx
()
const
;
...
@@ -2506,7 +2491,7 @@ public:
...
@@ -2506,7 +2491,7 @@ public:
void
set_forward_block_idx
(
::
google
::
protobuf
::
int32
value
);
void
set_forward_block_idx
(
::
google
::
protobuf
::
int32
value
);
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.BlockDesc)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.BlockDesc)
private:
private:
void
set_has_idx
();
void
set_has_idx
();
void
clear_has_idx
();
void
clear_has_idx
();
void
set_has_parent_idx
();
void
set_has_parent_idx
();
...
@@ -2539,7 +2524,7 @@ class ProgramDesc
...
@@ -2539,7 +2524,7 @@ class ProgramDesc
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.ProgramDesc)
MessageLite
/* @@protoc_insertion_point(class_definition:paddle_mobile.framework.proto.ProgramDesc)
*/
*/
{
{
public:
public:
ProgramDesc
();
ProgramDesc
();
virtual
~
ProgramDesc
();
virtual
~
ProgramDesc
();
...
@@ -2556,8 +2541,7 @@ public:
...
@@ -2556,8 +2541,7 @@ public:
inline
ProgramDesc
&
operator
=
(
ProgramDesc
&&
from
)
noexcept
{
inline
ProgramDesc
&
operator
=
(
ProgramDesc
&&
from
)
noexcept
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
GetArenaNoVirtual
()
==
from
.
GetArenaNoVirtual
())
{
if
(
this
!=
&
from
)
if
(
this
!=
&
from
)
InternalSwap
(
&
from
);
InternalSwap
(
&
from
);
}
else
{
}
else
{
CopyFrom
(
from
);
CopyFrom
(
from
);
}
}
...
@@ -2603,17 +2587,17 @@ public:
...
@@ -2603,17 +2587,17 @@ public:
void
DiscardUnknownFields
();
void
DiscardUnknownFields
();
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
int
GetCachedSize
()
const
PROTOBUF_FINAL
{
return
_cached_size_
;
}
private:
private:
void
SharedCtor
();
void
SharedCtor
();
void
SharedDtor
();
void
SharedDtor
();
void
SetCachedSize
(
int
size
)
const
;
void
SetCachedSize
(
int
size
)
const
;
void
InternalSwap
(
ProgramDesc
*
other
);
void
InternalSwap
(
ProgramDesc
*
other
);
private:
private:
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
::
google
::
protobuf
::
Arena
*
GetArenaNoVirtual
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
inline
void
*
MaybeArenaPtr
()
const
{
return
NULL
;
}
public:
public:
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
::
std
::
string
GetTypeName
()
const
PROTOBUF_FINAL
;
// nested types
// nested types
...
@@ -2630,14 +2614,14 @@ public:
...
@@ -2630,14 +2614,14 @@ public:
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
*
mutable_blocks
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
*
mutable_blocks
(
int
index
);
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
*
add_blocks
();
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
*
add_blocks
();
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
>
*
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
>
mutable_blocks
();
*
mutable_blocks
();
const
::
google
::
protobuf
::
RepeatedPtrField
<
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
>
&
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
>
blocks
()
const
;
&
blocks
()
const
;
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.ProgramDesc)
// @@protoc_insertion_point(class_scope:paddle_mobile.framework.proto.ProgramDesc)
private:
private:
::
google
::
protobuf
::
internal
::
InternalMetadataWithArenaLite
::
google
::
protobuf
::
internal
::
InternalMetadataWithArenaLite
_internal_metadata_
;
_internal_metadata_
;
::
google
::
protobuf
::
internal
::
HasBits
<
1
>
_has_bits_
;
::
google
::
protobuf
::
internal
::
HasBits
<
1
>
_has_bits_
;
...
@@ -2737,8 +2721,8 @@ inline ::paddle_mobile::framework::proto::AttrType OpDesc_Attr::type() const {
...
@@ -2737,8 +2721,8 @@ inline ::paddle_mobile::framework::proto::AttrType OpDesc_Attr::type() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.type)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.Attr.type)
return
static_cast
<::
paddle_mobile
::
framework
::
proto
::
AttrType
>
(
type_
);
return
static_cast
<::
paddle_mobile
::
framework
::
proto
::
AttrType
>
(
type_
);
}
}
inline
void
inline
void
OpDesc_Attr
::
set_type
(
OpDesc_Attr
::
set_type
(
::
paddle_mobile
::
framework
::
proto
::
AttrType
value
)
{
::
paddle_mobile
::
framework
::
proto
::
AttrType
value
)
{
assert
(
::
paddle_mobile
::
framework
::
proto
::
AttrType_IsValid
(
value
));
assert
(
::
paddle_mobile
::
framework
::
proto
::
AttrType_IsValid
(
value
));
set_has_type
();
set_has_type
();
type_
=
value
;
type_
=
value
;
...
@@ -2865,13 +2849,13 @@ inline void OpDesc_Attr::add_ints(::google::protobuf::int32 value) {
...
@@ -2865,13 +2849,13 @@ inline void OpDesc_Attr::add_ints(::google::protobuf::int32 value) {
ints_
.
Add
(
value
);
ints_
.
Add
(
value
);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.ints)
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.ints)
}
}
inline
const
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int32
>
&
inline
const
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int32
>
OpDesc_Attr
::
ints
()
const
{
&
OpDesc_Attr
::
ints
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.ints)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.ints)
return
ints_
;
return
ints_
;
}
}
inline
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int32
>
*
inline
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int32
>
OpDesc_Attr
::
mutable_ints
()
{
*
OpDesc_Attr
::
mutable_ints
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.ints)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.ints)
return
&
ints_
;
return
&
ints_
;
}
}
...
@@ -2891,8 +2875,8 @@ inline void OpDesc_Attr::add_floats(float value) {
...
@@ -2891,8 +2875,8 @@ inline void OpDesc_Attr::add_floats(float value) {
floats_
.
Add
(
value
);
floats_
.
Add
(
value
);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.floats)
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.floats)
}
}
inline
const
::
google
::
protobuf
::
RepeatedField
<
float
>
&
inline
const
::
google
::
protobuf
::
RepeatedField
<
float
>
&
OpDesc_Attr
::
floats
()
OpDesc_Attr
::
floats
()
const
{
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.floats)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.floats)
return
floats_
;
return
floats_
;
}
}
...
@@ -2955,13 +2939,13 @@ inline void OpDesc_Attr::add_strings(const char *value, size_t size) {
...
@@ -2955,13 +2939,13 @@ inline void OpDesc_Attr::add_strings(const char *value, size_t size) {
strings_
.
Add
()
->
assign
(
reinterpret_cast
<
const
char
*>
(
value
),
size
);
strings_
.
Add
()
->
assign
(
reinterpret_cast
<
const
char
*>
(
value
),
size
);
// @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Attr.strings)
// @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Attr.strings)
}
}
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
&
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
OpDesc_Attr
::
strings
()
const
{
&
OpDesc_Attr
::
strings
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.strings)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return
strings_
;
return
strings_
;
}
}
inline
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
*
inline
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
OpDesc_Attr
::
mutable_strings
()
{
*
OpDesc_Attr
::
mutable_strings
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.strings)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Attr.strings)
return
&
strings_
;
return
&
strings_
;
}
}
...
@@ -3001,8 +2985,8 @@ inline void OpDesc_Attr::add_bools(bool value) {
...
@@ -3001,8 +2985,8 @@ inline void OpDesc_Attr::add_bools(bool value) {
bools_
.
Add
(
value
);
bools_
.
Add
(
value
);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.bools)
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.OpDesc.Attr.bools)
}
}
inline
const
::
google
::
protobuf
::
RepeatedField
<
bool
>
&
inline
const
::
google
::
protobuf
::
RepeatedField
<
bool
>
&
OpDesc_Attr
::
bools
()
OpDesc_Attr
::
bools
()
const
{
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.bools)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Attr.bools)
return
bools_
;
return
bools_
;
}
}
...
@@ -3180,13 +3164,13 @@ inline void OpDesc_Var::add_arguments(const char *value, size_t size) {
...
@@ -3180,13 +3164,13 @@ inline void OpDesc_Var::add_arguments(const char *value, size_t size) {
arguments_
.
Add
()
->
assign
(
reinterpret_cast
<
const
char
*>
(
value
),
size
);
arguments_
.
Add
()
->
assign
(
reinterpret_cast
<
const
char
*>
(
value
),
size
);
// @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Var.arguments)
// @@protoc_insertion_point(field_add_pointer:paddle_mobile.framework.proto.OpDesc.Var.arguments)
}
}
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
&
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
OpDesc_Var
::
arguments
()
const
{
&
OpDesc_Var
::
arguments
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Var.arguments)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return
arguments_
;
return
arguments_
;
}
}
inline
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
*
inline
::
google
::
protobuf
::
RepeatedPtrField
<::
std
::
string
>
OpDesc_Var
::
mutable_arguments
()
{
*
OpDesc_Var
::
mutable_arguments
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Var.arguments)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.Var.arguments)
return
&
arguments_
;
return
&
arguments_
;
}
}
...
@@ -3263,13 +3247,13 @@ inline void OpDesc::set_allocated_type(::std::string *type) {
...
@@ -3263,13 +3247,13 @@ inline void OpDesc::set_allocated_type(::std::string *type) {
// repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1;
// repeated .paddle_mobile.framework.proto.OpDesc.Var inputs = 1;
inline
int
OpDesc
::
inputs_size
()
const
{
return
inputs_
.
size
();
}
inline
int
OpDesc
::
inputs_size
()
const
{
return
inputs_
.
size
();
}
inline
void
OpDesc
::
clear_inputs
()
{
inputs_
.
Clear
();
}
inline
void
OpDesc
::
clear_inputs
()
{
inputs_
.
Clear
();
}
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
&
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
&
OpDesc
::
inputs
(
OpDesc
::
inputs
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.inputs)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.inputs)
return
inputs_
.
Get
(
index
);
return
inputs_
.
Get
(
index
);
}
}
inline
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
inline
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
OpDesc
::
mutable_inputs
(
OpDesc
::
mutable_inputs
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.inputs)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.inputs)
return
inputs_
.
Mutable
(
index
);
return
inputs_
.
Mutable
(
index
);
}
}
...
@@ -3278,14 +3262,14 @@ inline ::paddle_mobile::framework::proto::OpDesc_Var *OpDesc::add_inputs() {
...
@@ -3278,14 +3262,14 @@ inline ::paddle_mobile::framework::proto::OpDesc_Var *OpDesc::add_inputs() {
return
inputs_
.
Add
();
return
inputs_
.
Add
();
}
}
inline
::
google
::
protobuf
::
RepeatedPtrField
<
inline
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
OpDesc
::
mutable_inputs
()
{
*
OpDesc
::
mutable_inputs
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.inputs)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.inputs)
return
&
inputs_
;
return
&
inputs_
;
}
}
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
&
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
OpDesc
::
inputs
()
const
{
&
OpDesc
::
inputs
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.inputs)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.inputs)
return
inputs_
;
return
inputs_
;
}
}
...
@@ -3293,13 +3277,13 @@ OpDesc::inputs() const {
...
@@ -3293,13 +3277,13 @@ OpDesc::inputs() const {
// repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2;
// repeated .paddle_mobile.framework.proto.OpDesc.Var outputs = 2;
inline
int
OpDesc
::
outputs_size
()
const
{
return
outputs_
.
size
();
}
inline
int
OpDesc
::
outputs_size
()
const
{
return
outputs_
.
size
();
}
inline
void
OpDesc
::
clear_outputs
()
{
outputs_
.
Clear
();
}
inline
void
OpDesc
::
clear_outputs
()
{
outputs_
.
Clear
();
}
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
&
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
&
OpDesc
::
outputs
(
OpDesc
::
outputs
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.outputs)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.outputs)
return
outputs_
.
Get
(
index
);
return
outputs_
.
Get
(
index
);
}
}
inline
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
inline
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
*
OpDesc
::
mutable_outputs
(
OpDesc
::
mutable_outputs
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.outputs)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.outputs)
return
outputs_
.
Mutable
(
index
);
return
outputs_
.
Mutable
(
index
);
}
}
...
@@ -3308,14 +3292,14 @@ inline ::paddle_mobile::framework::proto::OpDesc_Var *OpDesc::add_outputs() {
...
@@ -3308,14 +3292,14 @@ inline ::paddle_mobile::framework::proto::OpDesc_Var *OpDesc::add_outputs() {
return
outputs_
.
Add
();
return
outputs_
.
Add
();
}
}
inline
::
google
::
protobuf
::
RepeatedPtrField
<
inline
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
OpDesc
::
mutable_outputs
()
{
*
OpDesc
::
mutable_outputs
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.outputs)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.outputs)
return
&
outputs_
;
return
&
outputs_
;
}
}
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
&
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Var
>
OpDesc
::
outputs
()
const
{
&
OpDesc
::
outputs
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.outputs)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.outputs)
return
outputs_
;
return
outputs_
;
}
}
...
@@ -3323,13 +3307,13 @@ OpDesc::outputs() const {
...
@@ -3323,13 +3307,13 @@ OpDesc::outputs() const {
// repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4;
// repeated .paddle_mobile.framework.proto.OpDesc.Attr attrs = 4;
inline
int
OpDesc
::
attrs_size
()
const
{
return
attrs_
.
size
();
}
inline
int
OpDesc
::
attrs_size
()
const
{
return
attrs_
.
size
();
}
inline
void
OpDesc
::
clear_attrs
()
{
attrs_
.
Clear
();
}
inline
void
OpDesc
::
clear_attrs
()
{
attrs_
.
Clear
();
}
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
&
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
&
OpDesc
::
attrs
(
OpDesc
::
attrs
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.attrs)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpDesc.attrs)
return
attrs_
.
Get
(
index
);
return
attrs_
.
Get
(
index
);
}
}
inline
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
*
inline
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
*
OpDesc
::
mutable_attrs
(
OpDesc
::
mutable_attrs
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.attrs)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpDesc.attrs)
return
attrs_
.
Mutable
(
index
);
return
attrs_
.
Mutable
(
index
);
}
}
...
@@ -3338,14 +3322,14 @@ inline ::paddle_mobile::framework::proto::OpDesc_Attr *OpDesc::add_attrs() {
...
@@ -3338,14 +3322,14 @@ inline ::paddle_mobile::framework::proto::OpDesc_Attr *OpDesc::add_attrs() {
return
attrs_
.
Add
();
return
attrs_
.
Add
();
}
}
inline
::
google
::
protobuf
::
RepeatedPtrField
<
inline
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
>
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
>
OpDesc
::
mutable_attrs
()
{
*
OpDesc
::
mutable_attrs
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.attrs)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpDesc.attrs)
return
&
attrs_
;
return
&
attrs_
;
}
}
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
>
&
::
paddle_mobile
::
framework
::
proto
::
OpDesc_Attr
>
OpDesc
::
attrs
()
const
{
&
OpDesc
::
attrs
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.attrs)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpDesc.attrs)
return
attrs_
;
return
attrs_
;
}
}
...
@@ -3658,8 +3642,8 @@ inline ::paddle_mobile::framework::proto::AttrType OpProto_Attr::type() const {
...
@@ -3658,8 +3642,8 @@ inline ::paddle_mobile::framework::proto::AttrType OpProto_Attr::type() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Attr.type)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.Attr.type)
return
static_cast
<::
paddle_mobile
::
framework
::
proto
::
AttrType
>
(
type_
);
return
static_cast
<::
paddle_mobile
::
framework
::
proto
::
AttrType
>
(
type_
);
}
}
inline
void
inline
void
OpProto_Attr
::
set_type
(
OpProto_Attr
::
set_type
(
::
paddle_mobile
::
framework
::
proto
::
AttrType
value
)
{
::
paddle_mobile
::
framework
::
proto
::
AttrType
value
)
{
assert
(
::
paddle_mobile
::
framework
::
proto
::
AttrType_IsValid
(
value
));
assert
(
::
paddle_mobile
::
framework
::
proto
::
AttrType_IsValid
(
value
));
set_has_type
();
set_has_type
();
type_
=
value
;
type_
=
value
;
...
@@ -3828,13 +3812,13 @@ inline void OpProto::set_allocated_type(::std::string *type) {
...
@@ -3828,13 +3812,13 @@ inline void OpProto::set_allocated_type(::std::string *type) {
// repeated .paddle_mobile.framework.proto.OpProto.Var inputs = 2;
// repeated .paddle_mobile.framework.proto.OpProto.Var inputs = 2;
inline
int
OpProto
::
inputs_size
()
const
{
return
inputs_
.
size
();
}
inline
int
OpProto
::
inputs_size
()
const
{
return
inputs_
.
size
();
}
inline
void
OpProto
::
clear_inputs
()
{
inputs_
.
Clear
();
}
inline
void
OpProto
::
clear_inputs
()
{
inputs_
.
Clear
();
}
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
&
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
&
OpProto
::
inputs
(
OpProto
::
inputs
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.inputs)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.inputs)
return
inputs_
.
Get
(
index
);
return
inputs_
.
Get
(
index
);
}
}
inline
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
inline
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
OpProto
::
mutable_inputs
(
OpProto
::
mutable_inputs
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.inputs)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.inputs)
return
inputs_
.
Mutable
(
index
);
return
inputs_
.
Mutable
(
index
);
}
}
...
@@ -3843,14 +3827,14 @@ inline ::paddle_mobile::framework::proto::OpProto_Var *OpProto::add_inputs() {
...
@@ -3843,14 +3827,14 @@ inline ::paddle_mobile::framework::proto::OpProto_Var *OpProto::add_inputs() {
return
inputs_
.
Add
();
return
inputs_
.
Add
();
}
}
inline
::
google
::
protobuf
::
RepeatedPtrField
<
inline
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
*
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
OpProto
::
mutable_inputs
()
{
*
OpProto
::
mutable_inputs
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.inputs)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.inputs)
return
&
inputs_
;
return
&
inputs_
;
}
}
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
&
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
OpProto
::
inputs
()
const
{
&
OpProto
::
inputs
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.inputs)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.inputs)
return
inputs_
;
return
inputs_
;
}
}
...
@@ -3858,13 +3842,13 @@ OpProto::inputs() const {
...
@@ -3858,13 +3842,13 @@ OpProto::inputs() const {
// repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3;
// repeated .paddle_mobile.framework.proto.OpProto.Var outputs = 3;
inline
int
OpProto
::
outputs_size
()
const
{
return
outputs_
.
size
();
}
inline
int
OpProto
::
outputs_size
()
const
{
return
outputs_
.
size
();
}
inline
void
OpProto
::
clear_outputs
()
{
outputs_
.
Clear
();
}
inline
void
OpProto
::
clear_outputs
()
{
outputs_
.
Clear
();
}
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
&
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
&
OpProto
::
outputs
(
OpProto
::
outputs
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.outputs)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.outputs)
return
outputs_
.
Get
(
index
);
return
outputs_
.
Get
(
index
);
}
}
inline
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
inline
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
*
OpProto
::
mutable_outputs
(
OpProto
::
mutable_outputs
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.outputs)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.outputs)
return
outputs_
.
Mutable
(
index
);
return
outputs_
.
Mutable
(
index
);
}
}
...
@@ -3873,14 +3857,14 @@ inline ::paddle_mobile::framework::proto::OpProto_Var *OpProto::add_outputs() {
...
@@ -3873,14 +3857,14 @@ inline ::paddle_mobile::framework::proto::OpProto_Var *OpProto::add_outputs() {
return
outputs_
.
Add
();
return
outputs_
.
Add
();
}
}
inline
::
google
::
protobuf
::
RepeatedPtrField
<
inline
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
*
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
OpProto
::
mutable_outputs
()
{
*
OpProto
::
mutable_outputs
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.outputs)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.outputs)
return
&
outputs_
;
return
&
outputs_
;
}
}
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
&
::
paddle_mobile
::
framework
::
proto
::
OpProto_Var
>
OpProto
::
outputs
()
const
{
&
OpProto
::
outputs
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.outputs)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.outputs)
return
outputs_
;
return
outputs_
;
}
}
...
@@ -3888,13 +3872,13 @@ OpProto::outputs() const {
...
@@ -3888,13 +3872,13 @@ OpProto::outputs() const {
// repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4;
// repeated .paddle_mobile.framework.proto.OpProto.Attr attrs = 4;
inline
int
OpProto
::
attrs_size
()
const
{
return
attrs_
.
size
();
}
inline
int
OpProto
::
attrs_size
()
const
{
return
attrs_
.
size
();
}
inline
void
OpProto
::
clear_attrs
()
{
attrs_
.
Clear
();
}
inline
void
OpProto
::
clear_attrs
()
{
attrs_
.
Clear
();
}
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
&
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
&
OpProto
::
attrs
(
OpProto
::
attrs
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.attrs)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.OpProto.attrs)
return
attrs_
.
Get
(
index
);
return
attrs_
.
Get
(
index
);
}
}
inline
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
*
inline
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
*
OpProto
::
mutable_attrs
(
OpProto
::
mutable_attrs
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.attrs)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.OpProto.attrs)
return
attrs_
.
Mutable
(
index
);
return
attrs_
.
Mutable
(
index
);
}
}
...
@@ -3903,14 +3887,14 @@ inline ::paddle_mobile::framework::proto::OpProto_Attr *OpProto::add_attrs() {
...
@@ -3903,14 +3887,14 @@ inline ::paddle_mobile::framework::proto::OpProto_Attr *OpProto::add_attrs() {
return
attrs_
.
Add
();
return
attrs_
.
Add
();
}
}
inline
::
google
::
protobuf
::
RepeatedPtrField
<
inline
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
>
*
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
>
OpProto
::
mutable_attrs
()
{
*
OpProto
::
mutable_attrs
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.attrs)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.OpProto.attrs)
return
&
attrs_
;
return
&
attrs_
;
}
}
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
>
&
::
paddle_mobile
::
framework
::
proto
::
OpProto_Attr
>
OpProto
::
attrs
()
const
{
&
OpProto
::
attrs
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.attrs)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.OpProto.attrs)
return
attrs_
;
return
attrs_
;
}
}
...
@@ -4032,13 +4016,13 @@ inline void VarType_TensorDesc::add_dims(::google::protobuf::int64 value) {
...
@@ -4032,13 +4016,13 @@ inline void VarType_TensorDesc::add_dims(::google::protobuf::int64 value) {
dims_
.
Add
(
value
);
dims_
.
Add
(
value
);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
}
}
inline
const
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int64
>
&
inline
const
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int64
>
VarType_TensorDesc
::
dims
()
const
{
&
VarType_TensorDesc
::
dims
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
return
dims_
;
return
dims_
;
}
}
inline
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int64
>
*
inline
::
google
::
protobuf
::
RepeatedField
<::
google
::
protobuf
::
int64
>
VarType_TensorDesc
::
mutable_dims
()
{
*
VarType_TensorDesc
::
mutable_dims
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.TensorDesc.dims)
return
&
dims_
;
return
&
dims_
;
}
}
...
@@ -4121,8 +4105,8 @@ inline ::google::protobuf::int32 VarType_LoDTensorDesc::lod_level() const {
...
@@ -4121,8 +4105,8 @@ inline ::google::protobuf::int32 VarType_LoDTensorDesc::lod_level() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorDesc.lod_level)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorDesc.lod_level)
return
lod_level_
;
return
lod_level_
;
}
}
inline
void
inline
void
VarType_LoDTensorDesc
::
set_lod_level
(
VarType_LoDTensorDesc
::
set_lod_level
(
::
google
::
protobuf
::
int32
value
)
{
::
google
::
protobuf
::
int32
value
)
{
set_has_lod_level
();
set_has_lod_level
();
lod_level_
=
value
;
lod_level_
=
value
;
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarType.LoDTensorDesc.lod_level)
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarType.LoDTensorDesc.lod_level)
...
@@ -4206,8 +4190,8 @@ inline ::google::protobuf::int32 VarType_LoDTensorArrayDesc::lod_level() const {
...
@@ -4206,8 +4190,8 @@ inline ::google::protobuf::int32 VarType_LoDTensorArrayDesc::lod_level() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.lod_level)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.lod_level)
return
lod_level_
;
return
lod_level_
;
}
}
inline
void
inline
void
VarType_LoDTensorArrayDesc
::
set_lod_level
(
VarType_LoDTensorArrayDesc
::
set_lod_level
(
::
google
::
protobuf
::
int32
value
)
{
::
google
::
protobuf
::
int32
value
)
{
set_has_lod_level
();
set_has_lod_level
();
lod_level_
=
value
;
lod_level_
=
value
;
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.lod_level)
// @@protoc_insertion_point(field_set:paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc.lod_level)
...
@@ -4239,14 +4223,14 @@ VarType_ReaderDesc::add_lod_tensor() {
...
@@ -4239,14 +4223,14 @@ VarType_ReaderDesc::add_lod_tensor() {
return
lod_tensor_
.
Add
();
return
lod_tensor_
.
Add
();
}
}
inline
::
google
::
protobuf
::
RepeatedPtrField
<
inline
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
>
*
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
>
VarType_ReaderDesc
::
mutable_lod_tensor
()
{
*
VarType_ReaderDesc
::
mutable_lod_tensor
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return
&
lod_tensor_
;
return
&
lod_tensor_
;
}
}
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
>
&
::
paddle_mobile
::
framework
::
proto
::
VarType_LoDTensorDesc
>
VarType_ReaderDesc
::
lod_tensor
()
const
{
&
VarType_ReaderDesc
::
lod_tensor
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.ReaderDesc.lod_tensor)
return
lod_tensor_
;
return
lod_tensor_
;
}
}
...
@@ -4336,13 +4320,13 @@ inline void VarType_Tuple::add_element_type(
...
@@ -4336,13 +4320,13 @@ inline void VarType_Tuple::add_element_type(
element_type_
.
Add
(
value
);
element_type_
.
Add
(
value
);
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.Tuple.element_type)
// @@protoc_insertion_point(field_add:paddle_mobile.framework.proto.VarType.Tuple.element_type)
}
}
inline
const
::
google
::
protobuf
::
RepeatedField
<
int
>
&
inline
const
::
google
::
protobuf
::
RepeatedField
<
int
>
VarType_Tuple
::
element_type
()
const
{
&
VarType_Tuple
::
element_type
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.Tuple.element_type)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.VarType.Tuple.element_type)
return
element_type_
;
return
element_type_
;
}
}
inline
::
google
::
protobuf
::
RepeatedField
<
int
>
*
inline
::
google
::
protobuf
::
RepeatedField
<
int
>
VarType_Tuple
::
mutable_element_type
()
{
*
VarType_Tuple
::
mutable_element_type
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.Tuple.element_type)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.VarType.Tuple.element_type)
return
&
element_type_
;
return
&
element_type_
;
}
}
...
@@ -4365,8 +4349,8 @@ inline ::paddle_mobile::framework::proto::VarType_Type VarType::type() const {
...
@@ -4365,8 +4349,8 @@ inline ::paddle_mobile::framework::proto::VarType_Type VarType::type() const {
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.type)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.type)
return
static_cast
<::
paddle_mobile
::
framework
::
proto
::
VarType_Type
>
(
type_
);
return
static_cast
<::
paddle_mobile
::
framework
::
proto
::
VarType_Type
>
(
type_
);
}
}
inline
void
inline
void
VarType
::
set_type
(
VarType
::
set_type
(
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
value
)
{
::
paddle_mobile
::
framework
::
proto
::
VarType_Type
value
)
{
assert
(
::
paddle_mobile
::
framework
::
proto
::
VarType_Type_IsValid
(
value
));
assert
(
::
paddle_mobile
::
framework
::
proto
::
VarType_Type_IsValid
(
value
));
set_has_type
();
set_has_type
();
type_
=
value
;
type_
=
value
;
...
@@ -4654,8 +4638,8 @@ inline void VarType::clear_tuple() {
...
@@ -4654,8 +4638,8 @@ inline void VarType::clear_tuple() {
tuple_
->::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
::
Clear
();
tuple_
->::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
::
Clear
();
clear_has_tuple
();
clear_has_tuple
();
}
}
inline
const
::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
&
inline
const
::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
&
VarType
::
tuple
()
VarType
::
tuple
()
const
{
const
{
const
::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
*
p
=
tuple_
;
const
::
paddle_mobile
::
framework
::
proto
::
VarType_Tuple
*
p
=
tuple_
;
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tuple)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.VarType.tuple)
return
p
!=
NULL
return
p
!=
NULL
...
@@ -4770,8 +4754,7 @@ inline bool VarDesc::has_type() const {
...
@@ -4770,8 +4754,7 @@ inline bool VarDesc::has_type() const {
inline
void
VarDesc
::
set_has_type
()
{
_has_bits_
[
0
]
|=
0x00000002u
;
}
inline
void
VarDesc
::
set_has_type
()
{
_has_bits_
[
0
]
|=
0x00000002u
;
}
inline
void
VarDesc
::
clear_has_type
()
{
_has_bits_
[
0
]
&=
~
0x00000002u
;
}
inline
void
VarDesc
::
clear_has_type
()
{
_has_bits_
[
0
]
&=
~
0x00000002u
;
}
inline
void
VarDesc
::
clear_type
()
{
inline
void
VarDesc
::
clear_type
()
{
if
(
type_
!=
NULL
)
if
(
type_
!=
NULL
)
type_
->::
paddle_mobile
::
framework
::
proto
::
VarType
::
Clear
();
type_
->::
paddle_mobile
::
framework
::
proto
::
VarType
::
Clear
();
clear_has_type
();
clear_has_type
();
}
}
inline
const
::
paddle_mobile
::
framework
::
proto
::
VarType
&
VarDesc
::
type
()
const
{
inline
const
::
paddle_mobile
::
framework
::
proto
::
VarType
&
VarDesc
::
type
()
const
{
...
@@ -4798,8 +4781,8 @@ inline ::paddle_mobile::framework::proto::VarType *VarDesc::release_type() {
...
@@ -4798,8 +4781,8 @@ inline ::paddle_mobile::framework::proto::VarType *VarDesc::release_type() {
type_
=
NULL
;
type_
=
NULL
;
return
temp
;
return
temp
;
}
}
inline
void
inline
void
VarDesc
::
set_allocated_type
(
VarDesc
::
set_allocated_type
(
::
paddle_mobile
::
framework
::
proto
::
VarType
*
type
)
{
::
paddle_mobile
::
framework
::
proto
::
VarType
*
type
)
{
delete
type_
;
delete
type_
;
type_
=
type
;
type_
=
type
;
if
(
type
)
{
if
(
type
)
{
...
@@ -4877,13 +4860,13 @@ inline void BlockDesc::set_parent_idx(::google::protobuf::int32 value) {
...
@@ -4877,13 +4860,13 @@ inline void BlockDesc::set_parent_idx(::google::protobuf::int32 value) {
// repeated .paddle_mobile.framework.proto.VarDesc vars = 3;
// repeated .paddle_mobile.framework.proto.VarDesc vars = 3;
inline
int
BlockDesc
::
vars_size
()
const
{
return
vars_
.
size
();
}
inline
int
BlockDesc
::
vars_size
()
const
{
return
vars_
.
size
();
}
inline
void
BlockDesc
::
clear_vars
()
{
vars_
.
Clear
();
}
inline
void
BlockDesc
::
clear_vars
()
{
vars_
.
Clear
();
}
inline
const
::
paddle_mobile
::
framework
::
proto
::
VarDesc
&
inline
const
::
paddle_mobile
::
framework
::
proto
::
VarDesc
&
BlockDesc
::
vars
(
BlockDesc
::
vars
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.vars)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.vars)
return
vars_
.
Get
(
index
);
return
vars_
.
Get
(
index
);
}
}
inline
::
paddle_mobile
::
framework
::
proto
::
VarDesc
*
inline
::
paddle_mobile
::
framework
::
proto
::
VarDesc
*
BlockDesc
::
mutable_vars
(
BlockDesc
::
mutable_vars
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.vars)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.vars)
return
vars_
.
Mutable
(
index
);
return
vars_
.
Mutable
(
index
);
}
}
...
@@ -4892,14 +4875,14 @@ inline ::paddle_mobile::framework::proto::VarDesc *BlockDesc::add_vars() {
...
@@ -4892,14 +4875,14 @@ inline ::paddle_mobile::framework::proto::VarDesc *BlockDesc::add_vars() {
return
vars_
.
Add
();
return
vars_
.
Add
();
}
}
inline
::
google
::
protobuf
::
RepeatedPtrField
<
inline
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
VarDesc
>
*
::
paddle_mobile
::
framework
::
proto
::
VarDesc
>
BlockDesc
::
mutable_vars
()
{
*
BlockDesc
::
mutable_vars
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.vars)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.vars)
return
&
vars_
;
return
&
vars_
;
}
}
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
VarDesc
>
&
::
paddle_mobile
::
framework
::
proto
::
VarDesc
>
BlockDesc
::
vars
()
const
{
&
BlockDesc
::
vars
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.vars)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.vars)
return
vars_
;
return
vars_
;
}
}
...
@@ -4907,13 +4890,13 @@ BlockDesc::vars() const {
...
@@ -4907,13 +4890,13 @@ BlockDesc::vars() const {
// repeated .paddle_mobile.framework.proto.OpDesc ops = 4;
// repeated .paddle_mobile.framework.proto.OpDesc ops = 4;
inline
int
BlockDesc
::
ops_size
()
const
{
return
ops_
.
size
();
}
inline
int
BlockDesc
::
ops_size
()
const
{
return
ops_
.
size
();
}
inline
void
BlockDesc
::
clear_ops
()
{
ops_
.
Clear
();
}
inline
void
BlockDesc
::
clear_ops
()
{
ops_
.
Clear
();
}
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc
&
inline
const
::
paddle_mobile
::
framework
::
proto
::
OpDesc
&
BlockDesc
::
ops
(
BlockDesc
::
ops
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.ops)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.BlockDesc.ops)
return
ops_
.
Get
(
index
);
return
ops_
.
Get
(
index
);
}
}
inline
::
paddle_mobile
::
framework
::
proto
::
OpDesc
*
inline
::
paddle_mobile
::
framework
::
proto
::
OpDesc
*
BlockDesc
::
mutable_ops
(
BlockDesc
::
mutable_ops
(
int
index
)
{
int
index
)
{
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.ops)
// @@protoc_insertion_point(field_mutable:paddle_mobile.framework.proto.BlockDesc.ops)
return
ops_
.
Mutable
(
index
);
return
ops_
.
Mutable
(
index
);
}
}
...
@@ -4922,14 +4905,14 @@ inline ::paddle_mobile::framework::proto::OpDesc *BlockDesc::add_ops() {
...
@@ -4922,14 +4905,14 @@ inline ::paddle_mobile::framework::proto::OpDesc *BlockDesc::add_ops() {
return
ops_
.
Add
();
return
ops_
.
Add
();
}
}
inline
::
google
::
protobuf
::
RepeatedPtrField
<
inline
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc
>
*
::
paddle_mobile
::
framework
::
proto
::
OpDesc
>
BlockDesc
::
mutable_ops
()
{
*
BlockDesc
::
mutable_ops
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.ops)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.BlockDesc.ops)
return
&
ops_
;
return
&
ops_
;
}
}
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
OpDesc
>
&
::
paddle_mobile
::
framework
::
proto
::
OpDesc
>
BlockDesc
::
ops
()
const
{
&
BlockDesc
::
ops
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.ops)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.BlockDesc.ops)
return
ops_
;
return
ops_
;
}
}
...
@@ -4965,8 +4948,8 @@ inline void BlockDesc::set_forward_block_idx(::google::protobuf::int32 value) {
...
@@ -4965,8 +4948,8 @@ inline void BlockDesc::set_forward_block_idx(::google::protobuf::int32 value) {
// repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1;
// repeated .paddle_mobile.framework.proto.BlockDesc blocks = 1;
inline
int
ProgramDesc
::
blocks_size
()
const
{
return
blocks_
.
size
();
}
inline
int
ProgramDesc
::
blocks_size
()
const
{
return
blocks_
.
size
();
}
inline
void
ProgramDesc
::
clear_blocks
()
{
blocks_
.
Clear
();
}
inline
void
ProgramDesc
::
clear_blocks
()
{
blocks_
.
Clear
();
}
inline
const
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
&
inline
const
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
&
ProgramDesc
::
blocks
(
ProgramDesc
::
blocks
(
int
index
)
const
{
int
index
)
const
{
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.ProgramDesc.blocks)
// @@protoc_insertion_point(field_get:paddle_mobile.framework.proto.ProgramDesc.blocks)
return
blocks_
.
Get
(
index
);
return
blocks_
.
Get
(
index
);
}
}
...
@@ -4980,14 +4963,14 @@ inline ::paddle_mobile::framework::proto::BlockDesc *ProgramDesc::add_blocks() {
...
@@ -4980,14 +4963,14 @@ inline ::paddle_mobile::framework::proto::BlockDesc *ProgramDesc::add_blocks() {
return
blocks_
.
Add
();
return
blocks_
.
Add
();
}
}
inline
::
google
::
protobuf
::
RepeatedPtrField
<
inline
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
>
*
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
>
ProgramDesc
::
mutable_blocks
()
{
*
ProgramDesc
::
mutable_blocks
()
{
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.ProgramDesc.blocks)
// @@protoc_insertion_point(field_mutable_list:paddle_mobile.framework.proto.ProgramDesc.blocks)
return
&
blocks_
;
return
&
blocks_
;
}
}
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
inline
const
::
google
::
protobuf
::
RepeatedPtrField
<
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
>
&
::
paddle_mobile
::
framework
::
proto
::
BlockDesc
>
ProgramDesc
::
blocks
()
const
{
&
ProgramDesc
::
blocks
()
const
{
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.ProgramDesc.blocks)
// @@protoc_insertion_point(field_list:paddle_mobile.framework.proto.ProgramDesc.blocks)
return
blocks_
;
return
blocks_
;
}
}
...
...
src/framework/lod_tensor.cc
浏览文件 @
7cc864ea
...
@@ -13,10 +13,10 @@ See the License for the specific language governing permissions and
...
@@ -13,10 +13,10 @@ See the License for the specific language governing permissions and
limitations under the License. */
limitations under the License. */
#include "lod_tensor.h"
#include "lod_tensor.h"
#include <algorithm>
#include <iterator>
#include <stdint.h>
#include <stdint.h>
#include <string.h>
#include <string.h>
#include <algorithm>
#include <iterator>
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
framework
{
namespace
framework
{
...
@@ -105,8 +105,7 @@ LoD SliceInLevel(const LoD &in, size_t level, size_t elem_begin,
...
@@ -105,8 +105,7 @@ LoD SliceInLevel(const LoD &in, size_t level, size_t elem_begin,
LoD
ToAbsOffset
(
const
LoD
&
in
)
{
LoD
ToAbsOffset
(
const
LoD
&
in
)
{
// the lowest level stores relative offsets
// the lowest level stores relative offsets
if
(
in
.
empty
()
||
in
.
size
()
==
1
)
if
(
in
.
empty
()
||
in
.
size
()
==
1
)
return
in
;
return
in
;
LoD
result
=
in
;
LoD
result
=
in
;
for
(
auto
level
=
static_cast
<
int
>
(
in
.
size
()
-
2
);
level
>=
0
;
level
--
)
{
for
(
auto
level
=
static_cast
<
int
>
(
in
.
size
()
-
2
);
level
>=
0
;
level
--
)
{
for
(
size_t
i
=
0
;
i
<
in
[
level
].
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
in
[
level
].
size
();
++
i
)
{
...
@@ -138,23 +137,19 @@ bool operator==(const LoD &a, const LoD &b) {
...
@@ -138,23 +137,19 @@ bool operator==(const LoD &a, const LoD &b) {
}
}
bool
CheckLoD
(
const
LoD
&
in
,
int
tensor_height
)
{
bool
CheckLoD
(
const
LoD
&
in
,
int
tensor_height
)
{
if
(
in
.
empty
())
if
(
in
.
empty
())
return
true
;
return
true
;
for
(
const
auto
&
level
:
in
)
{
for
(
const
auto
&
level
:
in
)
{
// check: there should be more than 2 offsets existing in each
// check: there should be more than 2 offsets existing in each
// level.
// level.
if
(
level
.
size
()
<
2
)
if
(
level
.
size
()
<
2
)
return
false
;
return
false
;
// check: the first offset(the begin offset) of each level
// check: the first offset(the begin offset) of each level
// should be 0.
// should be 0.
if
(
level
.
front
()
!=
0
)
if
(
level
.
front
()
!=
0
)
return
false
;
return
false
;
// check: all the offsets in a level should be ascending(no same
// check: all the offsets in a level should be ascending(no same
// items
// items
// allows).
// allows).
if
(
!
std
::
is_sorted
(
level
.
begin
(),
level
.
begin
(),
[](
size_t
a
,
size_t
b
)
{
if
(
!
std
::
is_sorted
(
level
.
begin
(),
level
.
begin
(),
[](
size_t
a
,
size_t
b
)
{
if
(
a
<
b
)
if
(
a
<
b
)
return
true
;
return
true
;
return
false
;
return
false
;
}))
{
}))
{
std
::
cout
<<
"ascending error"
;
std
::
cout
<<
"ascending error"
;
...
@@ -174,22 +169,19 @@ bool CheckLoD(const LoD &in, int tensor_height) {
...
@@ -174,22 +169,19 @@ bool CheckLoD(const LoD &in, int tensor_height) {
// goes
// goes
// first.
// first.
for
(
size_t
level
=
0
;
level
<
in
.
size
()
-
1
;
level
++
)
{
for
(
size_t
level
=
0
;
level
<
in
.
size
()
-
1
;
level
++
)
{
if
(
in
[
level
].
back
()
!=
in
[
level
+
1
].
size
()
-
1
)
if
(
in
[
level
].
back
()
!=
in
[
level
+
1
].
size
()
-
1
)
return
false
;
return
false
;
}
}
return
true
;
return
true
;
}
}
bool
CheckAbsLoD
(
const
LoD
&
in
,
int
tensor_height
)
{
bool
CheckAbsLoD
(
const
LoD
&
in
,
int
tensor_height
)
{
if
(
in
.
empty
())
if
(
in
.
empty
())
return
true
;
return
true
;
for
(
const
auto
&
level
:
in
)
{
for
(
const
auto
&
level
:
in
)
{
// check: all the offsets in a level should be ascending(no same
// check: all the offsets in a level should be ascending(no same
// items
// items
// allows).
// allows).
if
(
!
std
::
is_sorted
(
level
.
begin
(),
level
.
begin
(),
[](
size_t
a
,
size_t
b
)
{
if
(
!
std
::
is_sorted
(
level
.
begin
(),
level
.
begin
(),
[](
size_t
a
,
size_t
b
)
{
if
(
a
<
b
)
if
(
a
<
b
)
return
true
;
return
true
;
return
false
;
return
false
;
}))
{
}))
{
return
false
;
return
false
;
...
@@ -197,14 +189,12 @@ bool CheckAbsLoD(const LoD &in, int tensor_height) {
...
@@ -197,14 +189,12 @@ bool CheckAbsLoD(const LoD &in, int tensor_height) {
// check: there should be more than 2 offsets existing in each
// check: there should be more than 2 offsets existing in each
// level.
// level.
if
(
level
.
size
()
<
2
)
if
(
level
.
size
()
<
2
)
return
false
;
return
false
;
// check: the first offset of each level should be 0, and the
// check: the first offset of each level should be 0, and the
// last should be
// last should be
// the same(the height of underlying tensor).
// the same(the height of underlying tensor).
if
(
level
.
front
()
!=
0
)
if
(
level
.
front
()
!=
0
)
return
false
;
return
false
;
if
(
tensor_height
<
0
)
{
if
(
tensor_height
<
0
)
{
tensor_height
=
level
.
back
();
tensor_height
=
level
.
back
();
}
else
if
((
size_t
)
tensor_height
!=
level
.
back
())
{
}
else
if
((
size_t
)
tensor_height
!=
level
.
back
())
{
...
...
src/framework/lod_tensor.h
浏览文件 @
7cc864ea
...
@@ -14,12 +14,12 @@ limitations under the License. */
...
@@ -14,12 +14,12 @@ limitations under the License. */
#pragma once
#pragma once
#include "tensor.h"
#include "tensor_util.h"
#include <memory>
#include <memory>
#include <string>
#include <string>
#include <utility>
#include <utility>
#include <vector>
#include <vector>
#include "tensor.h"
#include "tensor_util.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
...
@@ -102,7 +102,7 @@ bool CheckAbsLoD(const LoD &in, int tensor_height = -1);
...
@@ -102,7 +102,7 @@ bool CheckAbsLoD(const LoD &in, int tensor_height = -1);
* see https://en.wikipedia.org/wiki/Level_of_details for reference.
* see https://en.wikipedia.org/wiki/Level_of_details for reference.
*/
*/
class
LoDTensor
:
public
Tensor
{
class
LoDTensor
:
public
Tensor
{
public:
public:
LoDTensor
()
:
Tensor
()
{}
LoDTensor
()
:
Tensor
()
{}
explicit
LoDTensor
(
const
LoD
&
lod
)
:
lod_
(
lod
)
{}
explicit
LoDTensor
(
const
LoD
&
lod
)
:
lod_
(
lod
)
{}
...
@@ -139,7 +139,7 @@ public:
...
@@ -139,7 +139,7 @@ public:
return
(
lod_
)[
level
].
size
()
-
1
;
return
(
lod_
)[
level
].
size
()
-
1
;
}
}
private:
private:
LoD
lod_
;
LoD
lod_
;
};
};
...
@@ -189,9 +189,8 @@ LoDTensor LodExpand(const LoDTensor &source, const LoD &lod, size_t level) {
...
@@ -189,9 +189,8 @@ LoDTensor LodExpand(const LoDTensor &source, const LoD &lod, size_t level) {
// Returns:
// Returns:
// LoD = [[1, 4], [2, 4, 2, 3, 2]]
// LoD = [[1, 4], [2, 4, 2, 3, 2]]
// pair<size_t, size_t> = {11, 24}
// pair<size_t, size_t> = {11, 24}
std
::
pair
<
LoD
,
std
::
pair
<
size_t
,
size_t
>>
std
::
pair
<
LoD
,
std
::
pair
<
size_t
,
size_t
>>
GetSubLoDAndAbsoluteOffset
(
GetSubLoDAndAbsoluteOffset
(
const
LoD
&
lod
,
size_t
start_idx
,
size_t
end_idx
,
const
LoD
&
lod
,
size_t
start_idx
,
size_t
end_idx
,
size_t
start_level
);
size_t
start_level
);
void
AppendLoD
(
LoD
*
lod
,
const
LoD
&
lod_length
);
void
AppendLoD
(
LoD
*
lod
,
const
LoD
&
lod_length
);
...
...
src/framework/op_desc.cpp
浏览文件 @
7cc864ea
src/framework/op_desc.h
浏览文件 @
7cc864ea
...
@@ -26,7 +26,7 @@ namespace paddle_mobile {
...
@@ -26,7 +26,7 @@ namespace paddle_mobile {
namespace
framework
{
namespace
framework
{
class
OpDesc
:
PaddleMobileObject
{
class
OpDesc
:
PaddleMobileObject
{
public:
public:
OpDesc
(
const
proto
::
OpDesc
&
desc
);
OpDesc
(
const
proto
::
OpDesc
&
desc
);
const
std
::
vector
<
std
::
string
>
&
Input
(
const
std
::
string
&
name
)
const
;
const
std
::
vector
<
std
::
string
>
&
Input
(
const
std
::
string
&
name
)
const
;
const
std
::
vector
<
std
::
string
>
&
Output
(
const
std
::
string
&
name
)
const
;
const
std
::
vector
<
std
::
string
>
&
Output
(
const
std
::
string
&
name
)
const
;
...
@@ -40,7 +40,7 @@ public:
...
@@ -40,7 +40,7 @@ public:
const
std
::
string
&
Type
()
{
return
desc_
.
type
();
};
const
std
::
string
&
Type
()
{
return
desc_
.
type
();
};
private:
private:
proto
::
OpDesc
desc_
;
proto
::
OpDesc
desc_
;
VariableNameMap
inputs_
;
VariableNameMap
inputs_
;
VariableNameMap
outputs_
;
VariableNameMap
outputs_
;
...
...
src/framework/op_info.h
浏览文件 @
7cc864ea
...
@@ -24,7 +24,8 @@ SOFTWARE.
...
@@ -24,7 +24,8 @@ SOFTWARE.
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
framework
{
namespace
framework
{
template
<
typename
Dtype
>
struct
OpInfo
{
template
<
typename
Dtype
>
struct
OpInfo
{
OpCreator
<
Dtype
>
creator_
;
OpCreator
<
Dtype
>
creator_
;
const
OpCreator
<
Dtype
>
&
Creator
()
const
{
const
OpCreator
<
Dtype
>
&
Creator
()
const
{
// PADDLE_ENFORCE_NOT_NULL(creator_,
// PADDLE_ENFORCE_NOT_NULL(creator_,
...
@@ -34,12 +35,15 @@ template <typename Dtype> struct OpInfo {
...
@@ -34,12 +35,15 @@ template <typename Dtype> struct OpInfo {
}
}
};
};
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
{
template
<
typename
Dtype
>
public:
class
OpInfoMap
{
public:
static
OpInfoMap
&
Instance
()
{
static
OpInfoMap
&
Instance
()
{
if
(
g_op_info_map
<
Dtype
>
==
nullptr
)
{
if
(
g_op_info_map
<
Dtype
>
==
nullptr
)
{
g_op_info_map
<
Dtype
>
=
new
OpInfoMap
();
g_op_info_map
<
Dtype
>
=
new
OpInfoMap
();
...
@@ -83,7 +87,7 @@ public:
...
@@ -83,7 +87,7 @@ public:
return
&
map_
;
return
&
map_
;
}
}
private:
private:
OpInfoMap
()
=
default
;
OpInfoMap
()
=
default
;
std
::
unordered_map
<
std
::
string
,
OpInfo
<
Dtype
>>
map_
;
std
::
unordered_map
<
std
::
string
,
OpInfo
<
Dtype
>>
map_
;
...
...
src/framework/op_kernel_type.h
浏览文件 @
7cc864ea
src/framework/op_proto_maker.h
浏览文件 @
7cc864ea
src/framework/operator.cpp
浏览文件 @
7cc864ea
...
@@ -28,7 +28,10 @@ OperatorBase<Dtype>::OperatorBase(const std::string &type,
...
@@ -28,7 +28,10 @@ OperatorBase<Dtype>::OperatorBase(const std::string &type,
const
VariableNameMap
&
outputs
,
const
VariableNameMap
&
outputs
,
const
AttributeMap
&
attrs
,
const
AttributeMap
&
attrs
,
std
::
shared_ptr
<
Scope
>
scope
)
std
::
shared_ptr
<
Scope
>
scope
)
:
type_
(
type
),
inputs_
(
inputs
),
outputs_
(
outputs
),
attrs_
(
attrs
),
:
type_
(
type
),
inputs_
(
inputs
),
outputs_
(
outputs
),
attrs_
(
attrs
),
scope_
(
scope
)
{
scope_
(
scope
)
{
CheckAllInputOutputSet
();
CheckAllInputOutputSet
();
}
}
...
...
src/framework/operator.h
浏览文件 @
7cc864ea
...
@@ -48,8 +48,9 @@ static std::unordered_map<
...
@@ -48,8 +48,9 @@ static std::unordered_map<
{
"feed"
,
{{
"X"
},
{
"Out"
}}},
{
"feed"
,
{{
"X"
},
{
"Out"
}}},
{
"fetch"
,
{{
"X"
},
{
"Out"
}}}};
{
"fetch"
,
{{
"X"
},
{
"Out"
}}}};
template
<
typename
Dtype
>
class
OperatorBase
:
PaddleMobileObject
{
template
<
typename
Dtype
>
public:
class
OperatorBase
:
PaddleMobileObject
{
public:
OperatorBase
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
OperatorBase
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
AttributeMap
&
attrs
,
const
VariableNameMap
&
outputs
,
const
AttributeMap
&
attrs
,
std
::
shared_ptr
<
Scope
>
scope
);
std
::
shared_ptr
<
Scope
>
scope
);
...
@@ -66,20 +67,20 @@ public:
...
@@ -66,20 +67,20 @@ public:
}
}
}
}
protected:
protected:
std
::
shared_ptr
<
Scope
>
scope_
;
std
::
shared_ptr
<
Scope
>
scope_
;
std
::
string
type_
;
std
::
string
type_
;
VariableNameMap
inputs_
;
VariableNameMap
inputs_
;
VariableNameMap
outputs_
;
VariableNameMap
outputs_
;
AttributeMap
attrs_
;
AttributeMap
attrs_
;
private:
private:
void
CheckAllInputOutputSet
()
const
;
void
CheckAllInputOutputSet
()
const
;
};
};
template
<
typename
Dtype
>
template
<
typename
Dtype
>
class
OperatorWithKernel
:
public
OperatorBase
<
Dtype
>
{
class
OperatorWithKernel
:
public
OperatorBase
<
Dtype
>
{
public:
public:
OperatorWithKernel
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
OperatorWithKernel
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
AttributeMap
&
attrs
,
const
VariableNameMap
&
outputs
,
const
AttributeMap
&
attrs
,
std
::
shared_ptr
<
Scope
>
scope
)
std
::
shared_ptr
<
Scope
>
scope
)
...
@@ -88,8 +89,9 @@ public:
...
@@ -88,8 +89,9 @@ public:
virtual
void
Run
()
const
=
0
;
virtual
void
Run
()
const
=
0
;
};
};
template
<
typename
Dtype
,
typename
P
>
class
OpKernelBase
:
PaddleMobileObject
{
template
<
typename
Dtype
,
typename
P
>
public:
class
OpKernelBase
:
PaddleMobileObject
{
public:
virtual
void
Compute
(
const
P
&
para
)
const
=
0
;
virtual
void
Compute
(
const
P
&
para
)
const
=
0
;
virtual
~
OpKernelBase
()
=
default
;
virtual
~
OpKernelBase
()
=
default
;
...
...
src/framework/paddle_mobile_object.h
浏览文件 @
7cc864ea
...
@@ -18,19 +18,19 @@ SOFTWARE.
...
@@ -18,19 +18,19 @@ SOFTWARE.
#pragma once
#pragma once
#include "stdio.h"
#include <string>
#include <string>
#include "stdio.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
class
PaddleMobileObject
{
class
PaddleMobileObject
{
public:
public:
virtual
std
::
string
ToString
()
{
virtual
std
::
string
ToString
()
{
char
address
[
128
]
=
{
0
};
char
address
[
128
]
=
{
0
};
sprintf
(
address
,
"%p"
,
this
);
sprintf
(
address
,
"%p"
,
this
);
return
std
::
string
(
address
);
return
std
::
string
(
address
);
}
}
private:
private:
};
};
}
// namespace paddle_mobile
}
// namespace paddle_mobile
src/framework/program-optimize/node.cpp
浏览文件 @
7cc864ea
src/framework/program-optimize/node.h
浏览文件 @
7cc864ea
...
@@ -29,7 +29,7 @@ namespace paddle_mobile {
...
@@ -29,7 +29,7 @@ namespace paddle_mobile {
namespace
framework
{
namespace
framework
{
class
Node
:
PaddleMobileObject
{
class
Node
:
PaddleMobileObject
{
public:
public:
Node
(
const
std
::
string
&
type
)
:
type_
(
type
)
{}
Node
(
const
std
::
string
&
type
)
:
type_
(
type
)
{}
Node
(
std
::
shared_ptr
<
OpDesc
>
op_desc
)
Node
(
std
::
shared_ptr
<
OpDesc
>
op_desc
)
:
op_desc_
(
op_desc
),
type_
(
op_desc
->
Type
()){};
:
op_desc_
(
op_desc
),
type_
(
op_desc
->
Type
()){};
...
@@ -39,7 +39,7 @@ public:
...
@@ -39,7 +39,7 @@ public:
Node
&
To
(
int
index
);
Node
&
To
(
int
index
);
uint
depth
(
uint
begin
=
0
);
uint
depth
(
uint
begin
=
0
);
private:
private:
std
::
shared_ptr
<
OpDesc
>
op_desc_
;
std
::
shared_ptr
<
OpDesc
>
op_desc_
;
std
::
string
ToString
(
std
::
string
blank
,
const
Node
*
node
)
const
;
std
::
string
ToString
(
std
::
string
blank
,
const
Node
*
node
)
const
;
std
::
vector
<
std
::
shared_ptr
<
Node
>>
outputs_
;
std
::
vector
<
std
::
shared_ptr
<
Node
>>
outputs_
;
...
...
src/framework/program-optimize/program_optimize.cpp
浏览文件 @
7cc864ea
...
@@ -24,8 +24,8 @@ namespace framework {
...
@@ -24,8 +24,8 @@ namespace framework {
std
::
shared_ptr
<
ProgramDesc
>
ProgramOptimize
::
Optimize
()
{}
std
::
shared_ptr
<
ProgramDesc
>
ProgramOptimize
::
Optimize
()
{}
std
::
shared_ptr
<
ProgramDesc
>
std
::
shared_ptr
<
ProgramDesc
>
ProgramOptimize
::
FushionOptimize
(
ProgramOptimize
::
FushionOptimize
(
std
::
shared_ptr
<
ProgramDesc
>
ori_des
)
{
std
::
shared_ptr
<
ProgramDesc
>
ori_des
)
{
for
(
int
i
=
0
;
i
<
ori_des
->
Blocks
().
size
();
++
i
)
{
for
(
int
i
=
0
;
i
<
ori_des
->
Blocks
().
size
();
++
i
)
{
std
::
unordered_map
<
std
::
string
,
std
::
shared_ptr
<
Node
>>
output_nodes
;
std
::
unordered_map
<
std
::
string
,
std
::
shared_ptr
<
Node
>>
output_nodes
;
std
::
shared_ptr
<
Node
>
begin_node
;
std
::
shared_ptr
<
Node
>
begin_node
;
...
...
src/framework/program-optimize/program_optimize.h
浏览文件 @
7cc864ea
...
@@ -26,13 +26,13 @@ namespace paddle_mobile {
...
@@ -26,13 +26,13 @@ namespace paddle_mobile {
namespace
framework
{
namespace
framework
{
class
ProgramOptimize
{
class
ProgramOptimize
{
public:
public:
ProgramOptimize
()
{}
ProgramOptimize
()
{}
std
::
shared_ptr
<
ProgramDesc
>
Optimize
();
std
::
shared_ptr
<
ProgramDesc
>
Optimize
();
std
::
shared_ptr
<
ProgramDesc
>
std
::
shared_ptr
<
ProgramDesc
>
FushionOptimize
(
FushionOptimize
(
std
::
shared_ptr
<
ProgramDesc
>
ori_des
);
std
::
shared_ptr
<
ProgramDesc
>
ori_des
);
private:
private:
// std::shared_ptr<ProgramDesc> ori_desc_;
// std::shared_ptr<ProgramDesc> ori_desc_;
std
::
vector
<
std
::
unordered_map
<
std
::
string
,
std
::
shared_ptr
<
Node
>>>
std
::
vector
<
std
::
unordered_map
<
std
::
string
,
std
::
shared_ptr
<
Node
>>>
outputs_nodes_
;
outputs_nodes_
;
...
...
src/framework/program.cpp
浏览文件 @
7cc864ea
src/framework/program.h
浏览文件 @
7cc864ea
...
@@ -28,12 +28,12 @@ namespace framework {
...
@@ -28,12 +28,12 @@ namespace framework {
template
<
typename
Dtype
,
Precision
P
=
Precision
::
FP32
>
template
<
typename
Dtype
,
Precision
P
=
Precision
::
FP32
>
class
Program
:
PaddleMobileObject
{
class
Program
:
PaddleMobileObject
{
public:
public:
std
::
shared_ptr
<
ProgramDesc
>
originProgram
;
std
::
shared_ptr
<
ProgramDesc
>
originProgram
;
std
::
shared_ptr
<
ProgramDesc
>
optimizeProgram
;
std
::
shared_ptr
<
ProgramDesc
>
optimizeProgram
;
std
::
shared_ptr
<
Scope
>
scope
;
std
::
shared_ptr
<
Scope
>
scope
;
private:
private:
};
};
}
// namespace framework
}
// namespace framework
...
...
src/framework/program_desc.cpp
浏览文件 @
7cc864ea
src/framework/program_desc.h
浏览文件 @
7cc864ea
...
@@ -28,12 +28,12 @@ namespace paddle_mobile {
...
@@ -28,12 +28,12 @@ namespace paddle_mobile {
namespace
framework
{
namespace
framework
{
class
ProgramDesc
:
PaddleMobileObject
{
class
ProgramDesc
:
PaddleMobileObject
{
public:
public:
ProgramDesc
(
const
proto
::
ProgramDesc
&
desc
);
ProgramDesc
(
const
proto
::
ProgramDesc
&
desc
);
std
::
shared_ptr
<
BlockDesc
>
Block
(
size_t
idx
);
std
::
shared_ptr
<
BlockDesc
>
Block
(
size_t
idx
);
const
std
::
vector
<
std
::
shared_ptr
<
BlockDesc
>>
&
Blocks
()
{
return
blocks_
;
};
const
std
::
vector
<
std
::
shared_ptr
<
BlockDesc
>>
&
Blocks
()
{
return
blocks_
;
};
private:
private:
std
::
vector
<
std
::
shared_ptr
<
BlockDesc
>>
blocks_
;
std
::
vector
<
std
::
shared_ptr
<
BlockDesc
>>
blocks_
;
proto
::
ProgramDesc
desc_
;
proto
::
ProgramDesc
desc_
;
};
};
...
...
src/framework/scope.cc
浏览文件 @
7cc864ea
src/framework/scope.h
浏览文件 @
7cc864ea
...
@@ -18,15 +18,15 @@ SOFTWARE.
...
@@ -18,15 +18,15 @@ SOFTWARE.
==============================================================================*/
==============================================================================*/
#pragma once
#pragma once
#include "variable.h"
#include <list> //std::list
#include <list> //std::list
#include <mutex> //std::mutex
#include <mutex> //std::mutex
#include <unordered_map> //std::unordered_map
#include <unordered_map> //std::unordered_map
#include "variable.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
framework
{
namespace
framework
{
class
Scope
{
class
Scope
{
public:
public:
Scope
()
{}
Scope
()
{}
~
Scope
()
{}
~
Scope
()
{}
...
@@ -67,7 +67,7 @@ public:
...
@@ -67,7 +67,7 @@ public:
Variable
*
FindVarLocally
(
const
std
::
string
&
name
)
const
;
Variable
*
FindVarLocally
(
const
std
::
string
&
name
)
const
;
private:
private:
// Call Scope::NewScope for a sub-scope.
// Call Scope::NewScope for a sub-scope.
explicit
Scope
(
Scope
const
*
parent
)
:
parent_
(
parent
)
{}
explicit
Scope
(
Scope
const
*
parent
)
:
parent_
(
parent
)
{}
...
...
src/framework/selected_rows.h
浏览文件 @
7cc864ea
...
@@ -27,7 +27,7 @@ namespace paddle_mobile {
...
@@ -27,7 +27,7 @@ namespace paddle_mobile {
namespace
framework
{
namespace
framework
{
class
SelectedRows
{
class
SelectedRows
{
public:
public:
SelectedRows
(
const
std
::
vector
<
int64_t
>
&
rows
,
const
int64_t
&
height
)
SelectedRows
(
const
std
::
vector
<
int64_t
>
&
rows
,
const
int64_t
&
height
)
:
rows_
(
rows
),
height_
(
height
)
{
:
rows_
(
rows
),
height_
(
height
)
{
value_
.
reset
(
new
Tensor
());
value_
.
reset
(
new
Tensor
());
...
@@ -67,7 +67,7 @@ public:
...
@@ -67,7 +67,7 @@ public:
return
make_ddim
(
dims
);
return
make_ddim
(
dims
);
}
}
private:
private:
// Notice: rows can be duplicate. We can have {0, 4, 7, 0, 5, 7, 9}
// Notice: rows can be duplicate. We can have {0, 4, 7, 0, 5, 7, 9}
// here.
// here.
// SelectedRows are simply concated when adding together. Until a
// SelectedRows are simply concated when adding together. Until a
...
...
src/framework/tensor.h
浏览文件 @
7cc864ea
...
@@ -26,9 +26,11 @@ limitations under the License. */
...
@@ -26,9 +26,11 @@ limitations under the License. */
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
framework
{
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
{
size_t
operator
()(
std
::
type_index
type
)
const
{
if
(
typeid
(
T
).
hash_code
()
==
type
.
hash_code
())
{
if
(
typeid
(
T
).
hash_code
()
==
type
.
hash_code
())
{
return
sizeof
(
T
);
return
sizeof
(
T
);
...
@@ -38,7 +40,8 @@ template <typename T> struct SizeOfTypeFunctor<T> {
...
@@ -38,7 +40,8 @@ template <typename T> struct SizeOfTypeFunctor<T> {
}
}
};
};
template
<
>
struct
SizeOfTypeFunctor
<>
{
template
<
>
struct
SizeOfTypeFunctor
<>
{
size_t
operator
()(
std
::
type_index
type
)
const
{
return
0UL
;
}
size_t
operator
()(
std
::
type_index
type
)
const
{
return
0UL
;
}
};
};
...
@@ -66,11 +69,12 @@ static inline size_t SizeOfType(std::type_index type) {
...
@@ -66,11 +69,12 @@ static inline size_t SizeOfType(std::type_index type) {
class
LoDTensor
;
class
LoDTensor
;
class
Tensor
{
class
Tensor
{
public:
public:
Tensor
()
:
offset_
(
0
)
{}
Tensor
()
:
offset_
(
0
)
{}
/*! Return a pointer to mutable memory block. */
/*! Return a pointer to mutable memory block. */
template
<
typename
T
>
inline
T
*
data
()
{
template
<
typename
T
>
inline
T
*
data
()
{
check_memory_size
();
check_memory_size
();
// PADDLE_ENFORCE(std::is_same<T, void>::value ||
// PADDLE_ENFORCE(std::is_same<T, void>::value ||
// holder_->type().hash_code() ==
// holder_->type().hash_code() ==
...
@@ -82,7 +86,8 @@ public:
...
@@ -82,7 +86,8 @@ public:
}
}
/*! Return a pointer to constant memory block. */
/*! 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
();
check_memory_size
();
// PADDLE_ENFORCE(std::is_same<T, void>::value ||
// PADDLE_ENFORCE(std::is_same<T, void>::value ||
// holder_->type().hash_code() ==
// holder_->type().hash_code() ==
...
@@ -100,7 +105,8 @@ public:
...
@@ -100,7 +105,8 @@ public:
* @brief Return a pointer to mutable memory block.
* @brief Return a pointer to mutable memory block.
* @note If not exist, then allocation.
* @note If not exist, then allocation.
*/
*/
template
<
typename
T
>
inline
T
*
mutable_data
()
{
template
<
typename
T
>
inline
T
*
mutable_data
()
{
static_assert
(
std
::
is_pod
<
T
>::
value
,
"T must be POD"
);
static_assert
(
std
::
is_pod
<
T
>::
value
,
"T must be POD"
);
return
reinterpret_cast
<
T
*>
(
mutable_data
(
typeid
(
T
)));
return
reinterpret_cast
<
T
*>
(
mutable_data
(
typeid
(
T
)));
}
}
...
@@ -141,7 +147,8 @@ public:
...
@@ -141,7 +147,8 @@ public:
*
*
* @note If not exist, then allocation.
* @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"
);
static_assert
(
std
::
is_pod
<
T
>::
value
,
"T must be POD"
);
Resize
(
dims
);
Resize
(
dims
);
return
mutable_data
<
T
>
();
return
mutable_data
<
T
>
();
...
@@ -235,7 +242,7 @@ public:
...
@@ -235,7 +242,7 @@ public:
inline
void
set_layout
(
const
DataLayout
layout
)
{
layout_
=
layout
;
}
inline
void
set_layout
(
const
DataLayout
layout
)
{
layout_
=
layout
;
}
private:
private:
/**
/**
* @note Placeholder hides type T, so it doesn't appear as a
* @note Placeholder hides type T, so it doesn't appear as a
* template
* template
...
@@ -257,7 +264,8 @@ private:
...
@@ -257,7 +264,8 @@ private:
PlaceholderImpl
(
size_t
size
,
std
::
type_index
type
)
PlaceholderImpl
(
size_t
size
,
std
::
type_index
type
)
:
ptr_
(
static_cast
<
uint8_t
*>
(
memory
::
Alloc
(
size
)),
:
ptr_
(
static_cast
<
uint8_t
*>
(
memory
::
Alloc
(
size
)),
memory
::
PODDeleter
<
uint8_t
>
()),
memory
::
PODDeleter
<
uint8_t
>
()),
size_
(
size
),
type_
(
type
)
{
size_
(
size
),
type_
(
type
)
{
// PADDLE_ENFORCE_NOT_NULL(ptr_,
// PADDLE_ENFORCE_NOT_NULL(ptr_,
// "Insufficient %s
// "Insufficient %s
// memory to allocation.",
// memory to allocation.",
...
...
src/framework/tensor_util.cc
浏览文件 @
7cc864ea
...
@@ -51,7 +51,8 @@ void TensorCopySync(const Tensor &src, Tensor *dst) {
...
@@ -51,7 +51,8 @@ void TensorCopySync(const Tensor &src, Tensor *dst) {
memory
::
Copy
(
dst_ptr
,
src_ptr
,
size
);
memory
::
Copy
(
dst_ptr
,
src_ptr
,
size
);
}
}
template
<
typename
Predicate
>
struct
AnyDTypeVisitor
{
template
<
typename
Predicate
>
struct
AnyDTypeVisitor
{
Predicate
predicate_
;
Predicate
predicate_
;
const
Tensor
&
tensor_
;
const
Tensor
&
tensor_
;
Tensor
*
out_
;
Tensor
*
out_
;
...
@@ -59,7 +60,8 @@ template <typename Predicate> struct AnyDTypeVisitor {
...
@@ -59,7 +60,8 @@ template <typename Predicate> struct AnyDTypeVisitor {
AnyDTypeVisitor
(
Predicate
predicate
,
const
Tensor
&
tensor
,
Tensor
*
out
)
AnyDTypeVisitor
(
Predicate
predicate
,
const
Tensor
&
tensor
,
Tensor
*
out
)
:
predicate_
(
predicate
),
tensor_
(
tensor
),
out_
(
out
)
{}
:
predicate_
(
predicate
),
tensor_
(
tensor
),
out_
(
out
)
{}
template
<
typename
T
>
void
operator
()()
const
{
template
<
typename
T
>
void
operator
()()
const
{
// auto t = EigenVector<T>::Flatten(tensor_);
// auto t = EigenVector<T>::Flatten(tensor_);
// auto o = EigenScalar<bool>::From(*out_);
// auto o = EigenScalar<bool>::From(*out_);
// return any of predicate_(t) is true.
// return any of predicate_(t) is true.
...
@@ -74,7 +76,8 @@ inline void AnyImpl(Predicate predicate, const Tensor &tensor,
...
@@ -74,7 +76,8 @@ inline void AnyImpl(Predicate predicate, const Tensor &tensor,
AnyDTypeVisitor
<
Predicate
>
(
predicate
,
tensor
,
out
));
AnyDTypeVisitor
<
Predicate
>
(
predicate
,
tensor
,
out
));
}
}
template
<
typename
Predicate
>
struct
AnyVisitor
{
template
<
typename
Predicate
>
struct
AnyVisitor
{
const
framework
::
Tensor
&
tensor_
;
const
framework
::
Tensor
&
tensor_
;
Predicate
predicate_
;
Predicate
predicate_
;
...
@@ -164,7 +167,8 @@ struct DeserializedDataFunctor {
...
@@ -164,7 +167,8 @@ struct DeserializedDataFunctor {
DeserializedDataFunctor
(
void
**
buf
,
Tensor
*
tensor
)
DeserializedDataFunctor
(
void
**
buf
,
Tensor
*
tensor
)
:
buf_
(
buf
),
tensor_
(
tensor
)
{}
:
buf_
(
buf
),
tensor_
(
tensor
)
{}
template
<
typename
T
>
void
operator
()()
{
template
<
typename
T
>
void
operator
()()
{
*
buf_
=
tensor_
->
mutable_data
<
T
>
();
*
buf_
=
tensor_
->
mutable_data
<
T
>
();
}
}
...
...
src/framework/tensor_util.h
浏览文件 @
7cc864ea
...
@@ -13,11 +13,11 @@ See the License for the specific language governing permissions and
...
@@ -13,11 +13,11 @@ See the License for the specific language governing permissions and
limitations under the License. */
limitations under the License. */
#pragma once
#pragma once
#include <vector>
#include "framework.pb.h"
#include "framework.pb.h"
#include "memory/t_malloc.h"
#include "memory/t_malloc.h"
#include "platform/data_type.h"
#include "platform/data_type.h"
#include "tensor.h"
#include "tensor.h"
#include <vector>
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
framework
{
namespace
framework
{
...
...
src/framework/var_desc.cpp
浏览文件 @
7cc864ea
src/framework/var_desc.h
浏览文件 @
7cc864ea
...
@@ -25,7 +25,7 @@ namespace paddle_mobile {
...
@@ -25,7 +25,7 @@ namespace paddle_mobile {
namespace
framework
{
namespace
framework
{
class
VarDesc
{
class
VarDesc
{
public:
public:
VarDesc
(
const
proto
::
VarDesc
&
desc
);
VarDesc
(
const
proto
::
VarDesc
&
desc
);
std
::
string
Name
()
const
{
return
desc_
.
name
();
}
std
::
string
Name
()
const
{
return
desc_
.
name
();
}
...
@@ -80,7 +80,7 @@ public:
...
@@ -80,7 +80,7 @@ public:
return
this
->
RepeatedToVector
(
tensor_desc
().
dims
());
return
this
->
RepeatedToVector
(
tensor_desc
().
dims
());
}
}
private:
private:
proto
::
VarDesc
desc_
;
proto
::
VarDesc
desc_
;
};
};
...
...
src/framework/var_type.h
浏览文件 @
7cc864ea
src/framework/variable.h
浏览文件 @
7cc864ea
...
@@ -18,18 +18,19 @@ SOFTWARE.
...
@@ -18,18 +18,19 @@ SOFTWARE.
==============================================================================*/
==============================================================================*/
#pragma once
#pragma once
#include "paddle_mobile_object.h"
#include <iostream>
#include <iostream>
#include <memory>
#include <memory>
#include <string>
#include <string>
#include <typeindex>
#include <typeindex>
#include <typeinfo>
#include <typeinfo>
#include "paddle_mobile_object.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
framework
{
namespace
framework
{
class
Variable
:
public
PaddleMobileObject
{
class
Variable
:
public
PaddleMobileObject
{
public:
public:
template
<
typename
T
>
const
T
*
Get
()
const
{
template
<
typename
T
>
const
T
*
Get
()
const
{
return
static_cast
<
const
T
*>
(
holder_
->
Ptr
());
return
static_cast
<
const
T
*>
(
holder_
->
Ptr
());
}
}
...
@@ -37,7 +38,8 @@ public:
...
@@ -37,7 +38,8 @@ public:
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
(
!
IsType
<
T
>
())
{
if
(
*
Name
()
==
"pixel"
)
{
if
(
*
Name
()
==
"pixel"
)
{
// std::cout << " reset " << *Name() <<
// std::cout << " reset " << *Name() <<
...
@@ -48,7 +50,8 @@ public:
...
@@ -48,7 +50,8 @@ public:
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_
)
{
if
(
holder_
)
{
// printf("not null \n");
// printf("not null \n");
printf
(
" holder type : %s, this type %s
\n
"
,
holder_
->
Type
().
name
(),
printf
(
" holder type : %s, this type %s
\n
"
,
holder_
->
Type
().
name
(),
...
@@ -67,7 +70,7 @@ public:
...
@@ -67,7 +70,7 @@ public:
void
SetName
(
const
std
::
string
*
name
)
{
name_
=
name
;
}
void
SetName
(
const
std
::
string
*
name
)
{
name_
=
name
;
}
private:
private:
struct
Placeholder
{
struct
Placeholder
{
Placeholder
()
=
default
;
Placeholder
()
=
default
;
virtual
~
Placeholder
()
=
default
;
virtual
~
Placeholder
()
=
default
;
...
@@ -76,7 +79,8 @@ private:
...
@@ -76,7 +79,8 @@ private:
virtual
void
*
Ptr
()
const
=
0
;
virtual
void
*
Ptr
()
const
=
0
;
};
};
template
<
typename
T
>
struct
PlaceholderImp
:
public
Placeholder
{
template
<
typename
T
>
struct
PlaceholderImp
:
public
Placeholder
{
explicit
PlaceholderImp
(
T
*
ptr
)
:
ptr_
(
ptr
),
type_
(
typeid
(
T
))
{}
explicit
PlaceholderImp
(
T
*
ptr
)
:
ptr_
(
ptr
),
type_
(
typeid
(
T
))
{}
virtual
const
std
::
type_info
&
Type
()
const
{
return
type_
;
}
virtual
const
std
::
type_info
&
Type
()
const
{
return
type_
;
}
...
...
src/io.cpp
浏览文件 @
7cc864ea
...
@@ -18,13 +18,13 @@ SOFTWARE.
...
@@ -18,13 +18,13 @@ SOFTWARE.
#include <fstream>
#include <fstream>
#include "../src/io.h"
#include "common/log.h"
#include "common/log.h"
#include "framework/framework.pb.h"
#include "framework/framework.pb.h"
#include "framework/lod_tensor.h"
#include "framework/lod_tensor.h"
#include "framework/program_desc.h"
#include "framework/program_desc.h"
#include "framework/scope.h"
#include "framework/scope.h"
#include "framework/tensor.h"
#include "framework/tensor.h"
#include "io.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
...
@@ -41,26 +41,20 @@ void ReadBinaryFile(const std::string &filename, std::string *contents) {
...
@@ -41,26 +41,20 @@ void ReadBinaryFile(const std::string &filename, std::string *contents) {
template
<
typename
Dtype
,
Precision
P
>
template
<
typename
Dtype
,
Precision
P
>
void
Loader
<
Dtype
,
P
>::
LoadVar
(
framework
::
LoDTensor
*
tensor
,
void
Loader
<
Dtype
,
P
>::
LoadVar
(
framework
::
LoDTensor
*
tensor
,
const
std
::
string
&
file_path
)
{
const
std
::
string
&
file_path
)
{
// LOG(kLOG_DEBUG) << " to load " << file_path;
// Log(kLOG_DEBUG) << "123";
std
::
ifstream
is
(
file_path
);
std
::
ifstream
is
(
file_path
);
std
::
streampos
pos
=
is
.
tellg
();
// save current position
std
::
fpos
<
mbstate_t
>
pos
;
pos
=
is
.
tellg
();
// save current position
is
.
seekg
(
0
,
std
::
ios
::
end
);
is
.
seekg
(
0
,
std
::
ios
::
end
);
// LOG(kLOG_DEBUG) << " file length = " << is.tellg();
is
.
seekg
(
pos
);
// restore saved position
is
.
seekg
(
pos
);
// restore saved position
// 1. version
// 1. version
uint32_t
version
;
uint32_t
version
;
is
.
read
(
reinterpret_cast
<
char
*>
(
&
version
),
sizeof
(
version
));
is
.
read
(
reinterpret_cast
<
char
*>
(
&
version
),
sizeof
(
version
));
// LOG(kLOG_INFO) << " version: " << version;
// 2 Lod information
// 2 Lod information
uint64_t
lod_level
;
uint64_t
lod_level
;
is
.
read
(
reinterpret_cast
<
char
*>
(
&
lod_level
),
sizeof
(
lod_level
));
is
.
read
(
reinterpret_cast
<
char
*>
(
&
lod_level
),
sizeof
(
lod_level
));
// LOG(kLOG_DEBUG) << " load level: " << lod_level;
// LOG(kLOG_DEBUG) << " lod info: ";
auto
&
lod
=
*
tensor
->
mutable_lod
();
auto
&
lod
=
*
tensor
->
mutable_lod
();
lod
.
resize
(
lod_level
);
lod
.
resize
(
lod_level
);
for
(
uint64_t
i
=
0
;
i
<
lod_level
;
++
i
)
{
for
(
uint64_t
i
=
0
;
i
<
lod_level
;
++
i
)
{
...
@@ -69,8 +63,8 @@ void Loader<Dtype, P>::LoadVar(framework::LoDTensor *tensor,
...
@@ -69,8 +63,8 @@ void Loader<Dtype, P>::LoadVar(framework::LoDTensor *tensor,
std
::
vector
<
size_t
>
tmp
(
size
/
sizeof
(
size_t
));
std
::
vector
<
size_t
>
tmp
(
size
/
sizeof
(
size_t
));
is
.
read
(
reinterpret_cast
<
char
*>
(
tmp
.
data
()),
is
.
read
(
reinterpret_cast
<
char
*>
(
tmp
.
data
()),
static_cast
<
std
::
streamsize
>
(
size
));
static_cast
<
std
::
streamsize
>
(
size
));
for
(
int
j
=
0
;
j
<
tmp
.
size
();
++
j
)
{
for
(
auto
j
:
tmp
)
{
LOG
(
kLOG_DEBUG1
)
<<
" lod - "
<<
tmp
[
j
]
;
LOG
(
kLOG_DEBUG1
)
<<
" lod - "
<<
j
;
}
}
lod
[
i
]
=
tmp
;
lod
[
i
]
=
tmp
;
}
}
...
@@ -78,26 +72,19 @@ void Loader<Dtype, P>::LoadVar(framework::LoDTensor *tensor,
...
@@ -78,26 +72,19 @@ void Loader<Dtype, P>::LoadVar(framework::LoDTensor *tensor,
// 3. tensor version
// 3. tensor version
uint32_t
tensor_version
;
uint32_t
tensor_version
;
is
.
read
(
reinterpret_cast
<
char
*>
(
&
tensor_version
),
sizeof
(
tensor_version
));
is
.
read
(
reinterpret_cast
<
char
*>
(
&
tensor_version
),
sizeof
(
tensor_version
));
// std::cout << " tensor_version: " << tensor_version << std::endl;
// 4. tensor desc
// 4. tensor desc
int32_t
size
;
int32_t
size
;
is
.
read
(
reinterpret_cast
<
char
*>
(
&
size
),
sizeof
(
size
));
is
.
read
(
reinterpret_cast
<
char
*>
(
&
size
),
sizeof
(
size
));
// std::cout << " tensor desc size: " << size << std::endl;
std
::
unique_ptr
<
char
[]
>
buf
(
new
char
[
size
]);
std
::
unique_ptr
<
char
[]
>
buf
(
new
char
[
size
]);
is
.
read
(
reinterpret_cast
<
char
*>
(
buf
.
get
()),
size
);
is
.
read
(
reinterpret_cast
<
char
*>
(
buf
.
get
()),
size
);
framework
::
proto
::
VarType
::
TensorDesc
desc
;
framework
::
proto
::
VarType
::
TensorDesc
desc
;
desc
.
ParseFromArray
(
buf
.
get
(),
size
);
desc
.
ParseFromArray
(
buf
.
get
(),
size
);
// std::cout << " desc dims size " << desc.dims().size() <<
// std::endl;
int
memory_size
=
1
;
int
memory_size
=
1
;
for
(
int
l
=
0
;
l
<
desc
.
dims
().
size
();
++
l
)
{
for
(
auto
l
:
desc
.
dims
())
{
// std::cout << " dim " << l << " value: " << desc.dims()[l]
memory_size
*=
l
;
// <<
// std::endl;
memory_size
*=
desc
.
dims
()[
l
];
}
}
std
::
vector
<
int64_t
>
dims
;
std
::
vector
<
int64_t
>
dims
;
...
@@ -105,50 +92,39 @@ void Loader<Dtype, P>::LoadVar(framework::LoDTensor *tensor,
...
@@ -105,50 +92,39 @@ void Loader<Dtype, P>::LoadVar(framework::LoDTensor *tensor,
std
::
copy
(
desc
.
dims
().
begin
(),
desc
.
dims
().
end
(),
std
::
back_inserter
(
dims
));
std
::
copy
(
desc
.
dims
().
begin
(),
desc
.
dims
().
end
(),
std
::
back_inserter
(
dims
));
tensor
->
Resize
(
framework
::
make_ddim
(
dims
));
tensor
->
Resize
(
framework
::
make_ddim
(
dims
));
void
*
memory
;
void
*
memory
=
tensor
;
int
type_size
=
0
;
int
type_size
=
0
;
// std::cout << " desc pre type: ";
switch
(
desc
.
data_type
())
{
switch
(
desc
.
data_type
())
{
case
framework
::
proto
::
VarType
::
FP16
:
case
framework
::
proto
::
VarType
::
FP16
:
// std::cout << "FP16" << std::endl;
type_size
=
2
;
type_size
=
2
;
break
;
break
;
case
framework
::
proto
::
VarType
::
FP32
:
case
framework
::
proto
::
VarType
::
FP32
:
type_size
=
4
;
type_size
=
4
;
memory
=
tensor
->
mutable_data
<
float
>
();
memory
=
tensor
->
mutable_data
<
float
>
();
// std::cout << "FP32" << std::endl;
break
;
break
;
case
framework
::
proto
::
VarType
::
FP64
:
case
framework
::
proto
::
VarType
::
FP64
:
type_size
=
8
;
type_size
=
8
;
// std::cout << "FP64" << std::endl;
break
;
break
;
case
framework
::
proto
::
VarType
::
INT32
:
case
framework
::
proto
::
VarType
::
INT32
:
type_size
=
4
;
type_size
=
4
;
// std::cout << "INT32" << std::endl;
break
;
break
;
case
framework
::
proto
::
VarType
::
INT64
:
case
framework
::
proto
::
VarType
::
INT64
:
type_size
=
8
;
type_size
=
8
;
// std::cout << "INT64" << std::endl;
break
;
break
;
case
framework
::
proto
::
VarType
::
BOOL
:
case
framework
::
proto
::
VarType
::
BOOL
:
type_size
=
1
;
type_size
=
1
;
// std::cout << "BOOL" << std::endl;
break
;
break
;
default:
default:
break
;
break
;
// std::cout << " not support" << std::endl;
}
}
// std::cout << " malloc size: " << memory_size * type_size <<
// std::endl;
is
.
read
(
static_cast
<
char
*>
(
memory
),
memory_size
*
type_size
);
is
.
read
(
static_cast
<
char
*>
(
memory
),
memory_size
*
type_size
);
// std::cout << " memory: " << memory << std::endl;
is
.
close
();
is
.
close
();
}
;
}
template
<
typename
Dtype
,
Precision
P
>
template
<
typename
Dtype
,
Precision
P
>
const
framework
::
Program
<
Dtype
,
P
>
const
framework
::
Program
<
Dtype
,
P
>
Loader
<
Dtype
,
P
>::
Load
(
Loader
<
Dtype
,
P
>::
Load
(
const
std
::
string
&
dirname
)
{
const
std
::
string
&
dirname
)
{
std
::
string
model_filename
=
dirname
+
"/__model__"
;
std
::
string
model_filename
=
dirname
+
"/__model__"
;
std
::
string
program_desc_str
;
std
::
string
program_desc_str
;
ReadBinaryFile
(
model_filename
,
&
program_desc_str
);
ReadBinaryFile
(
model_filename
,
&
program_desc_str
);
...
@@ -165,10 +141,9 @@ Loader<Dtype, P>::Load(const std::string &dirname) {
...
@@ -165,10 +141,9 @@ Loader<Dtype, P>::Load(const std::string &dirname) {
std
::
make_shared
<
framework
::
Scope
>
();
std
::
make_shared
<
framework
::
Scope
>
();
program
.
scope
=
scope
;
program
.
scope
=
scope
;
auto
block
=
originProgramDesc
->
Block
(
0
);
originProgramDesc
->
Block
(
0
);
for
(
auto
block
:
originProgramDesc
->
Blocks
())
{
for
(
const
auto
&
block
:
originProgramDesc
->
Blocks
())
{
// std::cout << "for block" << std::endl;
for
(
int
i
=
0
;
i
<
block
->
Vars
().
size
();
++
i
)
{
for
(
int
i
=
0
;
i
<
block
->
Vars
().
size
();
++
i
)
{
std
::
shared_ptr
<
framework
::
VarDesc
>
var_desc
=
block
->
Vars
()[
i
];
std
::
shared_ptr
<
framework
::
VarDesc
>
var_desc
=
block
->
Vars
()[
i
];
auto
var
=
scope
->
Var
(
var_desc
->
Name
());
auto
var
=
scope
->
Var
(
var_desc
->
Name
());
...
@@ -176,20 +151,18 @@ Loader<Dtype, P>::Load(const std::string &dirname) {
...
@@ -176,20 +151,18 @@ Loader<Dtype, P>::Load(const std::string &dirname) {
if
(
var_desc
->
Persistable
()
&&
if
(
var_desc
->
Persistable
()
&&
var_desc
->
GetType
()
!=
framework
::
proto
::
VarType
::
FEED_MINIBATCH
&&
var_desc
->
GetType
()
!=
framework
::
proto
::
VarType
::
FEED_MINIBATCH
&&
var_desc
->
GetType
()
!=
framework
::
proto
::
VarType
::
FETCH_LIST
)
{
var_desc
->
GetType
()
!=
framework
::
proto
::
VarType
::
FETCH_LIST
)
{
framework
::
LoDTensor
*
tensor
=
auto
tensor
=
var
->
GetMutable
<
framework
::
LoDTensor
>
();
var
->
GetMutable
<
framework
::
LoDTensor
>
();
// to load
// to load
LoadVar
(
tensor
,
dirname
+
"/"
+
var_desc
->
Name
());
LoadVar
(
tensor
,
dirname
+
"/"
+
var_desc
->
Name
());
}
}
}
else
{
}
else
{
//
std::cout << "非 lod" << std::endl;
//
TODO by someone
}
}
}
}
}
}
#ifdef PADDLE_MOBILE_DEBUG
#ifdef PADDLE_MOBILE_DEBUG
for
(
int
i
=
0
;
i
<
program_desc_proto
.
blocks
().
size
();
++
i
)
{
for
(
const
auto
&
block
:
program_desc_proto
.
blocks
())
{
framework
::
proto
::
BlockDesc
block
=
program_desc_proto
.
blocks
()[
i
];
LOG
(
kLOG_DEBUG
)
<<
"block: "
<<
block
.
idx
();
LOG
(
kLOG_DEBUG
)
<<
"block: "
<<
block
.
idx
();
for
(
int
j
=
0
;
j
<
block
.
ops
().
size
();
++
j
)
{
for
(
int
j
=
0
;
j
<
block
.
ops
().
size
();
++
j
)
{
if
(
j
==
2
)
{
if
(
j
==
2
)
{
...
@@ -200,21 +173,20 @@ Loader<Dtype, P>::Load(const std::string &dirname) {
...
@@ -200,21 +173,20 @@ Loader<Dtype, P>::Load(const std::string &dirname) {
for
(
int
m
=
0
;
m
<
op
.
inputs_size
();
++
m
)
{
for
(
int
m
=
0
;
m
<
op
.
inputs_size
();
++
m
)
{
const
framework
::
proto
::
OpDesc
::
Var
&
var
=
op
.
inputs
(
m
);
const
framework
::
proto
::
OpDesc
::
Var
&
var
=
op
.
inputs
(
m
);
LOG
(
kLOG_DEBUG2
)
<<
"input parameter: "
<<
var
.
parameter
();
LOG
(
kLOG_DEBUG2
)
<<
"input parameter: "
<<
var
.
parameter
();
for
(
int
n
=
0
;
n
<
var
.
arguments
().
size
();
++
n
)
{
for
(
const
auto
&
n
:
var
.
arguments
()
)
{
LOG
(
kLOG_DEBUG3
)
<<
"argument - "
<<
var
.
arguments
()[
n
]
;
LOG
(
kLOG_DEBUG3
)
<<
"argument - "
<<
n
;
}
}
}
}
for
(
int
y
=
0
;
y
<
op
.
outputs_size
();
++
y
)
{
for
(
int
y
=
0
;
y
<
op
.
outputs_size
();
++
y
)
{
const
framework
::
proto
::
OpDesc
::
Var
&
var
=
op
.
outputs
(
y
);
const
framework
::
proto
::
OpDesc
::
Var
&
var
=
op
.
outputs
(
y
);
LOG
(
kLOG_DEBUG2
)
<<
"out parameter: "
<<
var
.
parameter
();
LOG
(
kLOG_DEBUG2
)
<<
"out parameter: "
<<
var
.
parameter
();
for
(
int
z
=
0
;
z
<
var
.
arguments
().
size
();
++
z
)
{
for
(
const
auto
&
z
:
var
.
arguments
()
)
{
LOG
(
kLOG_DEBUG3
)
<<
"argument - "
<<
var
.
arguments
()[
z
]
;
LOG
(
kLOG_DEBUG3
)
<<
"argument - "
<<
z
;
}
}
}
}
for
(
int
x
=
0
;
x
<
op
.
attrs
().
size
();
++
x
)
{
for
(
const
auto
&
attr
:
op
.
attrs
())
{
const
framework
::
proto
::
OpDesc_Attr
attr
=
op
.
attrs
()[
x
];
LOG
(
kLOG_DEBUG2
)
<<
"attr name: "
<<
attr
.
name
();
LOG
(
kLOG_DEBUG2
)
<<
"attr name: "
<<
attr
.
name
();
switch
(
attr
.
type
())
{
switch
(
attr
.
type
())
{
...
@@ -246,19 +218,19 @@ Loader<Dtype, P>::Load(const std::string &dirname) {
...
@@ -246,19 +218,19 @@ Loader<Dtype, P>::Load(const std::string &dirname) {
for
(
int
y
=
0
;
y
<
attr
.
strings_size
();
++
y
)
{
for
(
int
y
=
0
;
y
<
attr
.
strings_size
();
++
y
)
{
LOG
(
kLOG_DEBUG3
)
<<
"strings: "
<<
attr
.
strings
(
y
);
LOG
(
kLOG_DEBUG3
)
<<
"strings: "
<<
attr
.
strings
(
y
);
}
}
case
framework
::
proto
::
BLOCK
:
break
;
}
}
}
}
}
}
for
(
int
k
=
0
;
k
<
block
.
vars
().
size
();
++
k
)
{
for
(
const
auto
&
var
:
block
.
vars
())
{
framework
::
proto
::
VarDesc
var
=
block
.
vars
()[
k
];
if
(
var
.
type
().
type
()
==
framework
::
proto
::
VarType
::
LOD_TENSOR
)
{
if
(
var
.
type
().
type
()
==
framework
::
proto
::
VarType
::
LOD_TENSOR
)
{
LOG
(
kLOG_DEBUG1
)
<<
"var name: "
<<
var
.
name
();
LOG
(
kLOG_DEBUG1
)
<<
"var name: "
<<
var
.
name
();
const
framework
::
proto
::
VarType
::
TensorDesc
&
tensor_desc
=
const
framework
::
proto
::
VarType
::
TensorDesc
&
tensor_desc
=
var
.
type
().
lod_tensor
().
tensor
();
var
.
type
().
lod_tensor
().
tensor
();
LOG
(
kLOG_DEBUG2
)
<<
"in var tensor desc dims size: "
LOG
(
kLOG_DEBUG2
)
<<
"in var tensor desc dims size: "
<<
tensor_desc
.
dims
().
size
();
<<
tensor_desc
.
dims
().
size
();
int
memory_size
=
1
;
for
(
int
l
=
0
;
l
<
tensor_desc
.
dims
().
size
();
++
l
)
{
for
(
int
l
=
0
;
l
<
tensor_desc
.
dims
().
size
();
++
l
)
{
LOG
(
kLOG_DEBUG3
)
<<
"var tensor desc dim "
<<
l
LOG
(
kLOG_DEBUG3
)
<<
"var tensor desc dim "
<<
l
<<
" value: "
<<
tensor_desc
.
dims
()[
l
];
<<
" value: "
<<
tensor_desc
.
dims
()[
l
];
...
@@ -268,28 +240,20 @@ Loader<Dtype, P>::Load(const std::string &dirname) {
...
@@ -268,28 +240,20 @@ Loader<Dtype, P>::Load(const std::string &dirname) {
if
(
var
.
persistable
()
&&
if
(
var
.
persistable
()
&&
var
.
type
().
type
()
!=
framework
::
proto
::
VarType
::
FEED_MINIBATCH
&&
var
.
type
().
type
()
!=
framework
::
proto
::
VarType
::
FEED_MINIBATCH
&&
var
.
type
().
type
()
!=
framework
::
proto
::
VarType
::
FETCH_LIST
)
{
var
.
type
().
type
()
!=
framework
::
proto
::
VarType
::
FETCH_LIST
)
{
// std::cout << " to load " << var.name() <<
// std::endl;
std
::
string
file_path
=
dirname
+
"/"
+
var
.
name
();
std
::
string
file_path
=
dirname
+
"/"
+
var
.
name
();
std
::
ifstream
is
(
file_path
);
std
::
ifstream
is
(
file_path
);
std
::
streampos
pos
=
is
.
tellg
();
// save current position
std
::
fpos
<
mbstate_t
>
pos
;
pos
=
is
.
tellg
();
// save current position
is
.
seekg
(
0
,
std
::
ios
::
end
);
is
.
seekg
(
0
,
std
::
ios
::
end
);
// std::cout << " file length = " << is.tellg() <<
// std::endl;
is
.
seekg
(
pos
);
// restore saved position
is
.
seekg
(
pos
);
// restore saved position
// 1. version
// 1. version
uint32_t
version
;
uint32_t
version
;
is
.
read
(
reinterpret_cast
<
char
*>
(
&
version
),
sizeof
(
version
));
is
.
read
(
reinterpret_cast
<
char
*>
(
&
version
),
sizeof
(
version
));
// std::cout << " version: " << version <<
// std::endl;
// 2 Lod information
// 2 Lod information
uint64_t
lod_level
;
uint64_t
lod_level
;
is
.
read
(
reinterpret_cast
<
char
*>
(
&
lod_level
),
sizeof
(
lod_level
));
is
.
read
(
reinterpret_cast
<
char
*>
(
&
lod_level
),
sizeof
(
lod_level
));
// std::cout << " load level: " << lod_level <<
// std::endl;
// std::cout << " lod info: " << std::endl;
for
(
uint64_t
i
=
0
;
i
<
lod_level
;
++
i
)
{
for
(
uint64_t
i
=
0
;
i
<
lod_level
;
++
i
)
{
uint64_t
size
;
uint64_t
size
;
is
.
read
(
reinterpret_cast
<
char
*>
(
&
size
),
sizeof
(
size
));
is
.
read
(
reinterpret_cast
<
char
*>
(
&
size
),
sizeof
(
size
));
...
@@ -297,83 +261,53 @@ Loader<Dtype, P>::Load(const std::string &dirname) {
...
@@ -297,83 +261,53 @@ Loader<Dtype, P>::Load(const std::string &dirname) {
is
.
read
(
reinterpret_cast
<
char
*>
(
tmp
.
data
()),
is
.
read
(
reinterpret_cast
<
char
*>
(
tmp
.
data
()),
static_cast
<
std
::
streamsize
>
(
size
));
static_cast
<
std
::
streamsize
>
(
size
));
for
(
int
j
=
0
;
j
<
tmp
.
size
();
++
j
)
{
for
(
int
j
=
0
;
j
<
tmp
.
size
();
++
j
)
{
// std::cout << " lod - " << tmp[j] <<
// std::endl;
}
}
}
}
uint32_t
tensor_version
;
is
.
read
(
reinterpret_cast
<
char
*>
(
&
version
),
sizeof
(
version
));
is
.
read
(
reinterpret_cast
<
char
*>
(
&
version
),
sizeof
(
version
));
// std::cout << " tensor_version: " <<
// tensor_version <<
// std::endl;
int32_t
size
;
int32_t
size
;
is
.
read
(
reinterpret_cast
<
char
*>
(
&
size
),
sizeof
(
size
));
is
.
read
(
reinterpret_cast
<
char
*>
(
&
size
),
sizeof
(
size
));
// std::cout << " tensor desc size: " << size <<
// std::endl;
std
::
unique_ptr
<
char
[]
>
buf
(
new
char
[
size
]);
std
::
unique_ptr
<
char
[]
>
buf
(
new
char
[
size
]);
is
.
read
(
reinterpret_cast
<
char
*>
(
buf
.
get
()),
size
);
is
.
read
(
reinterpret_cast
<
char
*>
(
buf
.
get
()),
size
);
framework
::
proto
::
VarType
::
TensorDesc
desc
;
framework
::
proto
::
VarType
::
TensorDesc
desc
;
desc
.
ParseFromArray
(
buf
.
get
(),
size
);
desc
.
ParseFromArray
(
buf
.
get
(),
size
);
// std::cout << " desc dims size " <<
// desc.dims().size() <<
// std::endl;
int
memory_size
=
1
;
int
memory_size
=
1
;
for
(
int
l
=
0
;
l
<
desc
.
dims
().
size
();
++
l
)
{
for
(
long
long
l
:
desc
.
dims
())
{
// std::cout << " dim " << l << " value: "
memory_size
*=
l
;
// <<
// desc.dims()[l]
// << std::endl;
memory_size
*=
desc
.
dims
()[
l
];
}
}
int
type_size
=
0
;
int
type_size
=
0
;
// std::cout << " desc pre type: ";
switch
(
desc
.
data_type
())
{
switch
(
desc
.
data_type
())
{
case
framework
::
proto
::
VarType
::
FP16
:
case
framework
::
proto
::
VarType
::
FP16
:
// std::cout << "FP16" << std::endl;
type_size
=
2
;
type_size
=
2
;
break
;
break
;
case
framework
::
proto
::
VarType
::
FP32
:
case
framework
::
proto
::
VarType
::
FP32
:
type_size
=
4
;
type_size
=
4
;
// std::cout << "FP32" << std::endl;
break
;
break
;
case
framework
::
proto
::
VarType
::
FP64
:
case
framework
::
proto
::
VarType
::
FP64
:
type_size
=
8
;
type_size
=
8
;
// std::cout << "FP64" << std::endl;
break
;
break
;
case
framework
::
proto
::
VarType
::
INT32
:
case
framework
::
proto
::
VarType
::
INT32
:
type_size
=
4
;
type_size
=
4
;
// std::cout << "INT32" << std::endl;
break
;
break
;
case
framework
::
proto
::
VarType
::
INT64
:
case
framework
::
proto
::
VarType
::
INT64
:
type_size
=
8
;
type_size
=
8
;
// std::cout << "INT64" << std::endl;
break
;
break
;
case
framework
::
proto
::
VarType
::
BOOL
:
case
framework
::
proto
::
VarType
::
BOOL
:
type_size
=
1
;
type_size
=
1
;
// std::cout << "BOOL" << std::endl;
break
;
break
;
default:
default:
break
;
break
;
// std::cout << " not support" <<
// std::endl;
}
}
// std::cout << " malloc size: " << memory_size *
// type_size
// << std::endl;
void
*
memory
=
malloc
(
memory_size
*
type_size
);
void
*
memory
=
malloc
(
memory_size
*
type_size
);
is
.
read
(
static_cast
<
char
*>
(
memory
),
memory_size
*
type_size
);
is
.
read
(
static_cast
<
char
*>
(
memory
),
memory_size
*
type_size
);
// std::cout << " memory: " << memory <<
// std::endl;
is
.
close
();
is
.
close
();
}
else
{
}
else
{
// std::cout << " *not load "
// TODO
// << " var : " << var.name() << std::endl;
}
}
}
}
}
}
...
...
src/io.h
浏览文件 @
7cc864ea
...
@@ -29,10 +29,10 @@ namespace paddle_mobile {
...
@@ -29,10 +29,10 @@ namespace paddle_mobile {
template
<
typename
Dtype
,
Precision
P
=
Precision
::
FP32
>
template
<
typename
Dtype
,
Precision
P
=
Precision
::
FP32
>
class
Loader
:
PaddleMobileObject
{
class
Loader
:
PaddleMobileObject
{
public:
public:
const
framework
::
Program
<
Dtype
,
P
>
Load
(
const
std
::
string
&
dirname
);
const
framework
::
Program
<
Dtype
,
P
>
Load
(
const
std
::
string
&
dirname
);
private:
private:
void
LoadVar
(
framework
::
LoDTensor
*
tensor
,
const
std
::
string
&
file_path
);
void
LoadVar
(
framework
::
LoDTensor
*
tensor
,
const
std
::
string
&
file_path
);
};
};
...
...
src/memory/t_malloc.cc
浏览文件 @
7cc864ea
src/memory/t_malloc.h
浏览文件 @
7cc864ea
...
@@ -37,10 +37,11 @@ void Free(void *ptr);
...
@@ -37,10 +37,11 @@ void Free(void *ptr);
* std::unique_ptr<T> in tensor.h.
* std::unique_ptr<T> in tensor.h.
* static_cast
* static_cast
*/
*/
template
<
typename
T
>
class
PODDeleter
{
template
<
typename
T
>
class
PODDeleter
{
static_assert
(
std
::
is_pod
<
T
>::
value
,
"T must be POD"
);
static_assert
(
std
::
is_pod
<
T
>::
value
,
"T must be POD"
);
public:
public:
explicit
PODDeleter
(){};
explicit
PODDeleter
(){};
void
operator
()(
T
*
ptr
)
{
Free
(
static_cast
<
void
*>
(
ptr
));
}
void
operator
()(
T
*
ptr
)
{
Free
(
static_cast
<
void
*>
(
ptr
));
}
...
@@ -54,8 +55,9 @@ public:
...
@@ -54,8 +55,9 @@ public:
* std::unique_ptr<T> in tensor.h.
* std::unique_ptr<T> in tensor.h.
* reinterpret_cast
* reinterpret_cast
*/
*/
template
<
typename
T
>
class
PlainDeleter
{
template
<
typename
T
>
public:
class
PlainDeleter
{
public:
explicit
PlainDeleter
(){};
explicit
PlainDeleter
(){};
void
operator
()(
T
*
ptr
)
{
Free
(
reinterpret_cast
<
void
*>
(
ptr
));
}
void
operator
()(
T
*
ptr
)
{
Free
(
reinterpret_cast
<
void
*>
(
ptr
));
}
...
...
src/operators/batchnorm_op.cpp
浏览文件 @
7cc864ea
src/operators/batchnorm_op.h
浏览文件 @
7cc864ea
...
@@ -27,7 +27,7 @@ using namespace framework;
...
@@ -27,7 +27,7 @@ using namespace framework;
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
BatchNormOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
class
BatchNormOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
public:
public:
BatchNormOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
BatchNormOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
attrs
,
const
framework
::
AttributeMap
attrs
,
...
@@ -44,7 +44,7 @@ public:
...
@@ -44,7 +44,7 @@ public:
using
framework
::
OperatorWithKernel
<
DeviceType
>::
OperatorWithKernel
;
using
framework
::
OperatorWithKernel
<
DeviceType
>::
OperatorWithKernel
;
void
InferShape
()
const
override
;
void
InferShape
()
const
override
;
protected:
protected:
BatchNormParam
param_
;
BatchNormParam
param_
;
};
};
...
...
src/operators/concat_op.cpp
浏览文件 @
7cc864ea
src/operators/concat_op.h
浏览文件 @
7cc864ea
...
@@ -26,7 +26,7 @@ using namespace framework;
...
@@ -26,7 +26,7 @@ using namespace framework;
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
ConcatOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
class
ConcatOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
public:
public:
ConcatOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
ConcatOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
attrs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
attrs
,
std
::
shared_ptr
<
framework
::
Scope
>
scope
)
std
::
shared_ptr
<
framework
::
Scope
>
scope
)
...
@@ -42,7 +42,7 @@ public:
...
@@ -42,7 +42,7 @@ public:
using
framework
::
OperatorWithKernel
<
DeviceType
>::
OperatorWithKernel
;
using
framework
::
OperatorWithKernel
<
DeviceType
>::
OperatorWithKernel
;
void
InferShape
()
const
override
;
void
InferShape
()
const
override
;
protected:
protected:
ConcatParam
param_
;
ConcatParam
param_
;
};
};
...
...
src/operators/conv_op.cpp
浏览文件 @
7cc864ea
src/operators/conv_op.h
浏览文件 @
7cc864ea
...
@@ -28,7 +28,7 @@ using namespace framework;
...
@@ -28,7 +28,7 @@ using namespace framework;
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
ConvOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
class
ConvOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
public:
public:
ConvOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
ConvOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
&
attrs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
&
attrs
,
std
::
shared_ptr
<
framework
::
Scope
>
scope
)
std
::
shared_ptr
<
framework
::
Scope
>
scope
)
...
@@ -45,7 +45,7 @@ public:
...
@@ -45,7 +45,7 @@ public:
this
->
ClearVariables
({
"Filter"
,
"Input"
});
this
->
ClearVariables
({
"Filter"
,
"Input"
});
}
}
private:
private:
ConvParam
param_
;
ConvParam
param_
;
};
};
...
...
src/operators/elementwise_add_op.cpp
浏览文件 @
7cc864ea
src/operators/elementwise_add_op.h
浏览文件 @
7cc864ea
...
@@ -27,7 +27,7 @@ using namespace framework;
...
@@ -27,7 +27,7 @@ using namespace framework;
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
ElementwiseAddOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
class
ElementwiseAddOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
public:
public:
ElementwiseAddOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
ElementwiseAddOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
attrs
,
const
framework
::
AttributeMap
attrs
,
...
@@ -44,7 +44,7 @@ public:
...
@@ -44,7 +44,7 @@ public:
using
framework
::
OperatorWithKernel
<
DeviceType
>::
OperatorWithKernel
;
using
framework
::
OperatorWithKernel
<
DeviceType
>::
OperatorWithKernel
;
void
InferShape
()
const
override
;
void
InferShape
()
const
override
;
protected:
protected:
ElementwiseAddParam
param_
;
ElementwiseAddParam
param_
;
};
};
}
// namespace operators
}
// namespace operators
...
...
src/operators/kernel/arm/batchnorm_kernel.cpp
浏览文件 @
7cc864ea
src/operators/kernel/arm/concat_kernel.cpp
浏览文件 @
7cc864ea
...
@@ -18,8 +18,9 @@ limitations under the License. */
...
@@ -18,8 +18,9 @@ limitations under the License. */
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
template
<
typename
T
>
class
ConcatFunctor
{
template
<
typename
T
>
public:
class
ConcatFunctor
{
public:
void
operator
()(
const
std
::
vector
<
framework
::
Tensor
>
&
input
,
const
int
axis
,
void
operator
()(
const
std
::
vector
<
framework
::
Tensor
>
&
input
,
const
int
axis
,
framework
::
Tensor
*
output
)
{
framework
::
Tensor
*
output
)
{
size_t
num
=
input
.
size
();
size_t
num
=
input
.
size
();
...
...
src/operators/kernel/arm/conv_kernel.cpp
浏览文件 @
7cc864ea
...
@@ -34,7 +34,8 @@ bool IsExpand(const std::vector<int64_t> &filter_dim,
...
@@ -34,7 +34,8 @@ bool IsExpand(const std::vector<int64_t> &filter_dim,
return
!
(
filter_1
&&
strides_1
&&
padding_0
&&
dilation_1
);
return
!
(
filter_1
&&
strides_1
&&
padding_0
&&
dilation_1
);
}
}
template
<
>
void
ConvKernel
<
CPU
,
float
>::
Compute
(
const
ConvParam
&
param
)
const
{
template
<
>
void
ConvKernel
<
CPU
,
float
>::
Compute
(
const
ConvParam
&
param
)
const
{
LOG
(
kLOG_DEBUG
)
<<
param
;
LOG
(
kLOG_DEBUG
)
<<
param
;
const
Tensor
*
input
=
param
.
Input
();
const
Tensor
*
input
=
param
.
Input
();
...
...
src/operators/kernel/arm/elementwise_add_kernel.cpp
浏览文件 @
7cc864ea
...
@@ -19,7 +19,8 @@ limitations under the License. */
...
@@ -19,7 +19,8 @@ limitations under the License. */
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
template
<
typename
T
>
struct
AddFunctor
{
template
<
typename
T
>
struct
AddFunctor
{
inline
T
operator
()(
T
a
,
T
b
)
const
{
return
a
+
b
;
}
inline
T
operator
()(
T
a
,
T
b
)
const
{
return
a
+
b
;
}
};
};
...
...
src/operators/kernel/arm/lrn_kernel.cpp
浏览文件 @
7cc864ea
...
@@ -23,7 +23,8 @@ SOFTWARE.
...
@@ -23,7 +23,8 @@ SOFTWARE.
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
template
<
>
void
LrnKernel
<
CPU
,
float
>::
Compute
(
const
LrnParam
&
param
)
const
{
template
<
>
void
LrnKernel
<
CPU
,
float
>::
Compute
(
const
LrnParam
&
param
)
const
{
const
Tensor
*
input_x
=
param
.
InputX
();
const
Tensor
*
input_x
=
param
.
InputX
();
auto
x_dims
=
input_x
->
dims
();
auto
x_dims
=
input_x
->
dims
();
/// data_format = NCHW
/// data_format = NCHW
...
...
src/operators/kernel/arm/mul_kernel.cpp
浏览文件 @
7cc864ea
...
@@ -23,7 +23,8 @@ SOFTWARE.
...
@@ -23,7 +23,8 @@ SOFTWARE.
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
template
<
>
void
MulKernel
<
CPU
,
float
>::
Compute
(
const
MulParam
&
param
)
const
{
template
<
>
void
MulKernel
<
CPU
,
float
>::
Compute
(
const
MulParam
&
param
)
const
{
const
Tensor
*
input_x
=
param
.
InputX
();
const
Tensor
*
input_x
=
param
.
InputX
();
const
Tensor
*
input_y
=
param
.
InputY
();
const
Tensor
*
input_y
=
param
.
InputY
();
Tensor
*
out
=
param
.
Out
();
Tensor
*
out
=
param
.
Out
();
...
...
src/operators/kernel/arm/pool_kernel.cpp
浏览文件 @
7cc864ea
...
@@ -15,8 +15,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
...
@@ -15,8 +15,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
==============================================================================*/
==============================================================================*/
#include "common/log.h"
#include <operators/kernel/pool_kernel.h>
#include <operators/kernel/pool_kernel.h>
#include "common/log.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
...
@@ -36,7 +36,8 @@ inline void PoolBasic(std::string pooling_type, std::vector<int> ksize,
...
@@ -36,7 +36,8 @@ inline void PoolBasic(std::string pooling_type, std::vector<int> ksize,
}
}
}
}
template
<
>
void
PoolKernel
<
CPU
,
float
>::
Compute
(
const
PoolParam
&
param
)
const
{
template
<
>
void
PoolKernel
<
CPU
,
float
>::
Compute
(
const
PoolParam
&
param
)
const
{
const
Tensor
*
in_x
=
param
.
Input
();
const
Tensor
*
in_x
=
param
.
Input
();
Tensor
*
out
=
param
.
Output
();
Tensor
*
out
=
param
.
Output
();
std
::
string
pooling_type
=
param
.
PoolingType
();
std
::
string
pooling_type
=
param
.
PoolingType
();
...
...
src/operators/kernel/batchnorm_kernel.h
浏览文件 @
7cc864ea
...
@@ -28,7 +28,7 @@ using namespace framework;
...
@@ -28,7 +28,7 @@ using namespace framework;
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
BatchNormKernel
class
BatchNormKernel
:
public
framework
::
OpKernelBase
<
DeviceType
,
BatchNormParam
>
{
:
public
framework
::
OpKernelBase
<
DeviceType
,
BatchNormParam
>
{
public:
public:
void
Compute
(
const
BatchNormParam
&
param
)
const
;
void
Compute
(
const
BatchNormParam
&
param
)
const
;
};
};
...
...
src/operators/kernel/concat_kernel.h
浏览文件 @
7cc864ea
...
@@ -26,7 +26,7 @@ using namespace framework;
...
@@ -26,7 +26,7 @@ using namespace framework;
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
ConcatKernel
:
public
framework
::
OpKernelBase
<
DeviceType
,
ConcatParam
>
{
class
ConcatKernel
:
public
framework
::
OpKernelBase
<
DeviceType
,
ConcatParam
>
{
public:
public:
void
Compute
(
const
ConcatParam
&
param
)
const
;
void
Compute
(
const
ConcatParam
&
param
)
const
;
};
};
...
...
src/operators/kernel/conv_kernel.h
浏览文件 @
7cc864ea
...
@@ -31,7 +31,7 @@ using namespace framework;
...
@@ -31,7 +31,7 @@ using namespace framework;
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
ConvKernel
:
public
framework
::
OpKernelBase
<
DeviceType
,
ConvParam
>
{
class
ConvKernel
:
public
framework
::
OpKernelBase
<
DeviceType
,
ConvParam
>
{
public:
public:
void
Compute
(
const
ConvParam
&
param
)
const
;
void
Compute
(
const
ConvParam
&
param
)
const
;
};
};
}
// namespace operators
}
// namespace operators
...
...
src/operators/kernel/elementwise_add_kernel.h
浏览文件 @
7cc864ea
...
@@ -29,7 +29,7 @@ using namespace framework;
...
@@ -29,7 +29,7 @@ using namespace framework;
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
ElementwiseAddKernel
class
ElementwiseAddKernel
:
public
framework
::
OpKernelBase
<
DeviceType
,
ElementwiseAddParam
>
{
:
public
framework
::
OpKernelBase
<
DeviceType
,
ElementwiseAddParam
>
{
public:
public:
void
Compute
(
const
ElementwiseAddParam
&
param
)
const
;
void
Compute
(
const
ElementwiseAddParam
&
param
)
const
;
};
};
}
// namespace operators
}
// namespace operators
...
...
src/operators/kernel/fpga/conv_kernel.cpp
浏览文件 @
7cc864ea
src/operators/kernel/lrn_kernel.h
浏览文件 @
7cc864ea
...
@@ -25,7 +25,8 @@ namespace operators {
...
@@ -25,7 +25,8 @@ namespace operators {
using
namespace
framework
;
using
namespace
framework
;
template
<
typename
T
>
struct
LRNFunctor
{
template
<
typename
T
>
struct
LRNFunctor
{
void
operator
()(
const
framework
::
Tensor
&
input
,
framework
::
Tensor
*
out
,
int
N
,
void
operator
()(
const
framework
::
Tensor
&
input
,
framework
::
Tensor
*
out
,
int
N
,
int
C
,
int
H
,
int
W
,
int
n
,
T
k
,
T
alpha
,
T
beta
)
{
int
C
,
int
H
,
int
W
,
int
n
,
T
k
,
T
alpha
,
T
beta
)
{
auto
input_ptr
=
input
.
data
<
T
>
();
auto
input_ptr
=
input
.
data
<
T
>
();
...
@@ -67,7 +68,7 @@ template <typename T> struct LRNFunctor {
...
@@ -67,7 +68,7 @@ template <typename T> struct LRNFunctor {
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
LrnKernel
:
public
framework
::
OpKernelBase
<
DeviceType
,
LrnParam
>
{
class
LrnKernel
:
public
framework
::
OpKernelBase
<
DeviceType
,
LrnParam
>
{
public:
public:
void
Compute
(
const
LrnParam
&
param
)
const
;
void
Compute
(
const
LrnParam
&
param
)
const
;
};
};
}
// namespace operators
}
// namespace operators
...
...
src/operators/kernel/mul_kernel.h
浏览文件 @
7cc864ea
...
@@ -28,7 +28,7 @@ using namespace framework;
...
@@ -28,7 +28,7 @@ using namespace framework;
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
MulKernel
:
public
framework
::
OpKernelBase
<
DeviceType
,
MulParam
>
{
class
MulKernel
:
public
framework
::
OpKernelBase
<
DeviceType
,
MulParam
>
{
public:
public:
void
Compute
(
const
MulParam
&
param
)
const
;
void
Compute
(
const
MulParam
&
param
)
const
;
};
};
}
// namespace operators
}
// namespace operators
...
...
src/operators/kernel/pool_kernel.h
浏览文件 @
7cc864ea
...
@@ -28,7 +28,7 @@ using namespace framework;
...
@@ -28,7 +28,7 @@ using namespace framework;
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
PoolKernel
:
public
framework
::
OpKernelBase
<
DeviceType
,
PoolParam
>
{
class
PoolKernel
:
public
framework
::
OpKernelBase
<
DeviceType
,
PoolParam
>
{
public:
public:
void
Compute
(
const
PoolParam
&
param
)
const
;
void
Compute
(
const
PoolParam
&
param
)
const
;
};
};
}
// namespace operators
}
// namespace operators
...
...
src/operators/lrn_op.cpp
浏览文件 @
7cc864ea
...
@@ -21,7 +21,8 @@ SOFTWARE.
...
@@ -21,7 +21,8 @@ SOFTWARE.
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
template
<
typename
Dtype
,
typename
T
>
void
LrnOp
<
Dtype
,
T
>::
InferShape
()
const
{
template
<
typename
Dtype
,
typename
T
>
void
LrnOp
<
Dtype
,
T
>::
InferShape
()
const
{
auto
x_dims
=
param_
.
InputX
()
->
dims
();
auto
x_dims
=
param_
.
InputX
()
->
dims
();
param_
.
Out
()
->
Resize
(
x_dims
);
param_
.
Out
()
->
Resize
(
x_dims
);
}
}
...
...
src/operators/lrn_op.h
浏览文件 @
7cc864ea
...
@@ -27,7 +27,7 @@ using namespace framework;
...
@@ -27,7 +27,7 @@ using namespace framework;
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
LrnOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
class
LrnOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
public:
public:
LrnOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
LrnOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
attrs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
attrs
,
std
::
shared_ptr
<
framework
::
Scope
>
scope
)
std
::
shared_ptr
<
framework
::
Scope
>
scope
)
...
@@ -43,7 +43,7 @@ public:
...
@@ -43,7 +43,7 @@ public:
using
framework
::
OperatorWithKernel
<
DeviceType
>::
OperatorWithKernel
;
using
framework
::
OperatorWithKernel
<
DeviceType
>::
OperatorWithKernel
;
void
InferShape
()
const
override
;
void
InferShape
()
const
override
;
protected:
protected:
LrnParam
param_
;
LrnParam
param_
;
};
};
...
...
src/operators/math/elementwise_op_function.h
浏览文件 @
7cc864ea
...
@@ -58,8 +58,7 @@ inline void trim_trailing_singular_dims(framework::DDim *dims) {
...
@@ -58,8 +58,7 @@ inline void trim_trailing_singular_dims(framework::DDim *dims) {
// Remove trailing dimensions of size 1 for y
// Remove trailing dimensions of size 1 for y
auto
actual_dims_size
=
dims
->
size
();
auto
actual_dims_size
=
dims
->
size
();
for
(;
actual_dims_size
!=
0
;
--
actual_dims_size
)
{
for
(;
actual_dims_size
!=
0
;
--
actual_dims_size
)
{
if
((
*
dims
)[
actual_dims_size
-
1
]
!=
1
)
if
((
*
dims
)[
actual_dims_size
-
1
]
!=
1
)
break
;
break
;
}
}
if
(
actual_dims_size
!=
dims
->
size
())
{
if
(
actual_dims_size
!=
dims
->
size
())
{
auto
actual_dims
=
framework
::
vectorize
(
*
dims
);
auto
actual_dims
=
framework
::
vectorize
(
*
dims
);
...
@@ -68,8 +67,9 @@ inline void trim_trailing_singular_dims(framework::DDim *dims) {
...
@@ -68,8 +67,9 @@ inline void trim_trailing_singular_dims(framework::DDim *dims) {
}
}
}
}
template
<
typename
T
>
class
RowwiseTransformIterator
{
template
<
typename
T
>
public:
class
RowwiseTransformIterator
{
public:
RowwiseTransformIterator
(
const
T
*
ptr
,
int
n
)
:
ptr_
(
ptr
),
i_
(
0
),
n_
(
n
)
{}
RowwiseTransformIterator
(
const
T
*
ptr
,
int
n
)
:
ptr_
(
ptr
),
i_
(
0
),
n_
(
n
)
{}
RowwiseTransformIterator
<
T
>
&
operator
++
()
{
RowwiseTransformIterator
<
T
>
&
operator
++
()
{
...
@@ -90,7 +90,7 @@ public:
...
@@ -90,7 +90,7 @@ public:
const
T
&
operator
*
()
{
return
ptr_
[
i_
];
}
const
T
&
operator
*
()
{
return
ptr_
[
i_
];
}
private:
private:
const
T
*
ptr_
;
const
T
*
ptr_
;
int
i_
;
int
i_
;
int64_t
n_
;
int64_t
n_
;
...
@@ -100,8 +100,9 @@ private:
...
@@ -100,8 +100,9 @@ private:
/// dimension
/// dimension
/// in (4,20,2) is 2 ,
/// in (4,20,2) is 2 ,
/// (20,1) move 1 stride , to fill(add) 2 element with the same number.
/// (20,1) move 1 stride , to fill(add) 2 element with the same number.
template
<
typename
T
>
class
MidWiseTransformIterator
{
template
<
typename
T
>
public:
class
MidWiseTransformIterator
{
public:
MidWiseTransformIterator
(
const
T
*
ptr
,
int
n
,
int
post
)
MidWiseTransformIterator
(
const
T
*
ptr
,
int
n
,
int
post
)
:
ptr_
(
ptr
),
i_
(
0
),
j_
(
0
),
n_
(
n
),
post_
(
post
)
{}
:
ptr_
(
ptr
),
i_
(
0
),
j_
(
0
),
n_
(
n
),
post_
(
post
)
{}
...
@@ -127,7 +128,7 @@ public:
...
@@ -127,7 +128,7 @@ public:
const
T
&
operator
*
()
{
return
ptr_
[
i_
];
}
const
T
&
operator
*
()
{
return
ptr_
[
i_
];
}
private:
private:
const
T
*
ptr_
;
const
T
*
ptr_
;
int64_t
i_
;
int64_t
i_
;
int64_t
j_
;
int64_t
j_
;
...
@@ -137,11 +138,14 @@ private:
...
@@ -137,11 +138,14 @@ private:
template
<
typename
Functor
,
typename
T
,
typename
OutType
=
T
>
template
<
typename
Functor
,
typename
T
,
typename
OutType
=
T
>
class
TransformFunctor
{
class
TransformFunctor
{
public:
public:
TransformFunctor
(
const
framework
::
Tensor
*
x
,
const
framework
::
Tensor
*
y
,
TransformFunctor
(
const
framework
::
Tensor
*
x
,
const
framework
::
Tensor
*
y
,
framework
::
Tensor
*
z
,
Functor
func
)
framework
::
Tensor
*
z
,
Functor
func
)
:
x_
(
x
->
data
<
T
>
()),
y_
(
y
->
data
<
T
>
()),
z_
(
z
->
mutable_data
<
OutType
>
()),
:
x_
(
x
->
data
<
T
>
()),
nx_
(
x
->
numel
()),
func_
(
func
)
{}
y_
(
y
->
data
<
T
>
()),
z_
(
z
->
mutable_data
<
OutType
>
()),
nx_
(
x
->
numel
()),
func_
(
func
)
{}
inline
void
Run
()
const
{
inline
void
Run
()
const
{
math
::
Transform
trans
;
math
::
Transform
trans
;
...
@@ -159,7 +163,7 @@ public:
...
@@ -159,7 +163,7 @@ public:
trans
(
x_
,
x_
+
nx_
,
MidWiseTransformIterator
<
T
>
(
y_
,
n
,
post
),
z_
,
func_
);
trans
(
x_
,
x_
+
nx_
,
MidWiseTransformIterator
<
T
>
(
y_
,
n
,
post
),
z_
,
func_
);
}
}
private:
private:
const
T
*
x_
;
const
T
*
x_
;
const
T
*
y_
;
const
T
*
y_
;
OutType
*
z_
;
OutType
*
z_
;
...
...
src/operators/math/im2col.cc
浏览文件 @
7cc864ea
...
@@ -25,8 +25,9 @@ namespace math {
...
@@ -25,8 +25,9 @@ namespace math {
* [input_channels, filter_height, filter_width, output_height,
* [input_channels, filter_height, filter_width, output_height,
* output_width]
* output_width]
*/
*/
template
<
class
T
>
class
Im2ColFunctor
<
ColFormat
::
kCFO
,
CPU
,
T
>
{
template
<
class
T
>
public:
class
Im2ColFunctor
<
ColFormat
::
kCFO
,
CPU
,
T
>
{
public:
void
operator
()(
const
framework
::
Tensor
&
im
,
const
std
::
vector
<
int
>
&
dilation
,
void
operator
()(
const
framework
::
Tensor
&
im
,
const
std
::
vector
<
int
>
&
dilation
,
const
std
::
vector
<
int
>
&
stride
,
const
std
::
vector
<
int
>
&
stride
,
const
std
::
vector
<
int
>
&
padding
,
framework
::
Tensor
*
col
)
{
const
std
::
vector
<
int
>
&
padding
,
framework
::
Tensor
*
col
)
{
...
@@ -93,8 +94,9 @@ public:
...
@@ -93,8 +94,9 @@ public:
* [input_channels, filter_height, filter_width, output_height,
* [input_channels, filter_height, filter_width, output_height,
* output_width]
* output_width]
*/
*/
template
<
class
T
>
class
Col2ImFunctor
<
ColFormat
::
kCFO
,
CPU
,
T
>
{
template
<
class
T
>
public:
class
Col2ImFunctor
<
ColFormat
::
kCFO
,
CPU
,
T
>
{
public:
void
operator
()(
const
framework
::
Tensor
&
col
,
void
operator
()(
const
framework
::
Tensor
&
col
,
const
std
::
vector
<
int
>
&
dilation
,
const
std
::
vector
<
int
>
&
dilation
,
const
std
::
vector
<
int
>
&
stride
,
const
std
::
vector
<
int
>
&
stride
,
...
@@ -165,8 +167,9 @@ template class Col2ImFunctor<ColFormat::kCFO, CPU, double>;
...
@@ -165,8 +167,9 @@ template class Col2ImFunctor<ColFormat::kCFO, CPU, double>;
* [output_height, output_width, input_channels, filter_height,
* [output_height, output_width, input_channels, filter_height,
* filter_width]
* filter_width]
*/
*/
template
<
class
T
>
class
Im2ColFunctor
<
ColFormat
::
kOCF
,
CPU
,
T
>
{
template
<
class
T
>
public:
class
Im2ColFunctor
<
ColFormat
::
kOCF
,
CPU
,
T
>
{
public:
void
operator
()(
const
framework
::
Tensor
&
im
,
const
std
::
vector
<
int
>
&
dilation
,
void
operator
()(
const
framework
::
Tensor
&
im
,
const
std
::
vector
<
int
>
&
dilation
,
const
std
::
vector
<
int
>
&
stride
,
const
std
::
vector
<
int
>
&
stride
,
const
std
::
vector
<
int
>
&
padding
,
framework
::
Tensor
*
col
)
{
const
std
::
vector
<
int
>
&
padding
,
framework
::
Tensor
*
col
)
{
...
@@ -237,8 +240,9 @@ public:
...
@@ -237,8 +240,9 @@ public:
* [output_height, output_width, input_channels, filter_height,
* [output_height, output_width, input_channels, filter_height,
* filter_width]
* filter_width]
*/
*/
template
<
class
T
>
class
Col2ImFunctor
<
ColFormat
::
kOCF
,
CPU
,
T
>
{
template
<
class
T
>
public:
class
Col2ImFunctor
<
ColFormat
::
kOCF
,
CPU
,
T
>
{
public:
void
operator
()(
const
framework
::
Tensor
&
col
,
void
operator
()(
const
framework
::
Tensor
&
col
,
const
std
::
vector
<
int
>
&
dilation
,
const
std
::
vector
<
int
>
&
dilation
,
const
std
::
vector
<
int
>
&
stride
,
const
std
::
vector
<
int
>
&
stride
,
...
...
src/operators/math/im2col.h
浏览文件 @
7cc864ea
...
@@ -89,7 +89,7 @@ enum class ColFormat { kCFO = 0, kOCF = 1 };
...
@@ -89,7 +89,7 @@ enum class ColFormat { kCFO = 0, kOCF = 1 };
*/
*/
template
<
ColFormat
Format
,
typename
DeviceType
,
typename
T
>
template
<
ColFormat
Format
,
typename
DeviceType
,
typename
T
>
class
Im2ColFunctor
{
class
Im2ColFunctor
{
public:
public:
void
operator
()(
const
framework
::
Tensor
&
im
,
const
std
::
vector
<
int
>
&
dilation
,
void
operator
()(
const
framework
::
Tensor
&
im
,
const
std
::
vector
<
int
>
&
dilation
,
const
std
::
vector
<
int
>
&
stride
,
const
std
::
vector
<
int
>
&
stride
,
const
std
::
vector
<
int
>
&
padding
,
framework
::
Tensor
*
col
);
const
std
::
vector
<
int
>
&
padding
,
framework
::
Tensor
*
col
);
...
@@ -97,7 +97,7 @@ public:
...
@@ -97,7 +97,7 @@ public:
template
<
ColFormat
Format
,
typename
DeviceType
,
typename
T
>
template
<
ColFormat
Format
,
typename
DeviceType
,
typename
T
>
class
Col2ImFunctor
{
class
Col2ImFunctor
{
public:
public:
void
operator
()(
const
framework
::
Tensor
&
col
,
void
operator
()(
const
framework
::
Tensor
&
col
,
const
std
::
vector
<
int
>
&
dilation
,
const
std
::
vector
<
int
>
&
dilation
,
const
std
::
vector
<
int
>
&
stride
,
const
std
::
vector
<
int
>
&
stride
,
...
...
src/operators/math/math_function.cc
浏览文件 @
7cc864ea
src/operators/math/math_function.h
浏览文件 @
7cc864ea
...
@@ -14,9 +14,9 @@ limitations under the License. */
...
@@ -14,9 +14,9 @@ limitations under the License. */
#pragma once
#pragma once
#include "framework/tensor.h"
#include <cblas.h>
#include <cblas.h>
#include <cmath>
#include <cmath>
#include "framework/tensor.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
...
...
src/operators/math/pool3x3.h
浏览文件 @
7cc864ea
src/operators/math/pool_2x2.h
浏览文件 @
7cc864ea
src/operators/math/pooling.cpp
浏览文件 @
7cc864ea
...
@@ -30,12 +30,11 @@ namespace math {
...
@@ -30,12 +30,11 @@ namespace math {
*/
*/
template
<
typename
PoolProcess
,
typename
T
>
template
<
typename
PoolProcess
,
typename
T
>
class
PoolFunctor
<
CPU
,
PoolProcess
,
T
>
{
class
PoolFunctor
<
CPU
,
PoolProcess
,
T
>
{
public:
public:
void
operator
()(
const
framework
::
Tensor
&
input
,
const
std
::
vector
<
int
>
&
ksize
,
void
operator
()(
const
framework
::
Tensor
&
input
,
const
std
::
vector
<
int
>
&
ksize
,
const
std
::
vector
<
int
>
&
strides
,
const
std
::
vector
<
int
>
&
strides
,
const
std
::
vector
<
int
>
&
paddings
,
PoolProcess
pool_process
,
const
std
::
vector
<
int
>
&
paddings
,
PoolProcess
pool_process
,
framework
::
Tensor
*
output
)
{
framework
::
Tensor
*
output
)
{
const
int
batch_size
=
input
.
dims
()[
0
];
const
int
batch_size
=
input
.
dims
()[
0
];
const
int
input_height
=
input
.
dims
()[
2
];
const
int
input_height
=
input
.
dims
()[
2
];
...
...
src/operators/math/pooling.h
浏览文件 @
7cc864ea
...
@@ -37,8 +37,9 @@ namespace math {
...
@@ -37,8 +37,9 @@ namespace math {
* in pool pooling, and finally takes the average.
* in pool pooling, and finally takes the average.
* MaxPoolGrad and AvgPoolGrad are gradient operations respectively.
* MaxPoolGrad and AvgPoolGrad are gradient operations respectively.
*/
*/
template
<
class
T
>
class
MaxPool
{
template
<
class
T
>
public:
class
MaxPool
{
public:
inline
T
initial
()
{
return
static_cast
<
T
>
(
-
FLT_MAX
);
}
inline
T
initial
()
{
return
static_cast
<
T
>
(
-
FLT_MAX
);
}
inline
void
compute
(
const
T
&
x
,
T
*
y
)
{
*
y
=
*
y
>
x
?
*
y
:
x
;
}
inline
void
compute
(
const
T
&
x
,
T
*
y
)
{
*
y
=
*
y
>
x
?
*
y
:
x
;
}
...
@@ -46,8 +47,9 @@ public:
...
@@ -46,8 +47,9 @@ public:
inline
void
finalize
(
const
T
&
pool_field
,
T
*
y
)
{}
inline
void
finalize
(
const
T
&
pool_field
,
T
*
y
)
{}
};
};
template
<
class
T
>
class
AvgPool
{
template
<
class
T
>
public:
class
AvgPool
{
public:
inline
T
initial
()
{
return
static_cast
<
T
>
(
0
);
}
inline
T
initial
()
{
return
static_cast
<
T
>
(
0
);
}
inline
void
compute
(
const
T
&
x
,
T
*
y
)
{
*
y
+=
x
;
}
inline
void
compute
(
const
T
&
x
,
T
*
y
)
{
*
y
+=
x
;
}
...
@@ -57,7 +59,7 @@ public:
...
@@ -57,7 +59,7 @@ public:
template
<
typename
DeviceType
,
typename
PoolProcess
,
typename
T
>
template
<
typename
DeviceType
,
typename
PoolProcess
,
typename
T
>
class
PoolFunctor
{
class
PoolFunctor
{
public:
public:
void
operator
()(
const
framework
::
Tensor
&
input
,
const
std
::
vector
<
int
>
&
ksize
,
void
operator
()(
const
framework
::
Tensor
&
input
,
const
std
::
vector
<
int
>
&
ksize
,
const
std
::
vector
<
int
>
&
strides
,
const
std
::
vector
<
int
>
&
strides
,
const
std
::
vector
<
int
>
&
paddings
,
PoolProcess
pool_compute
,
const
std
::
vector
<
int
>
&
paddings
,
PoolProcess
pool_compute
,
...
...
src/operators/math/transform.h
浏览文件 @
7cc864ea
src/operators/math/vol2col.cc
浏览文件 @
7cc864ea
...
@@ -25,8 +25,9 @@ using Tensor = paddle_mobile::framework::Tensor;
...
@@ -25,8 +25,9 @@ using Tensor = paddle_mobile::framework::Tensor;
* [input_channels, filter_depth, filter_height, filter_width,
* [input_channels, filter_depth, filter_height, filter_width,
* output_depth, output_height, output_width]
* output_depth, output_height, output_width]
*/
*/
template
<
typename
T
>
class
Vol2ColFunctor
<
CPU
,
T
>
{
template
<
typename
T
>
public:
class
Vol2ColFunctor
<
CPU
,
T
>
{
public:
void
operator
()(
const
Tensor
&
vol
,
const
std
::
vector
<
int
>
&
dilations
,
void
operator
()(
const
Tensor
&
vol
,
const
std
::
vector
<
int
>
&
dilations
,
const
std
::
vector
<
int
>
&
strides
,
const
std
::
vector
<
int
>
&
strides
,
const
std
::
vector
<
int
>
&
paddings
,
Tensor
*
col
)
const
{
const
std
::
vector
<
int
>
&
paddings
,
Tensor
*
col
)
const
{
...
@@ -111,8 +112,9 @@ public:
...
@@ -111,8 +112,9 @@ public:
* [input_channels, filter_depth, filter_height, filter_width,
* [input_channels, filter_depth, filter_height, filter_width,
* output_depth, output_height, output_width]
* output_depth, output_height, output_width]
*/
*/
template
<
typename
T
>
class
Col2VolFunctor
<
CPU
,
T
>
{
template
<
typename
T
>
public:
class
Col2VolFunctor
<
CPU
,
T
>
{
public:
void
operator
()(
const
Tensor
&
col
,
const
std
::
vector
<
int
>
&
dilations
,
void
operator
()(
const
Tensor
&
col
,
const
std
::
vector
<
int
>
&
dilations
,
const
std
::
vector
<
int
>
&
strides
,
const
std
::
vector
<
int
>
&
strides
,
const
std
::
vector
<
int
>
&
paddings
,
Tensor
*
vol
)
const
{
const
std
::
vector
<
int
>
&
paddings
,
Tensor
*
vol
)
const
{
...
...
src/operators/math/vol2col.h
浏览文件 @
7cc864ea
...
@@ -72,15 +72,17 @@ namespace math {
...
@@ -72,15 +72,17 @@ namespace math {
*/
*/
using
Tensor
=
paddle_mobile
::
framework
::
Tensor
;
using
Tensor
=
paddle_mobile
::
framework
::
Tensor
;
template
<
typename
DeviceType
,
typename
T
>
class
Vol2ColFunctor
{
template
<
typename
DeviceType
,
typename
T
>
public:
class
Vol2ColFunctor
{
public:
void
operator
()(
const
Tensor
&
vol
,
const
std
::
vector
<
int
>
&
dilations
,
void
operator
()(
const
Tensor
&
vol
,
const
std
::
vector
<
int
>
&
dilations
,
const
std
::
vector
<
int
>
&
strides
,
const
std
::
vector
<
int
>
&
strides
,
const
std
::
vector
<
int
>
&
paddings
,
Tensor
*
col
)
const
;
const
std
::
vector
<
int
>
&
paddings
,
Tensor
*
col
)
const
;
};
};
template
<
typename
DeviceType
,
typename
T
>
class
Col2VolFunctor
{
template
<
typename
DeviceType
,
typename
T
>
public:
class
Col2VolFunctor
{
public:
void
operator
()(
const
Tensor
&
col
,
const
std
::
vector
<
int
>
&
dilations
,
void
operator
()(
const
Tensor
&
col
,
const
std
::
vector
<
int
>
&
dilations
,
const
std
::
vector
<
int
>
&
strides
,
const
std
::
vector
<
int
>
&
strides
,
const
std
::
vector
<
int
>
&
paddings
,
Tensor
*
vol
)
const
;
const
std
::
vector
<
int
>
&
paddings
,
Tensor
*
vol
)
const
;
...
...
src/operators/mul_op.cpp
浏览文件 @
7cc864ea
...
@@ -21,7 +21,8 @@ SOFTWARE.
...
@@ -21,7 +21,8 @@ SOFTWARE.
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
template
<
typename
Dtype
,
typename
T
>
void
MulOp
<
Dtype
,
T
>::
InferShape
()
const
{
template
<
typename
Dtype
,
typename
T
>
void
MulOp
<
Dtype
,
T
>::
InferShape
()
const
{
auto
x_dims
=
param_
.
InputX
()
->
dims
();
auto
x_dims
=
param_
.
InputX
()
->
dims
();
auto
y_dims
=
param_
.
InputY
()
->
dims
();
auto
y_dims
=
param_
.
InputY
()
->
dims
();
int
x_num_col_dims
=
param_
.
XNumColDims
();
int
x_num_col_dims
=
param_
.
XNumColDims
();
...
...
src/operators/mul_op.h
浏览文件 @
7cc864ea
...
@@ -27,7 +27,7 @@ using namespace framework;
...
@@ -27,7 +27,7 @@ using namespace framework;
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
MulOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
class
MulOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
public:
public:
MulOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
MulOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
attrs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
attrs
,
std
::
shared_ptr
<
framework
::
Scope
>
scope
)
std
::
shared_ptr
<
framework
::
Scope
>
scope
)
...
@@ -43,7 +43,7 @@ public:
...
@@ -43,7 +43,7 @@ public:
using
framework
::
OperatorWithKernel
<
DeviceType
>::
OperatorWithKernel
;
using
framework
::
OperatorWithKernel
<
DeviceType
>::
OperatorWithKernel
;
void
InferShape
()
const
override
;
void
InferShape
()
const
override
;
protected:
protected:
MulParam
param_
;
MulParam
param_
;
};
};
...
...
src/operators/op_param.cpp
浏览文件 @
7cc864ea
src/operators/op_param.h
浏览文件 @
7cc864ea
...
@@ -31,8 +31,8 @@ namespace operators {
...
@@ -31,8 +31,8 @@ namespace operators {
using
namespace
framework
;
using
namespace
framework
;
class
OpParam
:
PaddleMobileObject
{
class
OpParam
:
PaddleMobileObject
{
public:
public:
protected:
protected:
template
<
typename
T
>
template
<
typename
T
>
static
T
*
InputFrom
(
const
VariableNameMap
&
inputs
,
const
Scope
&
scope
)
{
static
T
*
InputFrom
(
const
VariableNameMap
&
inputs
,
const
Scope
&
scope
)
{
return
GetVarValue
<
T
>
(
"Input"
,
inputs
,
scope
);
return
GetVarValue
<
T
>
(
"Input"
,
inputs
,
scope
);
...
@@ -132,7 +132,7 @@ protected:
...
@@ -132,7 +132,7 @@ protected:
};
};
class
ConvParam
:
OpParam
{
class
ConvParam
:
OpParam
{
public:
public:
ConvParam
(
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
ConvParam
(
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
&
attrs
,
const
framework
::
AttributeMap
&
attrs
,
const
framework
::
Scope
&
scope
)
{
const
framework
::
Scope
&
scope
)
{
...
@@ -159,7 +159,7 @@ public:
...
@@ -159,7 +159,7 @@ public:
const
int
&
Groups
()
const
{
return
groups
;
}
const
int
&
Groups
()
const
{
return
groups
;
}
private:
private:
Tensor
*
input_
;
Tensor
*
input_
;
Tensor
*
output_
;
Tensor
*
output_
;
LoDTensor
*
filter_
;
LoDTensor
*
filter_
;
...
@@ -172,7 +172,7 @@ private:
...
@@ -172,7 +172,7 @@ private:
Print
&
operator
<<
(
Print
&
printer
,
const
ConvParam
&
conv_param
);
Print
&
operator
<<
(
Print
&
printer
,
const
ConvParam
&
conv_param
);
class
ElementwiseAddParam
:
OpParam
{
class
ElementwiseAddParam
:
OpParam
{
public:
public:
ElementwiseAddParam
(
const
VariableNameMap
&
inputs
,
ElementwiseAddParam
(
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
&
attrs
,
const
framework
::
AttributeMap
&
attrs
,
...
@@ -191,7 +191,7 @@ public:
...
@@ -191,7 +191,7 @@ public:
const
int
&
Axis
()
const
{
return
axis_
;
}
const
int
&
Axis
()
const
{
return
axis_
;
}
private:
private:
Tensor
*
input_x_
;
Tensor
*
input_x_
;
Tensor
*
input_y_
;
Tensor
*
input_y_
;
Tensor
*
out_
;
Tensor
*
out_
;
...
@@ -199,7 +199,7 @@ private:
...
@@ -199,7 +199,7 @@ private:
};
};
class
MulParam
:
OpParam
{
class
MulParam
:
OpParam
{
public:
public:
MulParam
(
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
MulParam
(
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
&
attrs
,
const
framework
::
AttributeMap
&
attrs
,
const
framework
::
Scope
&
scope
)
{
const
framework
::
Scope
&
scope
)
{
...
@@ -220,7 +220,7 @@ public:
...
@@ -220,7 +220,7 @@ public:
const
int
&
YNumColDims
()
const
{
return
y_num_col_dims_
;
}
const
int
&
YNumColDims
()
const
{
return
y_num_col_dims_
;
}
private:
private:
Tensor
*
input_x_
;
Tensor
*
input_x_
;
Tensor
*
input_y_
;
Tensor
*
input_y_
;
Tensor
*
out_
;
Tensor
*
out_
;
...
@@ -229,7 +229,7 @@ private:
...
@@ -229,7 +229,7 @@ private:
};
};
class
ConcatParam
:
public
OpParam
{
class
ConcatParam
:
public
OpParam
{
public:
public:
ConcatParam
(
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
ConcatParam
(
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
&
attrs
,
const
framework
::
AttributeMap
&
attrs
,
const
framework
::
Scope
&
scope
)
{
const
framework
::
Scope
&
scope
)
{
...
@@ -244,14 +244,14 @@ public:
...
@@ -244,14 +244,14 @@ public:
const
int
&
Axis
()
const
{
return
axis_
;
}
const
int
&
Axis
()
const
{
return
axis_
;
}
private:
private:
std
::
vector
<
Tensor
*>
inputs_
;
std
::
vector
<
Tensor
*>
inputs_
;
Tensor
*
out_
;
Tensor
*
out_
;
int
axis_
;
int
axis_
;
};
};
class
LrnParam
:
public
OpParam
{
class
LrnParam
:
public
OpParam
{
public:
public:
LrnParam
(
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
LrnParam
(
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
&
attrs
,
const
framework
::
AttributeMap
&
attrs
,
const
framework
::
Scope
&
scope
)
{
const
framework
::
Scope
&
scope
)
{
...
@@ -281,7 +281,7 @@ public:
...
@@ -281,7 +281,7 @@ public:
const
std
::
string
&
DataFormat
()
const
{
return
data_format_
;
}
const
std
::
string
&
DataFormat
()
const
{
return
data_format_
;
}
private:
private:
Tensor
*
input_x_
;
Tensor
*
input_x_
;
Tensor
*
out_
;
Tensor
*
out_
;
Tensor
*
mid_out_
;
Tensor
*
mid_out_
;
...
@@ -292,7 +292,7 @@ private:
...
@@ -292,7 +292,7 @@ private:
std
::
string
data_format_
;
std
::
string
data_format_
;
};
};
class
BatchNormParam
:
OpParam
{
class
BatchNormParam
:
OpParam
{
public:
public:
BatchNormParam
(
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
BatchNormParam
(
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
&
attrs
,
const
framework
::
AttributeMap
&
attrs
,
const
framework
::
Scope
&
scope
)
{
const
framework
::
Scope
&
scope
)
{
...
@@ -327,7 +327,7 @@ public:
...
@@ -327,7 +327,7 @@ public:
const
std
::
string
&
DataFormat
()
const
{
return
data_format_
;
}
const
std
::
string
&
DataFormat
()
const
{
return
data_format_
;
}
private:
private:
Tensor
*
input_x_
;
Tensor
*
input_x_
;
Tensor
*
output_y_
;
Tensor
*
output_y_
;
Tensor
*
input_bias_
;
Tensor
*
input_bias_
;
...
@@ -340,7 +340,7 @@ private:
...
@@ -340,7 +340,7 @@ private:
std
::
string
data_format_
;
std
::
string
data_format_
;
};
};
class
PoolParam
:
public
OpParam
{
class
PoolParam
:
public
OpParam
{
public:
public:
PoolParam
(
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
PoolParam
(
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
&
attrs
,
const
framework
::
AttributeMap
&
attrs
,
const
framework
::
Scope
&
scope
)
{
const
framework
::
Scope
&
scope
)
{
...
@@ -371,7 +371,7 @@ public:
...
@@ -371,7 +371,7 @@ public:
bool
isGlobalPooling
()
const
{
return
gloabal_pooling_
;
}
bool
isGlobalPooling
()
const
{
return
gloabal_pooling_
;
}
private:
private:
Tensor
*
input_
;
Tensor
*
input_
;
Tensor
*
output_
;
Tensor
*
output_
;
std
::
string
pooling_type_
;
std
::
string
pooling_type_
;
...
...
src/operators/pool_op.cpp
浏览文件 @
7cc864ea
src/operators/pool_op.h
浏览文件 @
7cc864ea
...
@@ -28,7 +28,7 @@ using namespace framework;
...
@@ -28,7 +28,7 @@ using namespace framework;
template
<
typename
DeviceType
,
typename
T
>
template
<
typename
DeviceType
,
typename
T
>
class
PoolOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
class
PoolOp
:
public
framework
::
OperatorWithKernel
<
DeviceType
>
{
public:
public:
PoolOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
PoolOp
(
const
std
::
string
&
type
,
const
VariableNameMap
&
inputs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
&
attrs
,
const
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
&
attrs
,
std
::
shared_ptr
<
framework
::
Scope
>
scope
)
std
::
shared_ptr
<
framework
::
Scope
>
scope
)
...
@@ -45,7 +45,7 @@ public:
...
@@ -45,7 +45,7 @@ public:
this
->
ClearVariables
({
"X"
});
this
->
ClearVariables
({
"X"
});
}
}
private:
private:
PoolParam
param_
;
PoolParam
param_
;
};
};
}
// namespace operators
}
// namespace operators
...
...
src/platform/data_type.h
浏览文件 @
7cc864ea
...
@@ -14,9 +14,9 @@ limitations under the License. */
...
@@ -14,9 +14,9 @@ limitations under the License. */
#pragma once
#pragma once
#include "framework/framework.pb.h"
#include <string>
#include <string>
#include <typeindex>
#include <typeindex>
#include "framework/framework.pb.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
framework
{
namespace
framework
{
...
...
src/platform/macros.h
浏览文件 @
7cc864ea
...
@@ -17,7 +17,7 @@ limitations under the License. */
...
@@ -17,7 +17,7 @@ limitations under the License. */
// Disable the copy and assignment operator for a class.
// Disable the copy and assignment operator for a class.
#ifndef DISABLE_COPY_AND_ASSIGN
#ifndef DISABLE_COPY_AND_ASSIGN
#define DISABLE_COPY_AND_ASSIGN(classname) \
#define DISABLE_COPY_AND_ASSIGN(classname) \
private:
\
private:
\
classname(const classname &) = delete; \
classname(const classname &) = delete; \
classname(classname &&) = delete; \
classname(classname &&) = delete; \
classname &operator=(const classname &) = delete; \
classname &operator=(const classname &) = delete; \
...
...
test/operators/test_cov_op.cpp
浏览文件 @
7cc864ea
...
@@ -18,7 +18,7 @@ SOFTWARE.
...
@@ -18,7 +18,7 @@ SOFTWARE.
#include "../framework/executor_for_test.h"
#include "../framework/executor_for_test.h"
#include "../test_helper.h"
#include "../test_helper.h"
#include "io.h"
#include "
./
io.h"
int
main
()
{
int
main
()
{
paddle_mobile
::
Loader
<
paddle_mobile
::
CPU
>
loader
;
paddle_mobile
::
Loader
<
paddle_mobile
::
CPU
>
loader
;
...
@@ -38,7 +38,7 @@ int main() {
...
@@ -38,7 +38,7 @@ int main() {
auto
output
=
auto
output
=
executor
.
predict
(
input
,
"data"
,
"conv2d_0.tmp_0"
,
{
1
,
64
,
56
,
56
});
executor
.
predict
(
input
,
"data"
,
"conv2d_0.tmp_0"
,
{
1
,
64
,
56
,
56
});
float
*
output_ptr
=
output
->
data
<
float
>
();
auto
output_ptr
=
output
->
data
<
float
>
();
for
(
int
j
=
0
;
j
<
output
->
numel
();
++
j
)
{
for
(
int
j
=
0
;
j
<
output
->
numel
();
++
j
)
{
DLOG
<<
" value of output: "
<<
output_ptr
[
j
];
DLOG
<<
" value of output: "
<<
output_ptr
[
j
];
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录