ocaml-mm
ocaml-mm copied to clipboard
Start using floatarray internally.
floatarray
are defined in Float.Array
since OCaml 4.08
. They are guaranteed to be always be unboxed flat arrays. If the compiler supports it (see: https://github.com/ocaml/ocaml/pull/12019), floatarray
can be cast to double *
arrays and passed to a C function.
Currently, they share the same underlying representation as float array
so switching to the shouldn't impact performances. However, this could change (or can be by disabling flat float arrays in the compiler) so this will make the implementation more robust to future changes in the compiler.