Spoc_core.Host_ptr_buffertype error = | Refused of {device : string;reason : Spoc_framework.Framework_sig.host_ptr_refusal;}The backend refused (device type, alignment, size, backend).
*)| Unknown_framework of {}| Not_bigarray_backed of {}Custom-type or device-only vector: no Bigarray to share.
*)| Buffer_exists of {}The vector already has a buffer on the device; sharing would leave two device copies. Free it first (Transfer.free_buffer).
Why a vector could not be given a host-pointer buffer.
val refusal_message : Spoc_framework.Framework_sig.host_ptr_refusal -> stringval error_message : error -> stringval install :
('a, 'b) Vector.t ->
Device.t ->
('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t ->
('a, 'b) Vector.scalar_kind ->
(unit, error) Stdlib.resultattach vec dev gives vec a buffer on dev created over its Bigarray's memory. See the module header for the lifetime, alignment and synchronisation contract.
val of_bigarray :
Device.t ->
('a, 'b) Vector.scalar_kind ->
('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t ->
(('a, 'b) Vector.t, error) Stdlib.resultA vector over ba (no copy), attached to dev.
val host_link : ('a, 'b) Vector.t -> Device.t -> Memory.host_link optionHow vec's buffer on dev relates to its host storage; None when it has no buffer there.
Declares the Bigarray authoritative and makes its contents visible to launches on dev enqueued afterwards (map/unmap for a host-pointer buffer, a copy for any other). Any device-side change not yet read back is discarded.