Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
526defab
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
526defab
编写于
5月 22, 2015
作者:
V
Vadim Pisarevsky
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4048 from vpisarev:hal_fixes
上级
8e392251
f32f0486
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
106 addition
and
13 deletion
+106
-13
modules/core/include/opencv2/core/base.hpp
modules/core/include/opencv2/core/base.hpp
+19
-10
modules/core/include/opencv2/core/matx.hpp
modules/core/include/opencv2/core/matx.hpp
+1
-1
modules/core/include/opencv2/core/operations.hpp
modules/core/include/opencv2/core/operations.hpp
+2
-2
modules/core/src/lapack.cpp
modules/core/src/lapack.cpp
+20
-0
modules/hal/src/mathfuncs.cpp
modules/hal/src/mathfuncs.cpp
+64
-0
未找到文件。
modules/core/include/opencv2/core/base.hpp
浏览文件 @
526defab
...
...
@@ -492,11 +492,9 @@ _AccTp normL2Sqr(const _Tp* a, const _Tp* b, int n)
return
s
;
}
inline
float
normL2Sqr
(
const
float
*
a
,
const
float
*
b
,
int
n
)
static
inline
float
normL2Sqr
(
const
float
*
a
,
const
float
*
b
,
int
n
)
{
if
(
n
>=
8
)
return
hal
::
normL2Sqr_
(
a
,
b
,
n
);
float
s
=
0
;
float
s
=
0.
f
;
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
float
v
=
a
[
i
]
-
b
[
i
];
...
...
@@ -527,20 +525,22 @@ _AccTp normL1(const _Tp* a, const _Tp* b, int n)
inline
float
normL1
(
const
float
*
a
,
const
float
*
b
,
int
n
)
{
if
(
n
>=
8
)
return
hal
::
normL1_
(
a
,
b
,
n
);
float
s
=
0
;
float
s
=
0.
f
;
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
float
v
=
a
[
i
]
-
b
[
i
];
s
+=
std
::
abs
(
v
);
s
+=
std
::
abs
(
a
[
i
]
-
b
[
i
]);
}
return
s
;
}
inline
int
normL1
(
const
uchar
*
a
,
const
uchar
*
b
,
int
n
)
{
return
hal
::
normL1_
(
a
,
b
,
n
);
int
s
=
0
;
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
s
+=
std
::
abs
(
a
[
i
]
-
b
[
i
]);
}
return
s
;
}
template
<
typename
_Tp
,
typename
_AccTp
>
static
inline
...
...
@@ -573,6 +573,15 @@ CV_EXPORTS_W float cubeRoot(float val);
*/
CV_EXPORTS_W
float
fastAtan2
(
float
y
,
float
x
);
/** proxy for hal::LU */
CV_EXPORTS
int
LU
(
float
*
A
,
size_t
astep
,
int
m
,
float
*
b
,
size_t
bstep
,
int
n
);
/** proxy for hal::LU */
CV_EXPORTS
int
LU
(
double
*
A
,
size_t
astep
,
int
m
,
double
*
b
,
size_t
bstep
,
int
n
);
/** proxy for hal::Cholesky */
CV_EXPORTS
bool
Cholesky
(
float
*
A
,
size_t
astep
,
int
m
,
float
*
b
,
size_t
bstep
,
int
n
);
/** proxy for hal::Cholesky */
CV_EXPORTS
bool
Cholesky
(
double
*
A
,
size_t
astep
,
int
m
,
double
*
b
,
size_t
bstep
,
int
n
);
////////////////// forward declarations for important OpenCV types //////////////////
//! @cond IGNORED
...
...
modules/core/include/opencv2/core/matx.hpp
浏览文件 @
526defab
...
...
@@ -427,7 +427,7 @@ template<typename _Tp, int m> struct Matx_DetOp
double
operator
()(
const
Matx
<
_Tp
,
m
,
m
>&
a
)
const
{
Matx
<
_Tp
,
m
,
m
>
temp
=
a
;
double
p
=
hal
::
LU
(
temp
.
val
,
m
*
sizeof
(
_Tp
),
m
,
0
,
0
,
0
);
double
p
=
LU
(
temp
.
val
,
m
*
sizeof
(
_Tp
),
m
,
0
,
0
,
0
);
if
(
p
==
0
)
return
p
;
for
(
int
i
=
0
;
i
<
m
;
i
++
)
...
...
modules/core/include/opencv2/core/operations.hpp
浏览文件 @
526defab
...
...
@@ -72,9 +72,9 @@ template<typename _Tp, int m> struct Matx_FastInvOp
b
(
i
,
i
)
=
(
_Tp
)
1
;
if
(
method
==
DECOMP_CHOLESKY
)
return
hal
::
Cholesky
(
temp
.
val
,
m
*
sizeof
(
_Tp
),
m
,
b
.
val
,
m
*
sizeof
(
_Tp
),
m
);
return
Cholesky
(
temp
.
val
,
m
*
sizeof
(
_Tp
),
m
,
b
.
val
,
m
*
sizeof
(
_Tp
),
m
);
return
hal
::
LU
(
temp
.
val
,
m
*
sizeof
(
_Tp
),
m
,
b
.
val
,
m
*
sizeof
(
_Tp
),
m
)
!=
0
;
return
LU
(
temp
.
val
,
m
*
sizeof
(
_Tp
),
m
,
b
.
val
,
m
*
sizeof
(
_Tp
),
m
)
!=
0
;
}
};
...
...
modules/core/src/lapack.cpp
浏览文件 @
526defab
...
...
@@ -50,6 +50,26 @@
namespace
cv
{
int
LU
(
float
*
A
,
size_t
astep
,
int
m
,
float
*
b
,
size_t
bstep
,
int
n
)
{
return
hal
::
LU
(
A
,
astep
,
m
,
b
,
bstep
,
n
);
}
int
LU
(
double
*
A
,
size_t
astep
,
int
m
,
double
*
b
,
size_t
bstep
,
int
n
)
{
return
hal
::
LU
(
A
,
astep
,
m
,
b
,
bstep
,
n
);
}
bool
Cholesky
(
float
*
A
,
size_t
astep
,
int
m
,
float
*
b
,
size_t
bstep
,
int
n
)
{
return
hal
::
Cholesky
(
A
,
astep
,
m
,
b
,
bstep
,
n
);
}
bool
Cholesky
(
double
*
A
,
size_t
astep
,
int
m
,
double
*
b
,
size_t
bstep
,
int
n
)
{
return
hal
::
Cholesky
(
A
,
astep
,
m
,
b
,
bstep
,
n
);
}
template
<
typename
_Tp
>
static
inline
_Tp
hypot
(
_Tp
a
,
_Tp
b
)
{
a
=
std
::
abs
(
a
);
...
...
modules/hal/src/mathfuncs.cpp
浏览文件 @
526defab
...
...
@@ -42,6 +42,8 @@
#include "precomp.hpp"
#undef HAVE_IPP
namespace
cv
{
namespace
hal
{
///////////////////////////////////// ATAN2 ////////////////////////////////////
...
...
@@ -160,6 +162,19 @@ void fastAtan2(const float *Y, const float *X, float *angle, int len, bool angle
void
magnitude
(
const
float
*
x
,
const
float
*
y
,
float
*
mag
,
int
len
)
{
#if defined HAVE_IPP
CV_IPP_CHECK
()
{
IppStatus
status
=
ippsMagnitude_32f
(
x
,
y
,
mag
,
len
);
if
(
status
>=
0
)
{
CV_IMPL_ADD
(
CV_IMPL_IPP
);
return
;
}
setIppErrorStatus
();
}
#endif
int
i
=
0
;
#if CV_SIMD128
...
...
@@ -183,6 +198,19 @@ void magnitude(const float* x, const float* y, float* mag, int len)
void
magnitude
(
const
double
*
x
,
const
double
*
y
,
double
*
mag
,
int
len
)
{
#if defined(HAVE_IPP)
CV_IPP_CHECK
()
{
IppStatus
status
=
ippsMagnitude_64f
(
x
,
y
,
mag
,
len
);
if
(
status
>=
0
)
{
CV_IMPL_ADD
(
CV_IMPL_IPP
);
return
;
}
setIppErrorStatus
();
}
#endif
int
i
=
0
;
#if CV_SIMD128_64F
...
...
@@ -207,6 +235,18 @@ void magnitude(const double* x, const double* y, double* mag, int len)
void
invSqrt
(
const
float
*
src
,
float
*
dst
,
int
len
)
{
#if defined(HAVE_IPP)
CV_IPP_CHECK
()
{
if
(
ippsInvSqrt_32f_A21
(
src
,
dst
,
len
)
>=
0
)
{
CV_IMPL_ADD
(
CV_IMPL_IPP
);
return
;
}
setIppErrorStatus
();
}
#endif
int
i
=
0
;
#if CV_SIMD128
...
...
@@ -241,6 +281,18 @@ void invSqrt(const double* src, double* dst, int len)
void
sqrt
(
const
float
*
src
,
float
*
dst
,
int
len
)
{
#if defined(HAVE_IPP)
CV_IPP_CHECK
()
{
if
(
ippsSqrt_32f_A21
(
src
,
dst
,
len
)
>=
0
)
{
CV_IMPL_ADD
(
CV_IMPL_IPP
);
return
;
}
setIppErrorStatus
();
}
#endif
int
i
=
0
;
#if CV_SIMD128
...
...
@@ -260,6 +312,18 @@ void sqrt(const float* src, float* dst, int len)
void
sqrt
(
const
double
*
src
,
double
*
dst
,
int
len
)
{
#if defined(HAVE_IPP)
CV_IPP_CHECK
()
{
if
(
ippsSqrt_64f_A50
(
src
,
dst
,
len
)
>=
0
)
{
CV_IMPL_ADD
(
CV_IMPL_IPP
);
return
;
}
setIppErrorStatus
();
}
#endif
int
i
=
0
;
#if CV_SIMD128_64F
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录