package ctypes
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=cae47d815b27dd4c824a007f1145856044542fe2588d23a443ef4eefec360bf1
md5=b1af973ec9cf7867a63714e92df82f2a
doc/ctypes/Ctypes_bigarray/index.html
Module Ctypes_bigarray
Source
Types
The type of bigarray values of particular sizes. A value of type (a, b, l) t
can be used to read and write values of type b
.
Type constructors
val bigarray :
int array ->
('a, 'b) Bigarray_compat.kind ->
'l Bigarray_compat.layout ->
('a, ('a, 'b, 'l) Bigarray_compat.Genarray.t, 'l) t
Create a t
value for the Bigarray.Genarray.t
type.
val bigarray1 :
int ->
('a, 'b) Bigarray_compat.kind ->
'l Bigarray_compat.layout ->
('a, ('a, 'b, 'l) Bigarray_compat.Array1.t, 'l) t
Create a t
value for the Bigarray.Array1.t
type.
val bigarray2 :
int ->
int ->
('a, 'b) Bigarray_compat.kind ->
'l Bigarray_compat.layout ->
('a, ('a, 'b, 'l) Bigarray_compat.Array2.t, 'l) t
Create a t
value for the Bigarray.Array2.t
type.
val bigarray3 :
int ->
int ->
int ->
('a, 'b) Bigarray_compat.kind ->
'l Bigarray_compat.layout ->
('a, ('a, 'b, 'l) Bigarray_compat.Array3.t, 'l) t
Create a t
value for the Bigarray.Array3.t
type.
Create a Ctypes_ptr.Types.ctype
for a Bigarray.kind
.
Type eliminators
Compute the element type of a bigarray type.
val type_expression :
('a, 'b, 'l) t ->
[> `Appl of string list * 'c list | `Ident of string list ] as 'c
Compute a type expression that denotes a bigarray type.
Values
Return the address of a bigarray value. This function is unsafe because it dissociates the raw address of the C array from the OCaml object that manages the lifetime of the array. If the caller does not hold a reference to the OCaml object then the array might be freed, invalidating the address.
view b ptr
creates a bigarray view onto existing memory.
If ptr
references an OCaml object then view
will ensure that that object is not collected before the bigarray returned by view
.