Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
ebd37b19
Commit
ebd37b19
authored
Jul 13, 2016
by
Sven
Committed by
Dominic Hamon
Jul 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set cpuinfo_num_cpus on Windows (#254)
parent
b805b7c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
sysinfo.cc
src/sysinfo.cc
+5
-1
No files found.
src/sysinfo.cc
View file @
ebd37b19
...
...
@@ -239,6 +239,7 @@ void InitializeSystemInfo() {
}
// TODO: also figure out cpuinfo_num_cpus
#elif defined BENCHMARK_OS_WINDOWS
// In NT, read MHz from the registry. If we fail to do so or we're in win9x
// then make a crude estimate.
...
...
@@ -251,7 +252,10 @@ void InitializeSystemInfo() {
cpuinfo_cycles_per_second
=
static_cast
<
double
>
((
int64_t
)
data
*
(
int64_t
)(
1000
*
1000
));
// was mhz
else
cpuinfo_cycles_per_second
=
static_cast
<
double
>
(
EstimateCyclesPerSecond
());
// TODO: also figure out cpuinfo_num_cpus
SYSTEM_INFO
sysinfo
=
{
0
};
GetSystemInfo
(
&
sysinfo
);
cpuinfo_num_cpus
=
sysinfo
.
dwNumberOfProcessors
;
// number of logical processors in the current group
#elif defined BENCHMARK_OS_MACOSX
// returning "mach time units" per second. the current number of elapsed
...
...
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