Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
32c23908
Commit
32c23908
authored
Aug 09, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7067 from tomoaki0705:fixBuildErrorJetsonK1
parents
c1d73e4f
3debc78a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
convert.cpp
modules/core/src/convert.cpp
+12
-2
No files found.
modules/core/src/convert.cpp
View file @
32c23908
...
...
@@ -4545,6 +4545,16 @@ static short convertFp16SW(float fp32)
}
#endif
#if CV_FP16 && (defined __GNUC__) && (defined __arm__ || defined __aarch64__)
#if 5 <= __GNUC__
static
inline
float16x4_t
load_f16
(
const
short
*
p
)
{
return
vld1_f16
((
const
float16_t
*
)
p
);
}
static
inline
void
store_f16
(
short
*
p
,
float16x4_t
v
)
{
vst1_f16
((
float16_t
*
)
p
,
v
);
}
#else
static
inline
float16x4_t
load_f16
(
const
short
*
p
)
{
return
(
float16x4_t
)
vld1_s16
(
p
);
}
static
inline
void
store_f16
(
short
*
p
,
float16x4_t
v
)
{
vst1_s16
(
p
,
(
int16x4_t
)
v
);
}
#endif
#endif
// template for FP16 HW conversion function
template
<
typename
T
,
typename
DT
>
static
void
cvtScaleHalf_
(
const
T
*
src
,
size_t
sstep
,
DT
*
dst
,
size_t
dstep
,
Size
size
);
...
...
@@ -4579,7 +4589,7 @@ cvtScaleHalf_<float, short>( const float* src, size_t sstep, short* dst, size_t
float16x4_t
v_dst
=
vcvt_f16_f32
(
v_src
);
vst1_f16
((
float16_t
*
)(
dst
+
x
)
,
v_dst
);
store_f16
(
dst
+
x
,
v_dst
);
#else
#error "Configuration error"
#endif
...
...
@@ -4631,7 +4641,7 @@ cvtScaleHalf_<short, float>( const short* src, size_t sstep, float* dst, size_t
_mm_storeu_ps
(
dst
+
x
,
v_dst
);
#elif defined __GNUC__ && (defined __arm__ || defined __aarch64__)
float16x4_t
v_src
=
vld1_f16
((
float16_t
*
)(
src
+
x
)
);
float16x4_t
v_src
=
load_f16
(
src
+
x
);
float32x4_t
v_dst
=
vcvt_f32_f16
(
v_src
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment