Module Float_u.Polymorphic_array_helpers

The Polymorphic_array_helpers module provides some helpers that wrap common operations on float arrays with appropriate boxing or unboxing to work with float#.

These functions are provided just for convenience. They are equivalent (in semantics and performance) to just using the same functions from Base.Array and appropriate calls to to_float or of_float. The compiler should erase the extra boxing/unboxing steps either way.

The name is unwieldy on purpose. We encourage using Float_u.Array over Float_u.Polymorphic_array_helpers for new code.

val get : float array @ local -> (int -> float) @ local
val set : float array @ local -> (int -> (float -> unit) @ local) @ local
val unsafe_get : float array @ local -> (int -> float) @ local
val unsafe_set : float array @ local -> (int -> (float -> unit) @ local) @ local