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
a0f5eb28
Commit
a0f5eb28
authored
Feb 21, 2020
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16635 from mshabunin:fix-avx512-cvt
parents
07b47506
8b2c499b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
intrin_avx512.hpp
modules/core/include/opencv2/core/hal/intrin_avx512.hpp
+4
-4
No files found.
modules/core/include/opencv2/core/hal/intrin_avx512.hpp
View file @
a0f5eb28
...
...
@@ -1553,13 +1553,13 @@ inline v_float64x8 v_cvt_f64(const v_int64x8& v)
return
v_float64x8
(
_mm512_cvtepi64_pd
(
v
.
val
));
#else
// constants encoded as floating-point
__m512i
magic_i_lo
=
_mm512_set1_epi64
x
(
0x4330000000000000
);
// 2^52
__m512i
magic_i_hi32
=
_mm512_set1_epi64
x
(
0x4530000080000000
);
// 2^84 + 2^63
__m512i
magic_i_all
=
_mm512_set1_epi64
x
(
0x4530000080100000
);
// 2^84 + 2^63 + 2^52
__m512i
magic_i_lo
=
_mm512_set1_epi64
(
0x4330000000000000
);
// 2^52
__m512i
magic_i_hi32
=
_mm512_set1_epi64
(
0x4530000080000000
);
// 2^84 + 2^63
__m512i
magic_i_all
=
_mm512_set1_epi64
(
0x4530000080100000
);
// 2^84 + 2^63 + 2^52
__m512d
magic_d_all
=
_mm512_castsi512_pd
(
magic_i_all
);
// Blend the 32 lowest significant bits of v with magic_int_lo
__m512i
v_lo
=
_mm512_
blend_epi32
(
magic_i_lo
,
v
.
val
,
0x55
);
__m512i
v_lo
=
_mm512_
mask_blend_epi32
(
0x5555
,
magic_i_lo
,
v
.
val
);
// Extract the 32 most significant bits of v
__m512i
v_hi
=
_mm512_srli_epi64
(
v
.
val
,
32
);
// Flip the msb of v_hi and blend with 0x45300000
...
...
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