Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
6ca816e0
There was an error fetching the commit references. Please try again later.
Commit
6ca816e0
authored
8 years ago
by
Yuri Kunde Schlesner
Browse files
Options
Downloads
Patches
Plain Diff
common/cpu_detect: Add missing include and fix namespace scope
parent
eb435816
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/x64/cpu_detect.cpp
+7
-5
7 additions, 5 deletions
src/common/x64/cpu_detect.cpp
with
7 additions
and
5 deletions
src/common/x64/cpu_detect.cpp
+
7
−
5
View file @
6ca816e0
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
#include
"common/common_types.h"
#include
"common/common_types.h"
#include
"cpu_detect.h"
#include
"cpu_detect.h"
namespace
Common
{
#ifdef _MSC_VER
#include
<intrin.h>
#
ifndef _MSC_VER
#
else
#if defined(__DragonFly__) || defined(__FreeBSD__)
#if defined(__DragonFly__) || defined(__FreeBSD__)
// clang-format off
// clang-format off
...
@@ -37,13 +37,15 @@ static inline void __cpuid(int info[4], int function_id) {
...
@@ -37,13 +37,15 @@ static inline void __cpuid(int info[4], int function_id) {
}
}
#define _XCR_XFEATURE_ENABLED_MASK 0
#define _XCR_XFEATURE_ENABLED_MASK 0
static
u64
_xgetbv
(
u32
index
)
{
static
inline
u64
_xgetbv
(
u32
index
)
{
u32
eax
,
edx
;
u32
eax
,
edx
;
__asm__
__volatile__
(
"xgetbv"
:
"=a"
(
eax
),
"=d"
(
edx
)
:
"c"
(
index
));
__asm__
__volatile__
(
"xgetbv"
:
"=a"
(
eax
),
"=d"
(
edx
)
:
"c"
(
index
));
return
((
u64
)
edx
<<
32
)
|
eax
;
return
((
u64
)
edx
<<
32
)
|
eax
;
}
}
#endif // ifndef _MSC_VER
#endif // _MSC_VER
namespace
Common
{
// Detects the various CPU features
// Detects the various CPU features
static
CPUCaps
Detect
()
{
static
CPUCaps
Detect
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment