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
4c2858fd
Commit
4c2858fd
authored
Apr 26, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: fix POPCNT & SSE4.2 detection code
parent
c5c3ec46
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
7 deletions
+23
-7
cpu_popcnt.cpp
cmake/checks/cpu_popcnt.cpp
+19
-5
cpu_sse42.cpp
cmake/checks/cpu_sse42.cpp
+4
-2
No files found.
cmake/checks/cpu_popcnt.cpp
View file @
4c2858fd
#include <nmmintrin.h>
#ifdef _MSC_VER
#ifndef _MSC_VER
# include <nmmintrin.h>
#include <popcntintrin.h>
# if defined(_M_X64)
# define CV_POPCNT_U64 _mm_popcnt_u64
# endif
# define CV_POPCNT_U32 _mm_popcnt_u32
#else
# include <popcntintrin.h>
# if defined(__x86_64__)
# define CV_POPCNT_U64 __builtin_popcountll
# endif
# define CV_POPCNT_U32 __builtin_popcount
#endif
#endif
int
main
()
{
int
i
=
_mm_popcnt_u64
(
1
);
int
main
()
{
#ifdef CV_POPCNT_U64
int
i
=
CV_POPCNT_U64
(
1
);
#endif
int
j
=
CV_POPCNT_U32
(
1
);
return
0
;
return
0
;
}
}
cmake/checks/cpu_sse42.cpp
View file @
4c2858fd
#include <nmmintrin.h>
#include <nmmintrin.h>
int
main
()
{
int
i
=
_mm_popcnt_u64
(
1
);
int
main
()
{
unsigned
int
res
=
_mm_crc32_u8
(
1
,
2
);
return
0
;
return
0
;
}
}
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