package nx

  1. Overview
  2. Docs

Module Bigarray_ext.Array0Source

include module type of struct include Bigarray.Array0 end
Sourcetype (!'a, !'b, !'c) t = ('a, 'b, 'c) Bigarray.Array0.t

The type of zero-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

Sourceval kind : ('a, 'b, 'c) t -> ('a, 'b) Bigarray.kind

Return the kind of the given Bigarray.

Sourceval layout : ('a, 'b, 'c) t -> 'c Bigarray.layout

Return the layout of the given Bigarray.

Sourceval change_layout : ('a, 'b, 'c) t -> 'd Bigarray.layout -> ('a, 'b, 'd) t

Array0.change_layout a layout returns a Bigarray with the specified layout, sharing the data with a. No copying of elements is involved: the new array and the original array share the same storage space.

  • since 4.06
Sourceval size_in_bytes : ('a, 'b, 'c) t -> int

size_in_bytes a is a's kind_size_in_bytes.

Sourceval blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

Copy the first Bigarray to the second Bigarray. See Genarray.blit for more details.

Sourceval fill : ('a, 'b, 'c) t -> 'a -> unit

Fill the given Bigarray with the given value. See Genarray.fill for more details.

Sourceval create : 'a 'b 'c. ('a, 'b) kind -> 'c layout -> ('a, 'b, 'c) t
Sourceval get : ('a, 'b, 'c) Bigarray.Array0.t -> 'a
Sourceval set : ('a, 'b, 'c) Bigarray.Array0.t -> 'a -> unit
Sourceval init : ('a, 'b) kind -> 'c layout -> (unit -> 'a) -> ('a, 'b, 'c) t
Sourceval of_value : ('a, 'b) kind -> 'c layout -> (unit -> 'a) -> ('a, 'b, 'c) t