Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
055d6f56
Commit
055d6f56
authored
Feb 26, 2013
by
Davis King
Browse files
Fixed some compiler errors when using certain versions of the verbose
parallel_for routines.
parent
a32f475c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
dlib/threads/parallel_for_extension.h
dlib/threads/parallel_for_extension.h
+25
-6
No files found.
dlib/threads/parallel_for_extension.h
View file @
055d6f56
...
...
@@ -301,13 +301,13 @@ namespace dlib
pbar
.
print_status
(
0
);
}
long
count
;
mutable
long
count
;
T
&
obj
;
void
(
T
::*
funct
)(
long
);
console_progress_indicator
pbar
;
mutable
console_progress_indicator
pbar
;
mutex
m
;
void
operator
()(
long
i
)
void
operator
()(
long
i
)
const
{
(
obj
.
*
funct
)(
i
);
{
...
...
@@ -316,7 +316,26 @@ namespace dlib
}
}
void
operator
()(
long
begin
,
long
end
)
};
template
<
typename
T
>
class
parfor_verbose_helper3
{
public:
parfor_verbose_helper3
(
T
&
obj_
,
void
(
T
::*
funct_
)(
long
,
long
),
long
begin
,
long
end
)
:
obj
(
obj_
),
funct
(
funct_
),
pbar
(
end
-
begin
)
{
count
=
0
;
pbar
.
print_status
(
0
);
}
mutable
long
count
;
T
&
obj
;
void
(
T
::*
funct
)(
long
,
long
);
mutable
console_progress_indicator
pbar
;
mutex
m
;
void
operator
()(
long
begin
,
long
end
)
const
{
(
obj
.
*
funct
)(
begin
,
end
);
{
...
...
@@ -480,7 +499,7 @@ namespace dlib
<<
"
\n\t
chunks_per_thread: "
<<
chunks_per_thread
);
impl
::
parfor_verbose_helper
<
T
>
helper
(
obj
,
funct
,
begin
,
end
);
impl
::
parfor_verbose_helper
3
<
T
>
helper
(
obj
,
funct
,
begin
,
end
);
parallel_for_blocked
(
tp
,
begin
,
end
,
helper
,
chunks_per_thread
);
}
...
...
@@ -505,7 +524,7 @@ namespace dlib
<<
"
\n\t
chunks_per_thread: "
<<
chunks_per_thread
);
impl
::
parfor_verbose_helper
<
T
>
helper
(
obj
,
funct
,
begin
,
end
);
impl
::
parfor_verbose_helper
3
<
T
>
helper
(
obj
,
funct
,
begin
,
end
);
parallel_for_blocked
(
num_threads
,
begin
,
end
,
helper
,
chunks_per_thread
);
}
...
...
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