Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Reinecke
ducc
Commits
76c91495
Commit
76c91495
authored
Jan 13, 2020
by
Martin Reinecke
Browse files
warning fixes
parent
867e409c
Changes
2
Hide whitespace changes
Inline
Side-by-side
mr_util/threading.cc
View file @
76c91495
...
...
@@ -282,7 +282,7 @@ class Distribution
std
::
unique_lock
<
std
::
mutex
>
lck
(
mut_
);
if
(
cur_
>=
nwork_
)
return
Range
();
auto
rem
=
nwork_
-
cur_
;
size_t
tmp
=
size_t
((
fact_max_
*
rem
)
/
nthreads_
);
size_t
tmp
=
size_t
((
fact_max_
*
double
(
rem
)
)
/
double
(
nthreads_
)
)
;
auto
sz
=
std
::
min
(
rem
,
std
::
max
(
chunksize_
,
tmp
));
size_t
lo
=
cur_
;
cur_
+=
sz
;
...
...
mr_util/threading.h
View file @
76c91495
...
...
@@ -60,7 +60,7 @@ void execGuided(size_t nwork, size_t nthreads, size_t chunksize_min,
double
fact_max
,
std
::
function
<
void
(
Scheduler
&
)
>
func
);
void
execParallel
(
size_t
nthreads
,
std
::
function
<
void
(
Scheduler
&
)
>
func
);
}
// end of namespace detail
}
// end of namespace detail
_threading
using
detail_threading
::
max_threads
;
using
detail_threading
::
get_default_nthreads
;
...
...
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