Commit a0233896 authored by Xuan Thang Nguyen's avatar Xuan Thang Nguyen
Browse files

task printing and getting size

parent 4102c395
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -29,5 +29,20 @@ struct TASK
        this->pivotIdx = pivotIdx;
    }

    __cuda_callable__
    int getSize() const
    {
        return end - begin;
    }

    TASK() = default;
};

std::ostream& operator<<(std::ostream & out, const TASK & task)
{
    out << "[ ";
    out << task.partitionBegin << " - " << task.partitionEnd;
    out << " | " << "depth: " << task.depth;
    out << " | " << "pivotIdx: " << task.pivotIdx;
    return out << " ] ";
}
 No newline at end of file