Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
64081c87
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
64081c87
编写于
8月 30, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 30, 2020
浏览文件
操作
浏览文件
下载
差异文件
!5520 [MS][LITE][Develop]fix lite debug compile
Merge pull request !5520 from sunsuodong/fix_debug_compile
上级
5ef0e1f4
dab0ab41
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
11 deletion
+11
-11
mindspore/lite/nnacl/quantization/fixed_point.c
mindspore/lite/nnacl/quantization/fixed_point.c
+11
-11
未找到文件。
mindspore/lite/nnacl/quantization/fixed_point.c
浏览文件 @
64081c87
...
@@ -54,9 +54,9 @@ int MultiplyByQuantizedMultiplier(int32_t value, int32_t multiplier, int32_t lef
...
@@ -54,9 +54,9 @@ int MultiplyByQuantizedMultiplier(int32_t value, int32_t multiplier, int32_t lef
return
RoundingDivideByPOT
(
SaturatingRoundingDoublingHighMul
(
value
*
(
1
<<
left_shift
),
multiplier
),
-
right_shift
);
return
RoundingDivideByPOT
(
SaturatingRoundingDoublingHighMul
(
value
*
(
1
<<
left_shift
),
multiplier
),
-
right_shift
);
}
}
in
line
in
t
FractionsBits
(
int
integer_bits
)
{
return
8
*
sizeof
(
int32_t
)
-
1
-
integer_bits
;
}
int
FractionsBits
(
int
integer_bits
)
{
return
8
*
sizeof
(
int32_t
)
-
1
-
integer_bits
;
}
in
line
in
t
FixedPoint_One
(
int
integer_bits
,
int
fractions_bits
)
{
int
FixedPoint_One
(
int
integer_bits
,
int
fractions_bits
)
{
return
(
integer_bits
==
0
?
INT32_MAX
:
((
1
)
<<
(
uint32_t
)(
integer_bits
==
0
?
0
:
fractions_bits
)));
return
(
integer_bits
==
0
?
INT32_MAX
:
((
1
)
<<
(
uint32_t
)(
integer_bits
==
0
?
0
:
fractions_bits
)));
}
}
...
@@ -65,23 +65,23 @@ int RoundingHalfSum(int32_t a, int32_t b) {
...
@@ -65,23 +65,23 @@ int RoundingHalfSum(int32_t a, int32_t b) {
return
(
int32_t
)((
sum
+
(
sum
>
0
?
1
:
-
1
))
/
2
);
return
(
int32_t
)((
sum
+
(
sum
>
0
?
1
:
-
1
))
/
2
);
}
}
in
line
in
t32_t
BitAnd
(
int32_t
a
,
int32_t
b
)
{
return
(
uint32_t
)
a
&
(
uint32_t
)
b
;
}
int32_t
BitAnd
(
int32_t
a
,
int32_t
b
)
{
return
(
uint32_t
)
a
&
(
uint32_t
)
b
;
}
in
line
in
t32_t
BitOr
(
int32_t
a
,
int32_t
b
)
{
return
(
uint32_t
)
a
|
(
uint32_t
)
b
;
}
int32_t
BitOr
(
int32_t
a
,
int32_t
b
)
{
return
(
uint32_t
)
a
|
(
uint32_t
)
b
;
}
in
line
in
t32_t
BitXor
(
int32_t
a
,
int32_t
b
)
{
return
(
uint32_t
)
a
^
(
uint32_t
)
b
;
}
int32_t
BitXor
(
int32_t
a
,
int32_t
b
)
{
return
(
uint32_t
)
a
^
(
uint32_t
)
b
;
}
in
line
in
t32_t
BitNot
(
int32_t
a
)
{
return
~
(
uint32_t
)
a
;
}
int32_t
BitNot
(
int32_t
a
)
{
return
~
(
uint32_t
)
a
;
}
in
line
in
t
BitsSelect
(
int
mask
,
int
bound
,
int
val
)
{
return
BitXor
(
BitAnd
(
mask
,
bound
),
BitAnd
(
BitNot
(
mask
),
val
));
}
int
BitsSelect
(
int
mask
,
int
bound
,
int
val
)
{
return
BitXor
(
BitAnd
(
mask
,
bound
),
BitAnd
(
BitNot
(
mask
),
val
));
}
in
line
in
t
ConstantPOT
(
int
fractional_bits
,
int
exponent
)
{
return
(
1
<<
(
uint32_t
)(
fractional_bits
+
exponent
));
}
int
ConstantPOT
(
int
fractional_bits
,
int
exponent
)
{
return
(
1
<<
(
uint32_t
)(
fractional_bits
+
exponent
));
}
in
line
in
t32_t
MaskIfNonZero
(
int32_t
a
)
{
return
a
?
BitNot
(
0
)
:
0
;
}
int32_t
MaskIfNonZero
(
int32_t
a
)
{
return
a
?
BitNot
(
0
)
:
0
;
}
in
line
in
t32_t
MaskIfZero
(
int32_t
a
)
{
return
MaskIfNonZero
(
!
a
);
}
int32_t
MaskIfZero
(
int32_t
a
)
{
return
MaskIfNonZero
(
!
a
);
}
in
line
in
t32_t
MaskIfLessThan
(
int32_t
a
,
int32_t
b
)
{
return
MaskIfNonZero
((
a
<
b
));
}
int32_t
MaskIfLessThan
(
int32_t
a
,
int32_t
b
)
{
return
MaskIfNonZero
((
a
<
b
));
}
int
CountLeadingZeroBits
(
uint32_t
x
)
{
int
CountLeadingZeroBits
(
uint32_t
x
)
{
#if defined(__GUNC__)
#if defined(__GUNC__)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录