Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
las3_pub
/
predictable_parallel_patterns
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Project 'las3/development/scheduling/predictable_parallel_patterns' was moved to 'las3_pub/predictable_parallel_patterns'. Please update any links and bookmarks that may still have the old path.
Commit
3bbd8951
authored
Apr 12, 2019
by
FritzFlorian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change some size types.
parent
b7f42e2b
Pipeline
#1150
passed with stages
in 3 minutes 31 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
lib/pls/include/pls/internal/base/spin_lock.h
+1
-1
lib/pls/include/pls/internal/helpers/mini_benchmark.h
+1
-1
lib/pls/include/pls/internal/scheduling/abstract_task.h
+4
-4
lib/pls/src/internal/scheduling/abstract_task.cpp
+2
-1
No files found.
lib/pls/include/pls/internal/base/spin_lock.h
View file @
3bbd8951
...
...
@@ -18,7 +18,7 @@ namespace pls {
*/
class
spin_lock
{
std
::
atomic_flag
flag_
;
int
yield_at_tries_
;
unsigned
int
yield_at_tries_
;
public
:
...
...
lib/pls/include/pls/internal/helpers/mini_benchmark.h
View file @
3bbd8951
...
...
@@ -13,7 +13,7 @@ namespace pls {
namespace
helpers
{
// TODO: Clean up (separate into small functions and .cpp file)
template
<
typename
Function
>
void
run_mini_benchmark
(
const
Function
&
lambda
,
size_t
max_threads
,
long
max_runtime_ms
=
1000
)
{
void
run_mini_benchmark
(
const
Function
&
lambda
,
size_t
max_threads
,
unsigned
long
max_runtime_ms
=
1000
)
{
using
namespace
std
;
using
namespace
pls
::
internal
::
scheduling
;
...
...
lib/pls/include/pls/internal/scheduling/abstract_task.h
View file @
3bbd8951
...
...
@@ -13,12 +13,12 @@ namespace pls {
using
id
=
helpers
::
unique_id
;
private
:
int
depth_
;
unsigned
int
depth_
;
abstract_task
::
id
unique_id_
;
abstract_task
*
child_task_
;
public
:
abstract_task
(
const
int
depth
,
const
abstract_task
::
id
&
unique_id
)
:
abstract_task
(
const
unsigned
int
depth
,
const
abstract_task
::
id
&
unique_id
)
:
depth_
{
depth
},
unique_id_
{
unique_id
},
child_task_
{
nullptr
}
{}
...
...
@@ -27,8 +27,8 @@ namespace pls {
void
set_child
(
abstract_task
*
child_task
)
{
child_task_
=
child_task
;
}
abstract_task
*
child
()
{
return
child_task_
;
}
void
set_depth
(
int
depth
)
{
depth_
=
depth
;
}
int
depth
()
const
{
return
depth_
;
}
void
set_depth
(
unsigned
int
depth
)
{
depth_
=
depth
;
}
unsigned
int
depth
()
const
{
return
depth_
;
}
id
unique_id
()
const
{
return
unique_id_
;
}
protected
:
virtual
bool
internal_stealing
(
abstract_task
*
other_task
)
=
0
;
...
...
lib/pls/src/internal/scheduling/abstract_task.cpp
View file @
3bbd8951
...
...
@@ -33,6 +33,7 @@ namespace pls {
}
PROFILE_END_BLOCK
// Try to steal 'internal', e.g. for_join_sub_tasks in a fork_join_task constellation
PROFILE_STEALING
(
"Internal Steal"
)
if
(
current_task
!=
nullptr
)
{
// See if it equals our type and depth of task
...
...
@@ -52,7 +53,7 @@ namespace pls {
// Execute 'top level task steal' if possible
// (only try deeper tasks to keep depth restricted stealing)
// (only try deeper tasks to keep depth restricted stealing)
.
PROFILE_STEALING
(
"Top Level Steal"
)
while
(
current_task
!=
nullptr
)
{
auto
lock
=
&
target_state
->
lock_
;
...
...
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