fix typo in arguments of PartitionBuilder::Init (#7113)
Co-authored-by: Yuntian Zhang <zhangyt@lamda.nju.edu.cn>
This commit is contained in:
parent
bd1f3a38f0
commit
d7c14496d2
@ -28,13 +28,13 @@ template<size_t BlockSize>
|
|||||||
class PartitionBuilder {
|
class PartitionBuilder {
|
||||||
public:
|
public:
|
||||||
template<typename Func>
|
template<typename Func>
|
||||||
void Init(const size_t n_tasks, size_t n_nodes, Func funcNTaks) {
|
void Init(const size_t n_tasks, size_t n_nodes, Func funcNTask) {
|
||||||
left_right_nodes_sizes_.resize(n_nodes);
|
left_right_nodes_sizes_.resize(n_nodes);
|
||||||
blocks_offsets_.resize(n_nodes+1);
|
blocks_offsets_.resize(n_nodes+1);
|
||||||
|
|
||||||
blocks_offsets_[0] = 0;
|
blocks_offsets_[0] = 0;
|
||||||
for (size_t i = 1; i < n_nodes+1; ++i) {
|
for (size_t i = 1; i < n_nodes+1; ++i) {
|
||||||
blocks_offsets_[i] = blocks_offsets_[i-1] + funcNTaks(i-1);
|
blocks_offsets_[i] = blocks_offsets_[i-1] + funcNTask(i-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (n_tasks > max_n_tasks_) {
|
if (n_tasks > max_n_tasks_) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user