win: add Complex type for MSVC compatibility#92
Conversation
| typedef struct { | ||
| float real; | ||
| float imag; | ||
| } mlx_complex64_t; |
There was a problem hiding this comment.
Why not using _Fcomplex (which is the MSVC counterpart of float _Complex if I am not mistaking)?
| const mlx_array arr) { | ||
| try { | ||
| *res = mlx_array_get_(arr).item<float _Complex>(); | ||
| auto val = mlx_array_get_(arr).item<std::complex<float>>(); |
There was a problem hiding this comment.
would need to use mlx_complex64_t here instead of the two next lines which may break depending on the complex implementation
|
mlx-c is written in C++ so the A possible workaround is to copy the definition of MSVC Edit: Adding a |
|
Sorry for the delay. The changes look good to me. Thanks! |
Related to ml-explore/mlx#3024