Module Cuda_api.Kernel

type t = {
  1. module_ : Cuda_types.cu_module Ctypes.structure Ctypes.ptr;
  2. function_ : Cuda_types.cu_function Ctypes.structure Ctypes.ptr;
  3. name : string;
}
type arg =
  1. | ArgBuffer : _ Memory.buffer -> arg
  2. | ArgInt32 : int32 -> arg
  3. | ArgInt64 : int64 -> arg
  4. | ArgFloat32 : float -> arg
  5. | ArgFloat64 : float -> arg
  6. | ArgPtr : nativeint -> arg
val cache : (string, t) Stdlib.Hashtbl.t
val compile : Device.t -> name:string -> source:string -> t
val compile_cached : Device.t -> name:string -> source:string -> t
val clear_cache : unit -> unit
type ctype_ref =
  1. | CTypeRef : 'a Ctypes.typ * 'a Ctypes.ptr -> ctype_ref

Existential wrapper for keeping Ctypes-allocated values alive during FFI calls

val launch : t -> args:arg list -> grid:(int * int * int) -> block:(int * int * int) -> shared_mem:int -> stream:Stream.t option -> unit