Module Vector


module Vector: sig .. end

type device_vec 
type customarray 

type 'a custom = {
   elt : 'a;
   size : int;
   get : customarray -> int -> 'a;
   set : customarray -> int -> 'a -> unit;
}
type ('a, 'b) kind =
| Float32 of ('a, 'b) Bigarray.kind
| Float64 of ('a, 'b) Bigarray.kind
| Int32 of ('a, 'b) Bigarray.kind
| Int64 of ('a, 'b) Bigarray.kind
| Complex32 of ('a, 'b) Bigarray.kind
| Custom of 'a custom
val int32 : (int32, Bigarray.int32_elt) kind
val int64 : (int64, Bigarray.int64_elt) kind
val float32 : (float, Bigarray.float32_elt) kind
val float64 : (float, Bigarray.float64_elt) kind
val complex32 : (Complex.t, Bigarray.complex32_elt) kind

type ('a, 'b) spoc_vec =
| Bigarray of ('a, 'b, Bigarray.c_layout) Bigarray.Array1.t
| CustomArray of (customarray * 'a custom)
val float32_of_float : float -> float
val float_of_float32 : float -> float

type vec_device =
| No_dev
| Dev of Devices.device

type ('a, 'b) vector = {
   mutable device : int;
   vector : ('a, 'b) spoc_vec;
   cuda_device_vec : device_vec array;
   opencl_device_vec : device_vec array;
   length : int;
   mutable dev : vec_device;
   kind : ('a, 'b) kind;
}
val init_cuda_device_vec : unit -> device_vec
val init_opencl_device_vec : unit -> device_vec
val create_custom : 'a custom -> int -> customarray
val create : ('a, 'b) kind -> int -> ('a, 'b) vector
val length : ('a, 'b) vector -> int
type vfloat32 = (float, Bigarray.float32_elt) vector 
type localvfloat32 = (float, Bigarray.float32_elt) vector 
type vfloat64 = (float, Bigarray.float64_elt) vector 
type vint32 = (int32, Bigarray.int32_elt) vector 
type vint64 = (int64, Bigarray.int64_elt) vector 
type vcomplex32 = (Complex.t, Bigarray.complex32_elt) vector 
type 'a vcustom = ('a, 'a) vector