Module Hip_api.Kernel

type t = {
  1. module_ : Hip_types.hip_module Ctypes.structure Ctypes.ptr;
  2. function_ : Hip_types.hip_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) Spoc_framework.Guarded_cache.t
val load_module_from_code_object : name:string -> string -> t
val compile : Device.t -> name:string -> source:string -> t
val compile_with_options : Device.t -> name:string -> source:string -> options:string list -> t
val with_cache : Device.t -> name:string -> source:string -> (unit -> t) -> 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
val launch : t -> args:arg list -> grid:(int * int * int) -> block:(int * int * int) -> shared_mem:int -> stream:Stream.t option -> unit