Module Spoc_core.Vector_transfer

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

Raw host pointers

val host_ptr : 'a 'b. ('a, 'b) Vector_types.t -> nativeint
val bigarray_to_ptr : ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t -> int -> unit Ctypes.ptr * int

Convert bigarray to raw pointer and byte size

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