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 |
| |
VFloat32 of ('a, 'b) Spoc.Vector.vector |
| |
VFloat64 of ('a, 'b) Spoc.Vector.vector |
| |
VComplex32 of ('a, 'b) Spoc.Vector.vector |
| |
VInt32 of ('a, 'b) Spoc.Vector.vector |
| |
VInt64 of ('a, 'b) Spoc.Vector.vector |
| |
Int32 of int |
| |
Int64 of int |
| |
Float32 of float |
| |
Float64 of float |
| |
Vector of ('a, 'b) Spoc.Vector.vector |
| |
VCustom of ('a, 'b) Spoc.Vector.vector |
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