mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Allow querying the allocator for the buffer size (#1404)
This commit is contained in:
committed by
GitHub
parent
8b30acd7eb
commit
881f09b2e2
@@ -41,7 +41,7 @@ void set_ternary_op_output_data(
|
||||
TernaryOpType topt,
|
||||
bool donate_with_move = false) {
|
||||
auto maybe_donate = [&out, donate_with_move](const array& x) {
|
||||
if (x.is_donatable() && x.itemsize() == out.itemsize()) {
|
||||
if (is_donatable(x, out)) {
|
||||
if (donate_with_move) {
|
||||
out.move_shared_buffer(x);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user