Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
tensorflow
提交
3379bae7
T
tensorflow
项目概览
xxadev
/
tensorflow
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tensorflow
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
3379bae7
编写于
8月 01, 2018
作者:
A
A. Unique TensorFlower
提交者:
TensorFlower Gardener
8月 01, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add logical_and and logical_not to schema.
PiperOrigin-RevId: 207034363
上级
07ef0a28
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
246 addition
and
6 deletion
+246
-6
tensorflow/contrib/lite/builtin_ops.h
tensorflow/contrib/lite/builtin_ops.h
+2
-0
tensorflow/contrib/lite/model.cc
tensorflow/contrib/lite/model.cc
+2
-0
tensorflow/contrib/lite/nnapi_delegate.cc
tensorflow/contrib/lite/nnapi_delegate.cc
+2
-0
tensorflow/contrib/lite/schema/schema.fbs
tensorflow/contrib/lite/schema/schema.fbs
+10
-0
tensorflow/contrib/lite/schema/schema_generated.h
tensorflow/contrib/lite/schema/schema_generated.h
+230
-6
未找到文件。
tensorflow/contrib/lite/builtin_ops.h
浏览文件 @
3379bae7
...
...
@@ -111,6 +111,8 @@ typedef enum {
kTfLiteBuiltinPack
=
83
,
kTfLiteBuiltinLogicalOr
=
84
,
kTfLiteBuiltinOneHot
=
85
,
kTfLiteBuiltinLogicalAnd
=
86
,
kTfLiteBuiltinLogicalNot
=
87
,
}
TfLiteBuiltinOperator
;
#ifdef __cplusplus
...
...
tensorflow/contrib/lite/model.cc
浏览文件 @
3379bae7
...
...
@@ -780,6 +780,8 @@ TfLiteStatus ParseOpData(const Operator* op, BuiltinOperator op_type,
case
BuiltinOperator_TRANSPOSE
:
case
BuiltinOperator_POW
:
case
BuiltinOperator_LOGICAL_OR
:
case
BuiltinOperator_LOGICAL_AND
:
case
BuiltinOperator_LOGICAL_NOT
:
break
;
}
return
kTfLiteOk
;
...
...
tensorflow/contrib/lite/nnapi_delegate.cc
浏览文件 @
3379bae7
...
...
@@ -624,6 +624,8 @@ TfLiteStatus AddOpsAndParams(
case
tflite
::
BuiltinOperator_PACK
:
case
tflite
::
BuiltinOperator_LOGICAL_OR
:
case
tflite
::
BuiltinOperator_ONE_HOT
:
case
tflite
::
BuiltinOperator_LOGICAL_AND
:
case
tflite
::
BuiltinOperator_LOGICAL_NOT
:
logError
(
"Op code %d is currently not delegated to NNAPI"
,
builtin
);
return
kTfLiteError
;
break
;
...
...
tensorflow/contrib/lite/schema/schema.fbs
浏览文件 @
3379bae7
...
...
@@ -167,6 +167,8 @@ enum BuiltinOperator : byte {
PACK = 83,
LOGICAL_OR = 84,
ONE_HOT = 85,
LOGICAL_AND = 86,
LOGICAL_NOT = 87,
}
// Options for the builtin operators.
...
...
@@ -232,6 +234,8 @@ union BuiltinOptions {
PackOptions,
LogicalOrOptions,
OneHotOptions,
LogicalAndOptions,
LogicalNotOptions,
}
enum Padding : byte { SAME, VALID }
...
...
@@ -555,6 +559,12 @@ table OneHotOptions {
axis:int;
}
table LogicalAndOptions {
}
table LogicalNotOptions {
}
// An OperatorCode can be an enum value (BuiltinOperator) if the operator is a
// builtin, or a string if the operator is custom.
table OperatorCode {
...
...
tensorflow/contrib/lite/schema/schema_generated.h
浏览文件 @
3379bae7
...
...
@@ -214,6 +214,12 @@ struct LogicalOrOptionsT;
struct
OneHotOptions
;
struct
OneHotOptionsT
;
struct
LogicalAndOptions
;
struct
LogicalAndOptionsT
;
struct
LogicalNotOptions
;
struct
LogicalNotOptionsT
;
struct
OperatorCode
;
struct
OperatorCodeT
;
...
...
@@ -365,11 +371,13 @@ enum BuiltinOperator {
BuiltinOperator_PACK
=
83
,
BuiltinOperator_LOGICAL_OR
=
84
,
BuiltinOperator_ONE_HOT
=
85
,
BuiltinOperator_LOGICAL_AND
=
86
,
BuiltinOperator_LOGICAL_NOT
=
87
,
BuiltinOperator_MIN
=
BuiltinOperator_ADD
,
BuiltinOperator_MAX
=
BuiltinOperator_
ONE_H
OT
BuiltinOperator_MAX
=
BuiltinOperator_
LOGICAL_N
OT
};
inline
BuiltinOperator
(
&
EnumValuesBuiltinOperator
())[
8
5
]
{
inline
BuiltinOperator
(
&
EnumValuesBuiltinOperator
())[
8
7
]
{
static
BuiltinOperator
values
[]
=
{
BuiltinOperator_ADD
,
BuiltinOperator_AVERAGE_POOL_2D
,
...
...
@@ -455,7 +463,9 @@ inline BuiltinOperator (&EnumValuesBuiltinOperator())[85] {
BuiltinOperator_REDUCE_MAX
,
BuiltinOperator_PACK
,
BuiltinOperator_LOGICAL_OR
,
BuiltinOperator_ONE_HOT
BuiltinOperator_ONE_HOT
,
BuiltinOperator_LOGICAL_AND
,
BuiltinOperator_LOGICAL_NOT
};
return
values
;
}
...
...
@@ -548,6 +558,8 @@ inline const char **EnumNamesBuiltinOperator() {
"PACK"
,
"LOGICAL_OR"
,
"ONE_HOT"
,
"LOGICAL_AND"
,
"LOGICAL_NOT"
,
nullptr
};
return
names
;
...
...
@@ -621,11 +633,13 @@ enum BuiltinOptions {
BuiltinOptions_PackOptions
=
59
,
BuiltinOptions_LogicalOrOptions
=
60
,
BuiltinOptions_OneHotOptions
=
61
,
BuiltinOptions_LogicalAndOptions
=
62
,
BuiltinOptions_LogicalNotOptions
=
63
,
BuiltinOptions_MIN
=
BuiltinOptions_NONE
,
BuiltinOptions_MAX
=
BuiltinOptions_
OneH
otOptions
BuiltinOptions_MAX
=
BuiltinOptions_
LogicalN
otOptions
};
inline
BuiltinOptions
(
&
EnumValuesBuiltinOptions
())[
6
2
]
{
inline
BuiltinOptions
(
&
EnumValuesBuiltinOptions
())[
6
4
]
{
static
BuiltinOptions
values
[]
=
{
BuiltinOptions_NONE
,
BuiltinOptions_Conv2DOptions
,
...
...
@@ -688,7 +702,9 @@ inline BuiltinOptions (&EnumValuesBuiltinOptions())[62] {
BuiltinOptions_FakeQuantOptions
,
BuiltinOptions_PackOptions
,
BuiltinOptions_LogicalOrOptions
,
BuiltinOptions_OneHotOptions
BuiltinOptions_OneHotOptions
,
BuiltinOptions_LogicalAndOptions
,
BuiltinOptions_LogicalNotOptions
};
return
values
;
}
...
...
@@ -757,6 +773,8 @@ inline const char **EnumNamesBuiltinOptions() {
"PackOptions"
,
"LogicalOrOptions"
,
"OneHotOptions"
,
"LogicalAndOptions"
,
"LogicalNotOptions"
,
nullptr
};
return
names
;
...
...
@@ -1015,6 +1033,14 @@ template<> struct BuiltinOptionsTraits<OneHotOptions> {
static
const
BuiltinOptions
enum_value
=
BuiltinOptions_OneHotOptions
;
};
template
<
>
struct
BuiltinOptionsTraits
<
LogicalAndOptions
>
{
static
const
BuiltinOptions
enum_value
=
BuiltinOptions_LogicalAndOptions
;
};
template
<
>
struct
BuiltinOptionsTraits
<
LogicalNotOptions
>
{
static
const
BuiltinOptions
enum_value
=
BuiltinOptions_LogicalNotOptions
;
};
struct
BuiltinOptionsUnion
{
BuiltinOptions
type
;
void
*
value
;
...
...
@@ -1534,6 +1560,22 @@ struct BuiltinOptionsUnion {
return
type
==
BuiltinOptions_OneHotOptions
?
reinterpret_cast
<
const
OneHotOptionsT
*>
(
value
)
:
nullptr
;
}
LogicalAndOptionsT
*
AsLogicalAndOptions
()
{
return
type
==
BuiltinOptions_LogicalAndOptions
?
reinterpret_cast
<
LogicalAndOptionsT
*>
(
value
)
:
nullptr
;
}
const
LogicalAndOptionsT
*
AsLogicalAndOptions
()
const
{
return
type
==
BuiltinOptions_LogicalAndOptions
?
reinterpret_cast
<
const
LogicalAndOptionsT
*>
(
value
)
:
nullptr
;
}
LogicalNotOptionsT
*
AsLogicalNotOptions
()
{
return
type
==
BuiltinOptions_LogicalNotOptions
?
reinterpret_cast
<
LogicalNotOptionsT
*>
(
value
)
:
nullptr
;
}
const
LogicalNotOptionsT
*
AsLogicalNotOptions
()
const
{
return
type
==
BuiltinOptions_LogicalNotOptions
?
reinterpret_cast
<
const
LogicalNotOptionsT
*>
(
value
)
:
nullptr
;
}
};
bool
VerifyBuiltinOptions
(
flatbuffers
::
Verifier
&
verifier
,
const
void
*
obj
,
BuiltinOptions
type
);
...
...
@@ -5527,6 +5569,86 @@ inline flatbuffers::Offset<OneHotOptions> CreateOneHotOptions(
flatbuffers
::
Offset
<
OneHotOptions
>
CreateOneHotOptions
(
flatbuffers
::
FlatBufferBuilder
&
_fbb
,
const
OneHotOptionsT
*
_o
,
const
flatbuffers
::
rehasher_function_t
*
_rehasher
=
nullptr
);
struct
LogicalAndOptionsT
:
public
flatbuffers
::
NativeTable
{
typedef
LogicalAndOptions
TableType
;
LogicalAndOptionsT
()
{
}
};
struct
LogicalAndOptions
FLATBUFFERS_FINAL_CLASS
:
private
flatbuffers
::
Table
{
typedef
LogicalAndOptionsT
NativeTableType
;
bool
Verify
(
flatbuffers
::
Verifier
&
verifier
)
const
{
return
VerifyTableStart
(
verifier
)
&&
verifier
.
EndTable
();
}
LogicalAndOptionsT
*
UnPack
(
const
flatbuffers
::
resolver_function_t
*
_resolver
=
nullptr
)
const
;
void
UnPackTo
(
LogicalAndOptionsT
*
_o
,
const
flatbuffers
::
resolver_function_t
*
_resolver
=
nullptr
)
const
;
static
flatbuffers
::
Offset
<
LogicalAndOptions
>
Pack
(
flatbuffers
::
FlatBufferBuilder
&
_fbb
,
const
LogicalAndOptionsT
*
_o
,
const
flatbuffers
::
rehasher_function_t
*
_rehasher
=
nullptr
);
};
struct
LogicalAndOptionsBuilder
{
flatbuffers
::
FlatBufferBuilder
&
fbb_
;
flatbuffers
::
uoffset_t
start_
;
explicit
LogicalAndOptionsBuilder
(
flatbuffers
::
FlatBufferBuilder
&
_fbb
)
:
fbb_
(
_fbb
)
{
start_
=
fbb_
.
StartTable
();
}
LogicalAndOptionsBuilder
&
operator
=
(
const
LogicalAndOptionsBuilder
&
);
flatbuffers
::
Offset
<
LogicalAndOptions
>
Finish
()
{
const
auto
end
=
fbb_
.
EndTable
(
start_
);
auto
o
=
flatbuffers
::
Offset
<
LogicalAndOptions
>
(
end
);
return
o
;
}
};
inline
flatbuffers
::
Offset
<
LogicalAndOptions
>
CreateLogicalAndOptions
(
flatbuffers
::
FlatBufferBuilder
&
_fbb
)
{
LogicalAndOptionsBuilder
builder_
(
_fbb
);
return
builder_
.
Finish
();
}
flatbuffers
::
Offset
<
LogicalAndOptions
>
CreateLogicalAndOptions
(
flatbuffers
::
FlatBufferBuilder
&
_fbb
,
const
LogicalAndOptionsT
*
_o
,
const
flatbuffers
::
rehasher_function_t
*
_rehasher
=
nullptr
);
struct
LogicalNotOptionsT
:
public
flatbuffers
::
NativeTable
{
typedef
LogicalNotOptions
TableType
;
LogicalNotOptionsT
()
{
}
};
struct
LogicalNotOptions
FLATBUFFERS_FINAL_CLASS
:
private
flatbuffers
::
Table
{
typedef
LogicalNotOptionsT
NativeTableType
;
bool
Verify
(
flatbuffers
::
Verifier
&
verifier
)
const
{
return
VerifyTableStart
(
verifier
)
&&
verifier
.
EndTable
();
}
LogicalNotOptionsT
*
UnPack
(
const
flatbuffers
::
resolver_function_t
*
_resolver
=
nullptr
)
const
;
void
UnPackTo
(
LogicalNotOptionsT
*
_o
,
const
flatbuffers
::
resolver_function_t
*
_resolver
=
nullptr
)
const
;
static
flatbuffers
::
Offset
<
LogicalNotOptions
>
Pack
(
flatbuffers
::
FlatBufferBuilder
&
_fbb
,
const
LogicalNotOptionsT
*
_o
,
const
flatbuffers
::
rehasher_function_t
*
_rehasher
=
nullptr
);
};
struct
LogicalNotOptionsBuilder
{
flatbuffers
::
FlatBufferBuilder
&
fbb_
;
flatbuffers
::
uoffset_t
start_
;
explicit
LogicalNotOptionsBuilder
(
flatbuffers
::
FlatBufferBuilder
&
_fbb
)
:
fbb_
(
_fbb
)
{
start_
=
fbb_
.
StartTable
();
}
LogicalNotOptionsBuilder
&
operator
=
(
const
LogicalNotOptionsBuilder
&
);
flatbuffers
::
Offset
<
LogicalNotOptions
>
Finish
()
{
const
auto
end
=
fbb_
.
EndTable
(
start_
);
auto
o
=
flatbuffers
::
Offset
<
LogicalNotOptions
>
(
end
);
return
o
;
}
};
inline
flatbuffers
::
Offset
<
LogicalNotOptions
>
CreateLogicalNotOptions
(
flatbuffers
::
FlatBufferBuilder
&
_fbb
)
{
LogicalNotOptionsBuilder
builder_
(
_fbb
);
return
builder_
.
Finish
();
}
flatbuffers
::
Offset
<
LogicalNotOptions
>
CreateLogicalNotOptions
(
flatbuffers
::
FlatBufferBuilder
&
_fbb
,
const
LogicalNotOptionsT
*
_o
,
const
flatbuffers
::
rehasher_function_t
*
_rehasher
=
nullptr
);
struct
OperatorCodeT
:
public
flatbuffers
::
NativeTable
{
typedef
OperatorCode
TableType
;
BuiltinOperator
builtin_code
;
...
...
@@ -5843,6 +5965,12 @@ struct Operator FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
const
OneHotOptions
*
builtin_options_as_OneHotOptions
()
const
{
return
builtin_options_type
()
==
BuiltinOptions_OneHotOptions
?
static_cast
<
const
OneHotOptions
*>
(
builtin_options
())
:
nullptr
;
}
const
LogicalAndOptions
*
builtin_options_as_LogicalAndOptions
()
const
{
return
builtin_options_type
()
==
BuiltinOptions_LogicalAndOptions
?
static_cast
<
const
LogicalAndOptions
*>
(
builtin_options
())
:
nullptr
;
}
const
LogicalNotOptions
*
builtin_options_as_LogicalNotOptions
()
const
{
return
builtin_options_type
()
==
BuiltinOptions_LogicalNotOptions
?
static_cast
<
const
LogicalNotOptions
*>
(
builtin_options
())
:
nullptr
;
}
const
flatbuffers
::
Vector
<
uint8_t
>
*
custom_options
()
const
{
return
GetPointer
<
const
flatbuffers
::
Vector
<
uint8_t
>
*>
(
VT_CUSTOM_OPTIONS
);
}
...
...
@@ -6118,6 +6246,14 @@ template<> inline const OneHotOptions *Operator::builtin_options_as<OneHotOption
return
builtin_options_as_OneHotOptions
();
}
template
<
>
inline
const
LogicalAndOptions
*
Operator
::
builtin_options_as
<
LogicalAndOptions
>
()
const
{
return
builtin_options_as_LogicalAndOptions
();
}
template
<
>
inline
const
LogicalNotOptions
*
Operator
::
builtin_options_as
<
LogicalNotOptions
>
()
const
{
return
builtin_options_as_LogicalNotOptions
();
}
struct
OperatorBuilder
{
flatbuffers
::
FlatBufferBuilder
&
fbb_
;
flatbuffers
::
uoffset_t
start_
;
...
...
@@ -8259,6 +8395,52 @@ inline flatbuffers::Offset<OneHotOptions> CreateOneHotOptions(flatbuffers::FlatB
_axis
);
}
inline
LogicalAndOptionsT
*
LogicalAndOptions
::
UnPack
(
const
flatbuffers
::
resolver_function_t
*
_resolver
)
const
{
auto
_o
=
new
LogicalAndOptionsT
();
UnPackTo
(
_o
,
_resolver
);
return
_o
;
}
inline
void
LogicalAndOptions
::
UnPackTo
(
LogicalAndOptionsT
*
_o
,
const
flatbuffers
::
resolver_function_t
*
_resolver
)
const
{
(
void
)
_o
;
(
void
)
_resolver
;
}
inline
flatbuffers
::
Offset
<
LogicalAndOptions
>
LogicalAndOptions
::
Pack
(
flatbuffers
::
FlatBufferBuilder
&
_fbb
,
const
LogicalAndOptionsT
*
_o
,
const
flatbuffers
::
rehasher_function_t
*
_rehasher
)
{
return
CreateLogicalAndOptions
(
_fbb
,
_o
,
_rehasher
);
}
inline
flatbuffers
::
Offset
<
LogicalAndOptions
>
CreateLogicalAndOptions
(
flatbuffers
::
FlatBufferBuilder
&
_fbb
,
const
LogicalAndOptionsT
*
_o
,
const
flatbuffers
::
rehasher_function_t
*
_rehasher
)
{
(
void
)
_rehasher
;
(
void
)
_o
;
struct
_VectorArgs
{
flatbuffers
::
FlatBufferBuilder
*
__fbb
;
const
LogicalAndOptionsT
*
__o
;
const
flatbuffers
::
rehasher_function_t
*
__rehasher
;
}
_va
=
{
&
_fbb
,
_o
,
_rehasher
};
(
void
)
_va
;
return
tflite
::
CreateLogicalAndOptions
(
_fbb
);
}
inline
LogicalNotOptionsT
*
LogicalNotOptions
::
UnPack
(
const
flatbuffers
::
resolver_function_t
*
_resolver
)
const
{
auto
_o
=
new
LogicalNotOptionsT
();
UnPackTo
(
_o
,
_resolver
);
return
_o
;
}
inline
void
LogicalNotOptions
::
UnPackTo
(
LogicalNotOptionsT
*
_o
,
const
flatbuffers
::
resolver_function_t
*
_resolver
)
const
{
(
void
)
_o
;
(
void
)
_resolver
;
}
inline
flatbuffers
::
Offset
<
LogicalNotOptions
>
LogicalNotOptions
::
Pack
(
flatbuffers
::
FlatBufferBuilder
&
_fbb
,
const
LogicalNotOptionsT
*
_o
,
const
flatbuffers
::
rehasher_function_t
*
_rehasher
)
{
return
CreateLogicalNotOptions
(
_fbb
,
_o
,
_rehasher
);
}
inline
flatbuffers
::
Offset
<
LogicalNotOptions
>
CreateLogicalNotOptions
(
flatbuffers
::
FlatBufferBuilder
&
_fbb
,
const
LogicalNotOptionsT
*
_o
,
const
flatbuffers
::
rehasher_function_t
*
_rehasher
)
{
(
void
)
_rehasher
;
(
void
)
_o
;
struct
_VectorArgs
{
flatbuffers
::
FlatBufferBuilder
*
__fbb
;
const
LogicalNotOptionsT
*
__o
;
const
flatbuffers
::
rehasher_function_t
*
__rehasher
;
}
_va
=
{
&
_fbb
,
_o
,
_rehasher
};
(
void
)
_va
;
return
tflite
::
CreateLogicalNotOptions
(
_fbb
);
}
inline
OperatorCodeT
*
OperatorCode
::
UnPack
(
const
flatbuffers
::
resolver_function_t
*
_resolver
)
const
{
auto
_o
=
new
OperatorCodeT
();
UnPackTo
(
_o
,
_resolver
);
...
...
@@ -8692,6 +8874,14 @@ inline bool VerifyBuiltinOptions(flatbuffers::Verifier &verifier, const void *ob
auto
ptr
=
reinterpret_cast
<
const
OneHotOptions
*>
(
obj
);
return
verifier
.
VerifyTable
(
ptr
);
}
case
BuiltinOptions_LogicalAndOptions
:
{
auto
ptr
=
reinterpret_cast
<
const
LogicalAndOptions
*>
(
obj
);
return
verifier
.
VerifyTable
(
ptr
);
}
case
BuiltinOptions_LogicalNotOptions
:
{
auto
ptr
=
reinterpret_cast
<
const
LogicalNotOptions
*>
(
obj
);
return
verifier
.
VerifyTable
(
ptr
);
}
default:
return
false
;
}
}
...
...
@@ -8954,6 +9144,14 @@ inline void *BuiltinOptionsUnion::UnPack(const void *obj, BuiltinOptions type, c
auto
ptr
=
reinterpret_cast
<
const
OneHotOptions
*>
(
obj
);
return
ptr
->
UnPack
(
resolver
);
}
case
BuiltinOptions_LogicalAndOptions
:
{
auto
ptr
=
reinterpret_cast
<
const
LogicalAndOptions
*>
(
obj
);
return
ptr
->
UnPack
(
resolver
);
}
case
BuiltinOptions_LogicalNotOptions
:
{
auto
ptr
=
reinterpret_cast
<
const
LogicalNotOptions
*>
(
obj
);
return
ptr
->
UnPack
(
resolver
);
}
default:
return
nullptr
;
}
}
...
...
@@ -9204,6 +9402,14 @@ inline flatbuffers::Offset<void> BuiltinOptionsUnion::Pack(flatbuffers::FlatBuff
auto
ptr
=
reinterpret_cast
<
const
OneHotOptionsT
*>
(
value
);
return
CreateOneHotOptions
(
_fbb
,
ptr
,
_rehasher
).
Union
();
}
case
BuiltinOptions_LogicalAndOptions
:
{
auto
ptr
=
reinterpret_cast
<
const
LogicalAndOptionsT
*>
(
value
);
return
CreateLogicalAndOptions
(
_fbb
,
ptr
,
_rehasher
).
Union
();
}
case
BuiltinOptions_LogicalNotOptions
:
{
auto
ptr
=
reinterpret_cast
<
const
LogicalNotOptionsT
*>
(
value
);
return
CreateLogicalNotOptions
(
_fbb
,
ptr
,
_rehasher
).
Union
();
}
default:
return
0
;
}
}
...
...
@@ -9454,6 +9660,14 @@ inline BuiltinOptionsUnion::BuiltinOptionsUnion(const BuiltinOptionsUnion &u) FL
value
=
new
OneHotOptionsT
(
*
reinterpret_cast
<
OneHotOptionsT
*>
(
u
.
value
));
break
;
}
case
BuiltinOptions_LogicalAndOptions
:
{
value
=
new
LogicalAndOptionsT
(
*
reinterpret_cast
<
LogicalAndOptionsT
*>
(
u
.
value
));
break
;
}
case
BuiltinOptions_LogicalNotOptions
:
{
value
=
new
LogicalNotOptionsT
(
*
reinterpret_cast
<
LogicalNotOptionsT
*>
(
u
.
value
));
break
;
}
default:
break
;
}
...
...
@@ -9766,6 +9980,16 @@ inline void BuiltinOptionsUnion::Reset() {
delete
ptr
;
break
;
}
case
BuiltinOptions_LogicalAndOptions
:
{
auto
ptr
=
reinterpret_cast
<
LogicalAndOptionsT
*>
(
value
);
delete
ptr
;
break
;
}
case
BuiltinOptions_LogicalNotOptions
:
{
auto
ptr
=
reinterpret_cast
<
LogicalNotOptionsT
*>
(
value
);
delete
ptr
;
break
;
}
default:
break
;
}
value
=
nullptr
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录