Module Framework_sig.Async_refused

The refusing implementation of ASYNC, for backends that do not provide it. Every operation raises Feature_not_supported naming the backend and the operation.

Parameters

module X : sig ... end

Signature

type device = X.device
type stream = X.stream
type event = X.event
type 'a buffer = 'a X.buffer
val support : async_support
val host_to_device : src_ptr:nativeint -> dst:'a buffer -> dst_offset:int -> byte_size:int -> stream:stream option -> unit
val device_to_host : src:'a buffer -> src_offset:int -> dst_ptr:nativeint -> byte_size:int -> stream:stream option -> unit
val stream_wait_event : stream -> event -> unit

All work enqueued on the stream after this call waits until the work recorded by the event has completed.

val event_query : event -> bool

true once the work recorded by the event has completed (or the event was never recorded); never blocks.

val alloc_pinned : device -> byte_size:int -> nativeint

Page-locked host memory of byte_size bytes, returned as a raw address. Released by free_pinned. A backend whose pinned memory belongs to the device (Vulkan: a driver mapping) unmaps it when the device is destroyed; the address is then invalid and only free_pinned may still be called on it.

val free_pinned : device -> nativeint -> unit
val register_host : device -> nativeint -> byte_size:int -> unit

Page-lock existing host memory for DMA. The caller keeps it alive until unregister_host.

val unregister_host : device -> nativeint -> unit