sig
type device_vec
type customarray
type 'a custom = {
elt : 'a;
size : int;
get : Vector.customarray -> int -> 'a;
set : Vector.customarray -> int -> 'a -> unit;
}
type ('a, 'b) couple = 'a * 'b
type ('a, 'b) kind =
Float32 of ('a, 'b) Bigarray.kind
| Char 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 Vector.custom
| Unit of ('a, 'b) Vector.couple
| Dummy of ('a, 'b) Vector.couple
val int : (int, Bigarray.int_elt) Vector.kind
val int32 : (int32, Bigarray.int32_elt) Vector.kind
val char : (char, Bigarray.int8_unsigned_elt) Vector.kind
val int64 : (int64, Bigarray.int64_elt) Vector.kind
val float32 : (float, Bigarray.float32_elt) Vector.kind
val float64 : (float, Bigarray.float64_elt) Vector.kind
val complex32 : (Complex.t, Bigarray.complex32_elt) Vector.kind
type ('a, 'b) spoc_vec =
Bigarray of ('a, 'b, Bigarray.c_layout) Bigarray.Array1.t
| CustomArray of (Vector.customarray * 'a Vector.custom)
external float32_of_float : float -> float = "float32_of_float"
external float_of_float32 : float -> float = "float_of_float32"
type vec_device =
No_dev
| Dev of Spoc.Devices.device
| Transferring of Spoc.Devices.device
type ('a, 'b) vector
and ('a, 'b) sub = int * int * int * int * ('a, 'b) Vector.vector
external init_cuda_device_vec : unit -> Vector.device_vec
= "spoc_init_cuda_device_vec"
external init_opencl_device_vec : unit -> Vector.device_vec
= "spoc_init_opencl_device_vec"
external create_custom : 'a Vector.custom -> int -> Vector.customarray
= "spoc_create_custom"
val vec_id : int Pervasives.ref
val create :
('a, 'b) Vector.kind ->
?dev:Spoc.Devices.device -> int -> ('a, 'b) Vector.vector
val length : ('a, 'b) Vector.vector -> int
val dev : ('a, 'b) Vector.vector -> Vector.vec_device
val is_sub : ('a, 'b) Vector.vector -> ('a, 'b) Vector.sub option
val kind : ('a, 'b) Vector.vector -> ('a, 'b) Vector.kind
val device : ('a, 'b) Vector.vector -> int
val get_vec_id : ('a, 'b) Vector.vector -> int
val vector : ('a, 'b) Vector.vector -> ('a, 'b) Vector.spoc_vec
val equals : ('a, 'b) Vector.vector -> ('a, 'b) Vector.vector -> bool
val vseek : ('a, 'b) Vector.vector -> int -> unit
val get_seek : ('a, 'b) Vector.vector -> int
val unsafe_get : ('a, 'b) Vector.vector -> int -> 'a
val unsafe_set : ('a, 'b) Vector.vector -> int -> 'a -> unit
val update_device_array :
('a, 'b) Vector.vector -> ('a, 'b) Vector.vector -> unit
val set_device : ('a, 'b) Vector.vector -> int -> Vector.vec_device -> unit
val temp_vector : ('a, 'b) Vector.vector -> ('a, 'b) Vector.vector
val sub_vector :
('a, 'b) Vector.vector ->
int -> int -> int -> int -> ('a, 'b) Vector.vector
val device_vec :
('a, 'b) Vector.vector ->
[< `Cuda | `OpenCL ] -> int -> Vector.device_vec
val copy_sub : ('a, 'b) Vector.vector -> ('a, 'b) Vector.vector -> unit
val of_bigarray_shr :
('a, 'b) Vector.kind ->
('a, 'b, Bigarray.c_layout) Bigarray.Array1.t -> ('a, 'b) Vector.vector
val to_bigarray_shr :
('a, 'b) Vector.vector -> ('a, 'b, Bigarray.c_layout) Bigarray.Array1.t
end