mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
dtype is copy assignable (#1436)
This commit is contained in:
@@ -370,7 +370,7 @@ void compile_simplify(
|
||||
auto get_scalar_rep = [](const array& a) {
|
||||
uint64_t v = 0;
|
||||
int dtype;
|
||||
switch (a.dtype().size) {
|
||||
switch (a.dtype().size()) {
|
||||
case 1:
|
||||
v = *a.data<uint8_t>();
|
||||
break;
|
||||
@@ -384,7 +384,7 @@ void compile_simplify(
|
||||
v = *a.data<uint64_t>();
|
||||
break;
|
||||
}
|
||||
return std::make_pair(v, a.dtype().val);
|
||||
return std::make_pair(v, a.dtype().val());
|
||||
};
|
||||
|
||||
for (auto& a : tape) {
|
||||
|
||||
Reference in New Issue
Block a user