module Mem:sig
..end
val auto_transfers : bool -> unit
auto_transfers true
will make transfers automatic
auto_transfers false
will stop Spoc to make automatic transfers
default is : auto_transfers true
val unsafe_rw : bool -> unit
val to_device : ('a, 'b) Spoc.Vector.vector -> ?queue_id:int -> Spoc.Devices.device -> unit
to_device v d
will transfer the vector v to the device d
queue_id
: allows to specify which command queue to use for the transfer
transfers are asynchronous, to_device
will return immediately,
use Devices.flush
to wait for the end of the command queue
val to_cpu : ('a, 'b) Spoc.Vector.vector -> ?queue_id:int -> unit -> unit
to_cpu v
will transfer the vector v from its current location to the cpu
queue_id
: allows to specify which command queue to use for the transfer
transfers are asynchronous, to_cpu
will return immediately,
use Devices.flush
to wait for the end of the command queue
val set : ('a, 'b) Spoc.Vector.vector -> int -> 'a -> unit
val get : ('a, 'b) Spoc.Vector.vector -> int -> 'a
val sub_vector : ('a, 'b) Spoc.Vector.vector ->
int -> ?ok_rng:int -> ?ko_rng:int -> int -> ('a, 'b) Spoc.Vector.vector
sub_vector vec start len
will return a new vector of length len
sharing the
same cpu memory space with a
starting from index start
.val sub_vector : ('a, 'b) Spoc.Vector.vector ->
int -> ?ok_rng:int -> ?ko_rng:int -> int -> ('a, 'b) Spoc.Vector.vector
val vector_copy : ('a, 'b) Spoc.Vector.vector ->
int -> ('a, 'b) Spoc.Vector.vector -> int -> int -> unit