mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-02 00:34:14 +08:00
Reduce number of allocations in TensorContractionThreadPool.
This commit is contained in:
parent
7ccb623746
commit
6e654f3379
@ -598,11 +598,13 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
|
||||
else
|
||||
pack_lhs(start, k);
|
||||
} else {
|
||||
Index mid = (start + end) / 2;
|
||||
device_.enqueueNoNotification(
|
||||
[=]() { enqueue_packing_helper(mid, end, k, rhs); });
|
||||
device_.enqueueNoNotification(
|
||||
[=]() { enqueue_packing_helper(start, mid, k, rhs); });
|
||||
while (end - start > 1) {
|
||||
Index mid = (start + end) / 2;
|
||||
device_.enqueueNoNotification(
|
||||
[=]() { enqueue_packing_helper(mid, end, k, rhs); });
|
||||
end = mid;
|
||||
}
|
||||
enqueue_packing_helper(start, end, k, rhs);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user