sig
  type kernel
  external relax_vector : ('a, 'b) Vector.vector -> ('c, 'd) Vector.vector
    = "%identity"
  type ('a, 'b) kernelArgs =
      VChar of ('a, 'b) Vector.vector
    | VFloat32 of ('a, 'b) Vector.vector
    | VFloat64 of ('a, 'b) Vector.vector
    | VComplex32 of ('a, 'b) Vector.vector
    | VInt32 of ('a, 'b) Vector.vector
    | VInt64 of ('a, 'b) Vector.vector
    | Int32 of int
    | Int64 of int
    | Float32 of float
    | Float64 of float
    | Vector of ('a, 'b) Vector.vector
    | VCustom of ('a, 'b) Vector.vector
  type block = {
    mutable blockX : int;
    mutable blockY : int;
    mutable blockZ : int;
  }
  type grid = {
    mutable gridX : int;
    mutable gridY : int;
    mutable gridZ : int;
  }
  exception ERROR_BLOCK_SIZE
  exception ERROR_GRID_SIZE
  val exec :
    ('a, 'b) Kernel.kernelArgs array ->
    Kernel.block * Kernel.grid ->
    int -> Devices.device -> Kernel.kernel -> unit
  val compile_and_run :
    Devices.device ->
    Kernel.block * Kernel.grid ->
    ?cached:bool ->
    ?debug:bool ->
    ?queue_id:int ->
    ('a *
     (Kernel.block * Kernel.grid ->
      bool -> bool -> int -> Devices.device -> 'b)) *
    '-> 'b
  exception No_source_for_device of Devices.device
  exception Not_compiled_for_device of Devices.device
  class virtual ['a, 'b] spoc_kernel :
    string ->
    string ->
    object
      val binaries : (Devices.device, Kernel.kernel) Hashtbl.t
      val mutable cuda_sources : string list
      val file_file : string
      val kernel_name : string
      val mutable opencl_sources : string list
      method virtual args_to_list : '-> 'b
      method compile : ?debug:bool -> Devices.device -> unit
      method compile_and_run :
        '->
        Kernel.block * Kernel.grid ->
        ?debug:bool -> int -> Devices.device -> unit
      method virtual exec :
        '->
        Kernel.block * Kernel.grid ->
        int -> Devices.device -> Kernel.kernel -> unit
      method get_cuda_sources : unit -> string list
      method get_opencl_sources : unit -> string list
      method virtual list_to_args : '-> 'a
      method reload_sources : unit -> unit
      method reset_binaries : unit -> unit
      method run :
        '-> Kernel.block * Kernel.grid -> int -> Devices.device -> unit
      method set_cuda_sources : string -> unit
      method set_opencl_sources : string -> unit
    end
  val run :
    Devices.device ->
    Kernel.block * Kernel.grid -> ('a, 'b) Kernel.spoc_kernel -> '-> unit
  val compile : Devices.device -> ('a, 'b) Kernel.spoc_kernel -> unit
  val set_arg :
    ('a, 'b) Kernel.kernelArgs array -> int -> ('a, 'b) Vector.vector -> unit
end