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
Commit
be2cdbfe
authored
5 years ago
by
FritzFlorian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow for switching deque implementation.
parent
7b61f2e0
Pipeline
#1249
failed with stages
in 1 minute 22 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
5 deletions
+24
-5
lib/pls/include/pls/internal/data_structures/deque.h
+19
-0
lib/pls/include/pls/internal/data_structures/locking_deque.h
+1
-1
lib/pls/include/pls/internal/scheduling/task.h
+2
-2
lib/pls/include/pls/internal/scheduling/thread_state.h
+2
-2
No files found.
lib/pls/include/pls/internal/data_structures/deque.h
0 → 100644
View file @
be2cdbfe
#ifndef PLS_DEQUE_H_
#define PLS_DEQUE_H_
#include "work_stealing_deque.h"
#include "locking_deque.h"
namespace
pls
{
namespace
internal
{
namespace
data_structures
{
template
<
typename
Item
>
using
deque
=
work_stealing_deque
<
Item
>
;
}
}
}
#endif //PLS_DEQUE_H_
This diff is collapsed.
Click to expand it.
lib/pls/include/pls/internal/data_structures/locking_deque.h
View file @
be2cdbfe
...
@@ -70,7 +70,7 @@ class locking_deque {
...
@@ -70,7 +70,7 @@ class locking_deque {
deque_item
->
next_
=
nullptr
;
deque_item
->
next_
=
nullptr
;
tail_
=
deque_item
;
tail_
=
deque_item
;
return
deque_item
->
item
_
;
return
&
deque_item
->
content
_
;
}
}
Item
*
pop_tail
()
{
Item
*
pop_tail
()
{
...
...
This diff is collapsed.
Click to expand it.
lib/pls/include/pls/internal/scheduling/task.h
View file @
be2cdbfe
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include "pls/internal/helpers/profiler.h"
#include "pls/internal/helpers/profiler.h"
#include "pls/internal/data_structures/aligned_stack.h"
#include "pls/internal/data_structures/aligned_stack.h"
#include "pls/internal/data_structures/
work_stealing_
deque.h"
#include "pls/internal/data_structures/deque.h"
#include "pls/internal/scheduling/thread_state.h"
#include "pls/internal/scheduling/thread_state.h"
...
@@ -21,7 +21,7 @@ class task {
...
@@ -21,7 +21,7 @@ class task {
task
*
parent_
;
task
*
parent_
;
// Stack Management (reset stack pointer after wait_for_all() calls)
// Stack Management (reset stack pointer after wait_for_all() calls)
data_structures
::
work_stealing_
deque
<
task
>::
state
deque_state_
;
data_structures
::
deque
<
task
>::
state
deque_state_
;
protected
:
protected
:
// TODO: Double Check with copy and move constructors, try to minimize overhead while keeping a clean API.
// TODO: Double Check with copy and move constructors, try to minimize overhead while keeping a clean API.
...
...
This diff is collapsed.
Click to expand it.
lib/pls/include/pls/internal/scheduling/thread_state.h
View file @
be2cdbfe
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#include "pls/internal/base/thread.h"
#include "pls/internal/base/thread.h"
#include "pls/internal/data_structures/aligned_stack.h"
#include "pls/internal/data_structures/aligned_stack.h"
#include "pls/internal/data_structures/
work_stealing_
deque.h"
#include "pls/internal/data_structures/deque.h"
namespace
pls
{
namespace
pls
{
namespace
internal
{
namespace
internal
{
...
@@ -21,7 +21,7 @@ struct thread_state {
...
@@ -21,7 +21,7 @@ struct thread_state {
alignas
(
base
::
system_details
::
CACHE_LINE_SIZE
)
scheduler
*
scheduler_
;
alignas
(
base
::
system_details
::
CACHE_LINE_SIZE
)
scheduler
*
scheduler_
;
alignas
(
base
::
system_details
::
CACHE_LINE_SIZE
)
task
*
current_task_
;
alignas
(
base
::
system_details
::
CACHE_LINE_SIZE
)
task
*
current_task_
;
alignas
(
base
::
system_details
::
CACHE_LINE_SIZE
)
data_structures
::
aligned_stack
*
task_stack_
;
alignas
(
base
::
system_details
::
CACHE_LINE_SIZE
)
data_structures
::
aligned_stack
*
task_stack_
;
alignas
(
base
::
system_details
::
CACHE_LINE_SIZE
)
data_structures
::
work_stealing_
deque
<
task
>
deque_
;
alignas
(
base
::
system_details
::
CACHE_LINE_SIZE
)
data_structures
::
deque
<
task
>
deque_
;
alignas
(
base
::
system_details
::
CACHE_LINE_SIZE
)
size_t
id_
;
alignas
(
base
::
system_details
::
CACHE_LINE_SIZE
)
size_t
id_
;
alignas
(
base
::
system_details
::
CACHE_LINE_SIZE
)
std
::
minstd_rand
random_
;
alignas
(
base
::
system_details
::
CACHE_LINE_SIZE
)
std
::
minstd_rand
random_
;
...
...
This diff is collapsed.
Click to expand it.
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