package spoc

  1. Overview
  2. Docs

a Kernel is represented within Spoc a an OCaml object inheriting the spoc_kernel class

val binaries : (Spoc.Devices.device, kernel) Hashtbl.t

hashtable containing the compiled binaries of the kernel (one for each device it has been compiled for

val mutable cuda_sources : string list

the cuda source code of the kernel

val mutable opencl_sources : string list

the opencl source code of the kernel

method get_binaries : unit -> (Spoc.Devices.device, kernel) Hashtbl.t

clean binary cache

method reset_binaries : unit -> unit

compiles a kernel for a device

method compile : ?debug:bool -> Spoc.Devices.device -> unit
method compile_and_run : 'a -> (block * grid) -> ?debug:bool -> int -> Spoc.Devices.device -> unit

compiles and run a device for a kernel

method virtual exec : 'a -> (block * grid) -> int -> Spoc.Devices.device -> kernel -> unit
method set_source_path : string -> unit
method reload_sources : unit -> unit

reloads the sources form the file associated with the kernel

method run : 'a -> (block * grid) -> int -> Spoc.Devices.device -> unit

runs the kernel on a device