Spoc_core.Vector_storageval create_scalar :
('a, 'b) Vector_types.scalar_kind ->
?dev:Device.t ->
int ->
('a, 'b) Vector_types.tCreate a new scalar vector on CPU
val create :
'a 'b. ('a, 'b) Vector_types.kind ->
?dev:Device.t ->
int ->
('a, 'b) Vector_types.tCreate from kind (allocates storage for custom types too)
val create_custom :
'a Vector_types.custom_type ->
?dev:Device.t ->
int ->
('a, unit) Vector_types.tCreate a custom vector with explicit type descriptor
val of_bigarray :
('a, 'b) Vector_types.scalar_kind ->
('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t ->
('a, 'b) Vector_types.tCreate from existing Bigarray (shares memory)
val of_ctypes_ptr :
'a Vector_types.custom_type ->
unit Ctypes.ptr ->
int ->
('a, unit) Vector_types.tCreate from existing ctypes pointer (shares memory)
val to_bigarray :
'a 'b. ('a, 'b) Vector_types.t ->
('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.tval of_list :
'a 'b. ('a, 'b) Vector_types.kind ->
'a list ->
('a, 'b) Vector_types.tCreate from OCaml list
val of_array :
'a 'b. ('a, 'b) Vector_types.kind ->
'a array ->
('a, 'b) Vector_types.tCreate from OCaml array
val has_buffer : ('a, 'b) Vector_types.t -> Device.t -> boolCheck if vector has buffer on specific device
val get_buffer :
('a, 'b) Vector_types.t ->
Device.t ->
Vector_types.device_buffer optionGet device buffer if allocated
val subvector_meta : (int, sub_meta) Stdlib.Hashtbl.tval is_sub : ('a, 'b) Vector_types.t -> boolval get_sub_meta : ('a, 'b) Vector_types.t -> sub_meta optionval depth : ('a, 'b) Vector_types.t -> intval parent_id : ('a, 'b) Vector_types.t -> int optionval sub_start : ('a, 'b) Vector_types.t -> int optionval sub_ok_range : ('a, 'b) Vector_types.t -> int optionval sub_ko_range : ('a, 'b) Vector_types.t -> int optionval copy_host_only : ('a, 'b) Vector_types.t -> ('a, 'b) Vector_types.tCopy vector (CPU data only). Caller must ensure sync if needed.
val sub_vector_host :
('a, 'b) Vector_types.t ->
start:int ->
len:int ->
('a, 'b) Vector_types.tCreate subvector that views the same host storage with an offset
val sub_vector :
('a, 'b) Vector_types.t ->
start:int ->
len:int ->
ok_range:int ->
ko_range:int ->
('a, 'b) Vector_types.tCreate subvector and record metadata
val partition_host :
('a, 'b) Vector_types.t ->
Device.t array ->
('a, 'b) Vector_types.t arrayPartition host storage evenly across devices (no device buffers)