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
f3e7df77
authored
Aug 30, 2019
by
FritzFlorian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move scheduling related data structures in correct package.
parent
2801278f
Pipeline
#1306
failed with stages
in 24 seconds
Changes
9
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
11 deletions
+27
-11
lib/pls/CMakeLists.txt
+7
-7
lib/pls/include/pls/internal/scheduling/data_structures/aligned_stack.h
+2
-0
lib/pls/include/pls/internal/scheduling/data_structures/aligned_stack_impl.h
+2
-0
lib/pls/include/pls/internal/scheduling/data_structures/deque.h
+2
-0
lib/pls/include/pls/internal/scheduling/data_structures/locking_deque.h
+3
-1
lib/pls/include/pls/internal/scheduling/data_structures/locking_deque_impl.h
+3
-1
lib/pls/include/pls/internal/scheduling/data_structures/stamped_integer.h
+2
-0
lib/pls/include/pls/internal/scheduling/data_structures/work_stealing_deque.h
+4
-2
lib/pls/include/pls/internal/scheduling/data_structures/work_stealing_deque_impl.h
+2
-0
No files found.
lib/pls/CMakeLists.txt
View file @
f3e7df77
...
@@ -35,13 +35,13 @@ add_library(pls STATIC
...
@@ -35,13 +35,13 @@ add_library(pls STATIC
include/pls/internal/base/error_handling.h
include/pls/internal/base/error_handling.h
include/pls/internal/base/alignment.h src/internal/base/alignment.cpp
include/pls/internal/base/alignment.h src/internal/base/alignment.cpp
include/pls/internal/data_structures/aligned_stack.h src/internal/data_structures/aligned_stack.cpp
include/pls/internal/
scheduling/
data_structures/aligned_stack.h src/internal/data_structures/aligned_stack.cpp
include/pls/internal/data_structures/aligned_stack_impl.h
include/pls/internal/
scheduling/
data_structures/aligned_stack_impl.h
include/pls/internal/data_structures/deque.h
include/pls/internal/
scheduling/
data_structures/deque.h
include/pls/internal/data_structures/locking_deque.h
include/pls/internal/
scheduling/
data_structures/locking_deque.h
include/pls/internal/data_structures/locking_deque_impl.h
include/pls/internal/
scheduling/
data_structures/locking_deque_impl.h
include/pls/internal/
data_structures/work_stealing_deque.h include/pls/internal
/data_structures/work_stealing_deque_impl.h
include/pls/internal/
scheduling/data_structures/work_stealing_deque.h include/pls/internal/scheduling
/data_structures/work_stealing_deque_impl.h
include/pls/internal/data_structures/stamped_integer.h
include/pls/internal/
scheduling/
data_structures/stamped_integer.h
include/pls/internal/helpers/prohibit_new.h
include/pls/internal/helpers/prohibit_new.h
include/pls/internal/helpers/profiler.h
include/pls/internal/helpers/profiler.h
...
...
lib/pls/include/pls/internal/data_structures/aligned_stack.h
→
lib/pls/include/pls/internal/
scheduling/
data_structures/aligned_stack.h
View file @
f3e7df77
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
namespace
pls
{
namespace
pls
{
namespace
internal
{
namespace
internal
{
namespace
scheduling
{
namespace
data_structures
{
namespace
data_structures
{
using
base
::
system_details
::
pointer_t
;
using
base
::
system_details
::
pointer_t
;
...
@@ -59,6 +60,7 @@ class aligned_stack {
...
@@ -59,6 +60,7 @@ class aligned_stack {
}
}
}
}
}
}
}
#include "aligned_stack_impl.h"
#include "aligned_stack_impl.h"
#endif //PLS_ALIGNED_STACK_H
#endif //PLS_ALIGNED_STACK_H
lib/pls/include/pls/internal/data_structures/aligned_stack_impl.h
→
lib/pls/include/pls/internal/
scheduling/
data_structures/aligned_stack_impl.h
View file @
f3e7df77
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
namespace
pls
{
namespace
pls
{
namespace
internal
{
namespace
internal
{
namespace
scheduling
{
namespace
data_structures
{
namespace
data_structures
{
template
<
typename
T
,
typename
...
ARGS
>
template
<
typename
T
,
typename
...
ARGS
>
...
@@ -30,5 +31,6 @@ T aligned_stack::pop() {
...
@@ -30,5 +31,6 @@ T aligned_stack::pop() {
}
}
}
}
}
}
}
#endif //PLS_ALIGNED_STACK_IMPL_H
#endif //PLS_ALIGNED_STACK_IMPL_H
lib/pls/include/pls/internal/data_structures/deque.h
→
lib/pls/include/pls/internal/
scheduling/
data_structures/deque.h
View file @
f3e7df77
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
namespace
pls
{
namespace
pls
{
namespace
internal
{
namespace
internal
{
namespace
scheduling
{
namespace
data_structures
{
namespace
data_structures
{
template
<
typename
Task
>
template
<
typename
Task
>
...
@@ -15,5 +16,6 @@ using deque = work_stealing_deque<Task>;
...
@@ -15,5 +16,6 @@ using deque = work_stealing_deque<Task>;
}
}
}
}
}
}
}
#endif //PLS_DEQUE_H_
#endif //PLS_DEQUE_H_
lib/pls/include/pls/internal/data_structures/locking_deque.h
→
lib/pls/include/pls/internal/
scheduling/
data_structures/locking_deque.h
View file @
f3e7df77
...
@@ -5,10 +5,11 @@
...
@@ -5,10 +5,11 @@
#include <mutex>
#include <mutex>
#include "pls/internal/base/spin_lock.h"
#include "pls/internal/base/spin_lock.h"
#include "
pls/internal/data_structures/
aligned_stack.h"
#include "aligned_stack.h"
namespace
pls
{
namespace
pls
{
namespace
internal
{
namespace
internal
{
namespace
scheduling
{
namespace
data_structures
{
namespace
data_structures
{
using
deque_offset
=
aligned_stack
::
stack_offset
;
using
deque_offset
=
aligned_stack
::
stack_offset
;
...
@@ -72,6 +73,7 @@ class locking_deque {
...
@@ -72,6 +73,7 @@ class locking_deque {
}
}
}
}
}
}
}
#include "locking_deque_impl.h"
#include "locking_deque_impl.h"
#endif //PLS_LOCKING_DEQUE_H
#endif //PLS_LOCKING_DEQUE_H
lib/pls/include/pls/internal/data_structures/locking_deque_impl.h
→
lib/pls/include/pls/internal/
scheduling/
data_structures/locking_deque_impl.h
View file @
f3e7df77
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
namespace
pls
{
namespace
pls
{
namespace
internal
{
namespace
internal
{
namespace
scheduling
{
namespace
data_structures
{
namespace
data_structures
{
template
<
typename
Task
>
template
<
typename
Task
>
...
@@ -13,7 +14,7 @@ T *locking_deque<Task>::push_task(ARGS &&...args) {
...
@@ -13,7 +14,7 @@ T *locking_deque<Task>::push_task(ARGS &&...args) {
"Must only push types of <Item> onto work_stealing_deque<Item>"
);
"Must only push types of <Item> onto work_stealing_deque<Item>"
);
// Allocate object
// Allocate object
auto
deque_item
=
stack_
->
push
<
locking_deque_container
<
Task
,
T
>>
(
std
::
forward
<
ARGS
>
(
args
)...);
auto
deque_item
=
stack_
->
push
<
locking_deque_container
<
Task
,
T
>>
(
std
::
forward
<
ARGS
>
(
args
)...);
deque_item
->
item_
=
&
deque_item
->
content_
;
deque_item
->
item_
=
&
deque_item
->
content_
;
// Keep for later publishing
// Keep for later publishing
...
@@ -101,5 +102,6 @@ deque_offset locking_deque<Task>::save_offset() {
...
@@ -101,5 +102,6 @@ deque_offset locking_deque<Task>::save_offset() {
}
}
}
}
}
}
}
#endif //PLS_LOCKING_DEQUE_IMPL_H_
#endif //PLS_LOCKING_DEQUE_IMPL_H_
lib/pls/include/pls/internal/data_structures/stamped_integer.h
→
lib/pls/include/pls/internal/
scheduling/
data_structures/stamped_integer.h
View file @
f3e7df77
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
namespace
pls
{
namespace
pls
{
namespace
internal
{
namespace
internal
{
namespace
scheduling
{
namespace
data_structures
{
namespace
data_structures
{
constexpr
unsigned
long
HALF_CACHE_LINE
=
base
::
system_details
::
CACHE_LINE_SIZE
/
2
;
constexpr
unsigned
long
HALF_CACHE_LINE
=
base
::
system_details
::
CACHE_LINE_SIZE
/
2
;
...
@@ -23,5 +24,6 @@ struct stamped_integer {
...
@@ -23,5 +24,6 @@ struct stamped_integer {
}
}
}
}
}
}
}
#endif //PREDICTABLE_PARALLEL_PATTERNS_LIB_PLS_INCLUDE_PLS_INTERNAL_DATA_STRUCTURES_STAMPED_INTEGER_H_
#endif //PREDICTABLE_PARALLEL_PATTERNS_LIB_PLS_INCLUDE_PLS_INTERNAL_DATA_STRUCTURES_STAMPED_INTEGER_H_
lib/pls/include/pls/internal/data_structures/work_stealing_deque.h
→
lib/pls/include/pls/internal/
scheduling/
data_structures/work_stealing_deque.h
View file @
f3e7df77
...
@@ -5,12 +5,13 @@
...
@@ -5,12 +5,13 @@
#include <atomic>
#include <atomic>
#include "pls/internal/base/error_handling.h"
#include "pls/internal/base/error_handling.h"
#include "
pls/internal/data_structures/
stamped_integer.h"
#include "stamped_integer.h"
#include "aligned_stack.h"
#include "aligned_stack.h"
namespace
pls
{
namespace
pls
{
namespace
internal
{
namespace
internal
{
namespace
scheduling
{
namespace
data_structures
{
namespace
data_structures
{
using
base
::
system_details
::
pointer_t
;
using
base
::
system_details
::
pointer_t
;
...
@@ -62,7 +63,7 @@ class work_stealing_deque {
...
@@ -62,7 +63,7 @@ class work_stealing_deque {
std
::
atomic
<
deque_offset
>
tail_
;
std
::
atomic
<
deque_offset
>
tail_
;
deque_offset
previous_tail_
;
deque_offset
previous_tail_
;
Task
*
last_pushed_task_
;
Task
*
last_pushed_task_
;
public
:
public
:
explicit
work_stealing_deque
(
aligned_stack
*
stack
)
:
stack_
{
stack
},
explicit
work_stealing_deque
(
aligned_stack
*
stack
)
:
stack_
{
stack
},
...
@@ -92,6 +93,7 @@ class work_stealing_deque {
...
@@ -92,6 +93,7 @@ class work_stealing_deque {
}
}
}
}
}
}
}
#include "work_stealing_deque_impl.h"
#include "work_stealing_deque_impl.h"
#endif //PLS_WORK_STEALING_DEQUE_H_
#endif //PLS_WORK_STEALING_DEQUE_H_
lib/pls/include/pls/internal/data_structures/work_stealing_deque_impl.h
→
lib/pls/include/pls/internal/
scheduling/
data_structures/work_stealing_deque_impl.h
View file @
f3e7df77
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
namespace
pls
{
namespace
pls
{
namespace
internal
{
namespace
internal
{
namespace
scheduling
{
namespace
data_structures
{
namespace
data_structures
{
template
<
typename
Task
>
template
<
typename
Task
>
...
@@ -158,5 +159,6 @@ deque_offset work_stealing_deque<Task>::save_offset() {
...
@@ -158,5 +159,6 @@ deque_offset work_stealing_deque<Task>::save_offset() {
}
}
}
}
}
}
}
#endif //PLS_WORK_STEALING_DEQUE_IMPL_H_
#endif //PLS_WORK_STEALING_DEQUE_IMPL_H_
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