Commit f3e7df77 by FritzFlorian

Move scheduling related data structures in correct package.

parent 2801278f
Pipeline #1306 failed with stages
in 24 seconds
...@@ -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
......
...@@ -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
...@@ -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
...@@ -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_
...@@ -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
...@@ -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_
...@@ -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_
...@@ -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_
...@@ -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_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment