Module Spoc_core.Vector_transfer

val to_ctypes_ptr : 'a 'b. ('a, 'b) Vector_types.t -> unit Ctypes.ptr

Raw host pointers. They need not root the host storage: the caller keeps vec reachable while the pointer or address is in use (vec.host is immutable, so a reachable vector roots its bigarray).

val host_ptr : 'a 'b. ('a, 'b) Vector_types.t -> nativeint
type sync_callback = {
  1. sync : 'a 'b. ('a, 'b) Vector_types.t -> bool;
}

Auto-sync callback registration

val sync_to_cpu_callback : sync_callback option Stdlib.ref
val register_sync_callback : sync_callback -> unit
val ensure_cpu_sync : ('a, 'b) Vector_types.t -> unit