Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
a7660331a
tesseract
提交
197b89b6
T
tesseract
项目概览
a7660331a
/
tesseract
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tesseract
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
197b89b6
编写于
8月 13, 2017
作者:
Z
zdenop
提交者:
GitHub
8月 13, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1077 from chrismamo1/chore/cleanup-compiler-warnings
WIP: Chore/cleanup compiler warnings
上级
3755a29a
6f281c36
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
12 deletion
+8
-12
arch/dotproductavx.cpp
arch/dotproductavx.cpp
+3
-0
classify/intmatcher.cpp
classify/intmatcher.cpp
+3
-4
textord/wordseg.cpp
textord/wordseg.cpp
+2
-8
未找到文件。
arch/dotproductavx.cpp
浏览文件 @
197b89b6
...
...
@@ -90,6 +90,8 @@ double DotProductAVX(const double* u, const double* v, int n) {
// instruction, as that introduces a 70 cycle delay. All this casting is to
// fool the intrinsics into thinking we are extracting the bottom int64.
auto
cast_sum
=
_mm256_castpd_si256
(
sum
);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing")
*
(
reinterpret_cast
<
int64_t
*>
(
&
result
))
=
#if defined(_WIN32) || defined(__i386__)
// This is a very simple workaround that is activated
...
...
@@ -100,6 +102,7 @@ double DotProductAVX(const double* u, const double* v, int n) {
_mm256_extract_epi64
(
cast_sum
,
0
)
#endif
;
#pragma GCC diagnostic pop
while
(
offset
<
n
)
{
result
+=
u
[
offset
]
*
v
[
offset
];
++
offset
;
...
...
classify/intmatcher.cpp
浏览文件 @
197b89b6
...
...
@@ -483,7 +483,6 @@ void IntegerMatcher::Match(INT_CLASS ClassTemplate,
bool
SeparateDebugWindows
)
{
ScratchEvidence
*
tables
=
new
ScratchEvidence
();
int
Feature
;
int
BestMatch
;
if
(
MatchDebuggingOn
(
Debug
))
cprintf
(
"Integer Matcher -------------------------------------------
\n
"
);
...
...
@@ -521,7 +520,7 @@ void IntegerMatcher::Match(INT_CLASS ClassTemplate,
tables
->
UpdateSumOfProtoEvidences
(
ClassTemplate
,
ConfigMask
,
NumFeatures
);
tables
->
NormalizeSums
(
ClassTemplate
,
NumFeatures
,
NumFeatures
);
BestMatch
=
FindBestMatch
(
ClassTemplate
,
*
tables
,
Result
);
FindBestMatch
(
ClassTemplate
,
*
tables
,
Result
);
#ifndef GRAPHICS_DISABLED
if
(
PrintMatchSummaryOn
(
Debug
))
...
...
@@ -847,9 +846,9 @@ int IntegerMatcher::UpdateTablesForFeature(
M3
=
~
M3
;
A3
>>=
mult_trunc_shift_bits_
;
M3
>>=
mult_trunc_shift_bits_
;
if
(
A3
>
evidence_mult_mask_
)
if
(
(
unsigned
)
A3
>
evidence_mult_mask_
)
A3
=
evidence_mult_mask_
;
if
(
M3
>
evidence_mult_mask_
)
if
(
(
unsigned
)
M3
>
evidence_mult_mask_
)
M3
=
evidence_mult_mask_
;
A4
=
(
A3
*
A3
)
+
(
M3
*
M3
);
...
...
textord/wordseg.cpp
浏览文件 @
197b89b6
...
...
@@ -184,9 +184,7 @@ inT32 row_words( //compute space size
)
{
BOOL8
testing_row
;
//contains testpt
BOOL8
prev_valid
;
//if decent size
BOOL8
this_valid
;
//current blob big enough
inT32
prev_x
;
//end of prev blob
inT32
min_gap
;
//min interesting gap
inT32
cluster_count
;
//no of clusters
inT32
gap_index
;
//which cluster
inT32
smooth_factor
;
//for smoothing stats
...
...
@@ -215,20 +213,16 @@ inT32 row_words( //compute space size
testing_row
=
TRUE
;
gap_stats
.
add
(
blob_box
.
width
(),
1
);
}
min_gap
=
(
inT32
)
floor
(
gap_stats
.
ile
(
textord_words_width_ile
));
gap_stats
.
clear
();
for
(
blob_it
.
mark_cycle_pt
();
!
blob_it
.
cycled_list
();
blob_it
.
forward
())
{
blob
=
blob_it
.
data
();
if
(
!
blob
->
joined_to_prev
())
{
blob_box
=
blob
->
bounding_box
();
// this_valid=blob_box.width()>=min_gap;
this_valid
=
TRUE
;
if
(
this_valid
&&
prev_valid
&&
blob_box
.
left
()
-
prev_x
<
maxwidth
)
{
if
(
prev_valid
&&
blob_box
.
left
()
-
prev_x
<
maxwidth
)
{
gap_stats
.
add
(
blob_box
.
left
()
-
prev_x
,
1
);
}
prev_valid
=
TRUE
;
prev_x
=
blob_box
.
right
();
prev_valid
=
this_valid
;
}
}
if
(
gap_stats
.
get_total
()
==
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录