GPU mx.sign for complex64 (#1326)

This commit is contained in:
Alex Barron
2024-08-14 07:54:53 -07:00
committed by GitHub
parent 63ae767232
commit 99bb7d3a58
4 changed files with 22 additions and 0 deletions

View File

@@ -373,6 +373,10 @@ struct Sign {
uint64_t operator()(uint64_t x) {
return x != 0;
}
complex64_t operator()(complex64_t x) {
return x == complex64_t(0) ? x : x / std::abs(x);
}
};
struct Sin {