Sarek_tuple_vecL13 — host-side custom_type builders for tuple-typed vector elements.
Build the Spoc_core.Vector.custom_type needed by Vector.create_custom for a ('a * 'b) vector (or 3-tuple), so tuples can be stored/read from the host with OCaml tuple literals while the kernel manipulates them on device. The byte layout is taken from the shared layout authority so it matches the device element layout exactly. Only scalar-primitive components are supported in this tier.
module Vector = Spoc_core.Vectorval float32 : float componentval float64 : float componentval int32 : int32 componentval int64 : int64 componentval pair : 'a component -> 'b component -> ('a * 'b) Vector.custom_typepair a b builds the custom type for a (a, b) tuple vector element.
val triple :
'a component ->
'b component ->
'c component ->
('a * 'b * 'c) Vector.custom_typetriple a b c builds the custom type for an (a, b, c) tuple vector element.
val descriptor_by_name : string -> 'a Vector.custom_typedescriptor_by_name name returns the canonical custom_type registered for a mangled tuple-shape name (e.g. "_tup_float32_int32") by a previous pair/triple call. Generated Native kernel code uses this to obtain the same Type_id the host vector carries. Raises if the shape was never built on the host. Not normally called directly.
Byte layout of one positional field (_0, _1, ...) of a tuple element.
The byte layout of a tuple-shape element: total size and per-field layout, taken from the shared layout authority so it matches the raw element bytes the host composite bridge marshals.
val lookup_shape : string -> shape optionlookup_shape name returns the registered byte layout of the tuple shape name (e.g. "_tup_float32_int32"), or None if no pair/triple has instantiated it yet. Used by the Interpreter to decode/encode tuple vector elements without depending on the interpreter's value model.