Module Kernel

module Kernel: sig .. end
Manages Kernels

type kernel 
Manages Kernels
val relax_vector : ('a, 'b) Spoc.Vector.vector -> ('c, 'd) Spoc.Vector.vector
type ('a, 'b) kernelArgs = 
| VChar of ('a, 'b) Spoc.Vector.vector (*unsigned char vector*)
| VFloat32 of ('a, 'b) Spoc.Vector.vector (*32-bit float vector*)
| VFloat64 of ('a, 'b) Spoc.Vector.vector (*64-bit float vector*)
| VComplex32 of ('a, 'b) Spoc.Vector.vector (*32-bit complex vector*)
| VInt32 of ('a, 'b) Spoc.Vector.vector (*32-bit int vector*)
| VInt64 of ('a, 'b) Spoc.Vector.vector (*64-bit int vector*)
| Int32 of int (*32-bit int*)
| Int64 of int (*64-bit int*)
| Float32 of float (*32-bit float*)
| Float64 of float (*64-bit float*)
| Vector of ('a, 'b) Spoc.Vector.vector (*generic vector type*)
| VCustom of ('a, 'b) Spoc.Vector.vector (*custom data type vector, see examples*)
type of parameters usable with kernels
type block = {
   mutable blockX : int;
   mutable blockY : int;
   mutable blockZ : int;
}
A block is a 3 dimension group of threads
type grid = {
   mutable gridX : int;
   mutable gridY : int;
   mutable gridZ : int;
}
A grid is a 3 dimension group of blocks
exception ERROR_BLOCK_SIZE
exception ERROR_GRID_SIZE
module Cuda: sig .. end
module OpenCL: sig .. end
exception No_source_for_device of Spoc.Devices.device
exception Not_compiled_for_device of Spoc.Devices.device
class virtual [['a, 'b]] spoc_kernel : string -> string -> object .. end
a Kernel is represented within Spoc a an OCaml object inheriting the spoc_kernel class
val run : Spoc.Devices.device ->
block * grid -> ('a, 'b) spoc_kernel -> 'a -> unit
Deprecated.you should use kernel#run
val compile : Spoc.Devices.device -> ('a, 'b) spoc_kernel -> unit
Deprecated.you should use kernel#compile
val set_arg : ('a, 'b) kernelArgs array ->
int -> ('a, 'b) Spoc.Vector.vector -> unit