Commit 679e2977 authored by Stanislav Bohm's avatar Stanislav Bohm

FIX: Fixed sign comparison problem

parent 38f193fc
...@@ -244,9 +244,9 @@ bool ComputationState::is_ready(const PlanNode &node) ...@@ -244,9 +244,9 @@ bool ComputationState::is_ready(const PlanNode &node)
return true; return true;
} }
size_t ComputationState::get_max_cpus() int ComputationState::get_max_cpus()
{ {
size_t max_cpus = 0; int max_cpus = 0;
for (auto &pair : workers) { for (auto &pair : workers) {
if (max_cpus < pair.first->get_resource_cpus()) { if (max_cpus < pair.first->get_resource_cpus()) {
max_cpus = pair.first->get_resource_cpus(); max_cpus = pair.first->get_resource_cpus();
...@@ -269,7 +269,7 @@ TaskDistribution ComputationState::compute_distribution() ...@@ -269,7 +269,7 @@ TaskDistribution ComputationState::compute_distribution()
return result; return result;
} }
size_t max_cpus = get_max_cpus(); int max_cpus = get_max_cpus();
if (max_cpus == 0) { if (max_cpus == 0) {
max_cpus = 1; max_cpus = 1;
} }
......
...@@ -80,7 +80,7 @@ private: ...@@ -80,7 +80,7 @@ private:
std::unordered_set<loom::Id> &nonlocals); std::unordered_set<loom::Id> &nonlocals);
size_t task_transfer_cost(const PlanNode &node); size_t task_transfer_cost(const PlanNode &node);
void add_pending_task(loom::Id id); void add_pending_task(loom::Id id);
size_t get_max_cpus(); int get_max_cpus();
}; };
......
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 to comment