package gg

  1. Overview
  2. Docs

Module Ba.BufferSource

Sourcetype t = buffer

The type for bigarray buffers.

Sourceval create : scalar_type -> int -> buffer

create st count is a buffer of scalar type st with count scalars.

Sourceval scalar_type : buffer -> scalar_type

buffer_scalar_type b is b's buffer scalar type.

Sourceval length : buffer -> int

buffer_length b is b's buffer scalar length.

Sourceval byte_length : buffer -> int

buffer_byte_length b is b's buffer byte length.

Sourceval of_bigarray : ?data:[ `Unsigned | `Float ] -> ('a, 'b) bigarray -> buffer

of_bigarray ba is a buffer for the bigarray ba. data can be used to add information whenever the bigarray kind is:

Raises Invalid_argument if the bigarray kind does not correspond to a Ba.scalar_type or if data is irrelevant.

Sourceval pp : Format.formatter -> buffer -> unit

pp b prints a textual representation of b on ppf. Does not print the buffer's data.