Module Float_u.ArraySource

The Array module provides some helpers that wrap common operations on floatarrays 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 the Float_array library and appropriate calls to to_float or of_float. The compiler should erase the extra boxing/unboxing steps either way.

include Array with type t = Float_array.t and type elt := float#
include Array_getters_and_setters with type t := t and type elt := float#
Sourceval get : t @ local -> int -> float# [@@zero_alloc]
Sourceval set : t @ local -> int -> float# -> unit [@@zero_alloc]
Sourceval unsafe_get : t @ local -> int -> float# [@@zero_alloc]
Sourceval unsafe_set : t @ local -> int -> float# -> unit [@@zero_alloc]
Sourceval create : len:int -> float# -> t
Sourceval length : t @ local -> int
Sourceval unsafe_blit : src:t @ local -> src_pos:int -> dst:t @ local -> dst_pos:int -> len:int -> unit
Sourceval compare : t -> t -> int
Sourceval globalize : t @ local -> t
Sourceval copy : t -> t
Sourceval t_of_sexp : Core.Sexp.t -> t @@ portable
Sourceval sexp_of_t : t -> Core.Sexp.t @@ portable
Sourceval custom_sexp_of_t : (float# -> Core.Sexp.t) -> t -> Core.Sexp.t
Sourceval custom_t_of_sexp : (Core.Sexp.t -> float#) -> Core.Sexp.t -> t
Sourceval init : int -> f:(int -> float#) -> t
Sourceval iter : t -> f:(float# -> unit) -> unit
Sourceval iteri : t -> f:(int -> float# -> unit) -> unit

Identity no-op conversions between t and elt array. They are the same type at runtime.

Sourceval to_float_u_array : t -> float# array
Sourceval of_float_u_array : float# array -> t
include Core.Bin_prot.Binable.S with type t := t
include Bin_prot.Binable.S_only_functions with type t := t
include sig ... end
Sourceval bin_size_t : t Bin_prot.Size.sizer
Sourceval bin_write_t : t Bin_prot.Write.writer
Sourceval bin_read_t : t Bin_prot.Read.reader
Sourceval __bin_read_t__ : t Bin_prot.Read.vtag_reader

This function only needs implementation if t exposed to be a polymorphic variant. Despite what the type reads, this does *not* produce a function after reading; instead it takes the constructor tag (int) before reading and reads the rest of the variant t afterwards.

Sourceval bin_shape_t : Bin_prot.Shape.t
Sourcemodule Permissioned : sig ... end