package ctypes
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=249c5604c8554659761a7282db4ad200aa8c0fdc408cdb53102bd70feeb51955
md5=064316aaf508a9db203f114bb8401dee
doc/ctypes/Ctypes_bigarray/index.html
Module Ctypes_bigarraySource
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.kind ->
'l Bigarray.layout ->
('a, ('a, 'b, 'l) Bigarray.Genarray.t, 'l) tCreate a t value for the Bigarray.Genarray.t type.
val bigarray1 :
int ->
('a, 'b) Bigarray.kind ->
'l Bigarray.layout ->
('a, ('a, 'b, 'l) Bigarray.Array1.t, 'l) tCreate a t value for the Bigarray.Array1.t type.
val bigarray2 :
int ->
int ->
('a, 'b) Bigarray.kind ->
'l Bigarray.layout ->
('a, ('a, 'b, 'l) Bigarray.Array2.t, 'l) tCreate a t value for the Bigarray.Array2.t type.
val bigarray3 :
int ->
int ->
int ->
('a, 'b) Bigarray.kind ->
'l Bigarray.layout ->
('a, ('a, 'b, 'l) Bigarray.Array3.t, 'l) tCreate 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 'cCompute 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.