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 by FritzFlorian

Change some size types.

parent b7f42e2b
Pipeline #1150 passed with stages
in 3 minutes 31 seconds
......@@ -18,7 +18,7 @@ namespace pls {
*/
class spin_lock {
std::atomic_flag flag_;
int yield_at_tries_;
unsigned int yield_at_tries_;
public:
......
......@@ -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;
......
......@@ -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;
......
......@@ -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_;
......
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