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
a2b3cd9a
Commit
a2b3cd9a
authored
Oct 17, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15709 from alalek:js_simd_reverse
parents
d31da08d
ad172726
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
intrin_wasm.hpp
modules/core/include/opencv2/core/hal/intrin_wasm.hpp
+32
-0
No files found.
modules/core/include/opencv2/core/hal/intrin_wasm.hpp
View file @
a2b3cd9a
...
...
@@ -3123,6 +3123,38 @@ OPENCV_HAL_IMPL_WASM_LOADSTORE_INT_OP(v_float32x4, float)
OPENCV_HAL_IMPL_WASM_LOADSTORE_INT_OP
(
v_float64x2
,
double
)
/** Reverse **/
inline
v_uint8x16
v_reverse
(
const
v_uint8x16
&
a
)
{
return
v_uint8x16
(
wasm_v8x16_shuffle
(
a
.
val
,
a
.
val
,
15
,
14
,
13
,
12
,
11
,
10
,
9
,
8
,
7
,
6
,
5
,
4
,
3
,
2
,
1
,
0
));
}
inline
v_int8x16
v_reverse
(
const
v_int8x16
&
a
)
{
return
v_reinterpret_as_s8
(
v_reverse
(
v_reinterpret_as_u8
(
a
)));
}
inline
v_uint16x8
v_reverse
(
const
v_uint16x8
&
a
)
{
return
v_uint16x8
(
wasm_v8x16_shuffle
(
a
.
val
,
a
.
val
,
14
,
15
,
12
,
13
,
10
,
11
,
8
,
9
,
6
,
7
,
4
,
5
,
2
,
3
,
0
,
1
));
}
inline
v_int16x8
v_reverse
(
const
v_int16x8
&
a
)
{
return
v_reinterpret_as_s16
(
v_reverse
(
v_reinterpret_as_u16
(
a
)));
}
inline
v_uint32x4
v_reverse
(
const
v_uint32x4
&
a
)
{
return
v_uint32x4
(
wasm_v8x16_shuffle
(
a
.
val
,
a
.
val
,
12
,
13
,
14
,
15
,
8
,
9
,
10
,
11
,
4
,
5
,
6
,
7
,
0
,
1
,
2
,
3
));
}
inline
v_int32x4
v_reverse
(
const
v_int32x4
&
a
)
{
return
v_reinterpret_as_s32
(
v_reverse
(
v_reinterpret_as_u32
(
a
)));
}
inline
v_float32x4
v_reverse
(
const
v_float32x4
&
a
)
{
return
v_reinterpret_as_f32
(
v_reverse
(
v_reinterpret_as_u32
(
a
)));
}
inline
v_uint64x2
v_reverse
(
const
v_uint64x2
&
a
)
{
return
v_uint64x2
(
wasm_v8x16_shuffle
(
a
.
val
,
a
.
val
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
));
}
inline
v_int64x2
v_reverse
(
const
v_int64x2
&
a
)
{
return
v_reinterpret_as_s64
(
v_reverse
(
v_reinterpret_as_u64
(
a
)));
}
inline
v_float64x2
v_reverse
(
const
v_float64x2
&
a
)
{
return
v_reinterpret_as_f64
(
v_reverse
(
v_reinterpret_as_u64
(
a
)));
}
#define OPENCV_HAL_IMPL_WASM_REDUCE_OP_4_SUM(_Tpvec, scalartype, regtype, suffix, esuffix) \
inline scalartype v_reduce_sum(const _Tpvec& a) \
{ \
...
...
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