Module Ba.Buffer
type t= bufferThe type for bigarray buffers.
val create : scalar_type -> int -> buffercreate st countis a buffer of scalar typestwithcountscalars.
val scalar_type : buffer -> scalar_typebuffer_scalar_type bisb's buffer scalar type.
val length : buffer -> intbuffer_length bisb's buffer scalar length.
val byte_length : buffer -> intbuffer_byte_length bisb's buffer byte length.
val of_bigarray : ?data:[ `Unsigned | `Float ] -> ('a, 'b) bigarray -> bufferof_bigarray bais a buffer for the bigarrayba.datacan be used to add information whenever the bigarray kind is:Bigarray.int16_unsigned, if`Floatis specified the scalar type will be`Float16.Bigarray.int32orBigarray.int64, if`Unsignedis specified the scalar type will be, respectively`UInt32and`UInt64.
- raises Invalid_argument
if the bigarray kind does not correspond to a
Ba.scalar_typeor ifdatais irrelevant.
val pp : Stdlib.Format.formatter -> buffer -> unitpp bprints a textual representation ofbonppf. Does not print the buffer's data.