sig
  type device_vec
  type customarray
  type 'a custom = {
    elt : 'a;
    size : int;
    get : Vector.customarray -> int -> 'a;
    set : Vector.customarray -> int -> '-> 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 'Vector.custom
  val int32 : (int32, Bigarray.int32_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 * '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 Devices.device
  type ('a, 'b) vector = {
    mutable device : int;
    vector : ('a, 'b) Vector.spoc_vec;
    cuda_device_vec : Vector.device_vec array;
    opencl_device_vec : Vector.device_vec array;
    length : int;
    mutable dev : Vector.vec_device;
    kind : ('a, 'b) Vector.kind;
  }
  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 : 'Vector.custom -> int -> Vector.customarray
    = "spoc_create_custom"
  val create : ('a, 'b) Vector.kind -> int -> ('a, 'b) Vector.vector
  val length : ('a, 'b) Vector.vector -> int
  type vfloat32 = (float, Bigarray.float32_elt) Vector.vector
  type localvfloat32 = (float, Bigarray.float32_elt) Vector.vector
  type vfloat64 = (float, Bigarray.float64_elt) Vector.vector
  type vint32 = (int32, Bigarray.int32_elt) Vector.vector
  type vint64 = (int64, Bigarray.int64_elt) Vector.vector
  type vcomplex32 = (Complex.t, Bigarray.complex32_elt) Vector.vector
  type 'a vcustom = ('a, 'a) Vector.vector
end