arithmetic/records/columnar.lisp
One generated column's name, element representation, and retention policy.
The physical lanes and fixed row meaning generated for a columnar type.
Return the inspectable physical row layout named by name.
Return definition's physical lane-name description, or NIL.
Concrete per-lane declarations retained once by a columnar materialization.
Rows remain raw array elements; this object carries their checked meaning at the aggregate boundary. #327W2B
Return row's concrete declaration for lane-name, or NIL.
Bind concrete represented declarations to definition's physical lanes.
declarations is an alist from lane names to represented-value declarations.
Representation compatibility and duplicate semantic ownership are checked
once; returned rows retain the concrete declarations without wrapping values.
Define a concrete synchronized structure-of-arrays buffer.
Each lane is (NAME INITIAL-ELEMENT :type type [:CLEAR-ON-REMOVE T]). Optional
:QUANTITIES on name-and-options groups named physical lanes into fixed
quantity projections. The generated MAKE-, -PUSH, -POP, and -RESET functions
operate on raw specialized arrays with one shared length and capacity. #LDP5UR
Each lane slot carries its precise specialized array type, so
the generated push and every direct lane access store and
load raw elements without boxing them.
Growth is rare, and one inlined REPLACE per lane over precisely
typed arrays makes SBCL's constraint propagation take minutes on
a buffer with a few dozen lanes. Call REPLACE instead.
Define fixed columnar storage whose exact extent comes from one DOMAIN.
Each lane has the same syntax as define-columnar-buffer. The generated
MAKE-NAME constructor takes DOMAIN first, asks domain-cardinality for its exact
extent, checks the row declaration once, and allocates one specialized array
per lane. The domain, row meaning, and arrays then travel together.
Borrow BUFFER-TYPE's active extent, row declaration, and raw lane arrays.
bindings is (length ROW-DECLARATION (ARRAY LANE-NAME) ...). The buffer is
evaluated once, and every array receives its precise specialized array type.
This is the checked aggregate boundary for closed scalar or SIMD kernels;
the kernel traverses the borrowed arrays without row objects. #VKLLPR
Borrow a fixed materialization's domain, extent, row, and raw lane arrays.
bindings is (DOMAIN EXTENT ROW-DECLARATION (ARRAY LANE-NAME) ...). The
materialization is evaluated once and each array receives its precise
specialized array type.
Bind one BUFFER-TYPE row's raw lane values at INDEX without allocation.
Visit BUFFER-TYPE's active rows without constructing row objects.
One top-level defining form of a source file.
PROPERTY: VALUES; -- the property a keyword, the values a list written space-separated.
One generated column's name, element representation, and retention policy.
One represented value's machine form and optional semantic meaning. The representation type and quantity judgment are deliberately parallel: two declarations may both use VEC3 while denoting different quantities, and one quantity may acquire different representations in different backends. #OXBSAY
((agent application-agent) &key)(declaration)Return DECLARATION's backend or Common Lisp representation type, or NIL.
The physical lanes and fixed row meaning generated for a columnar type.
Semantic quantities packed into disjoint positions of one representation.
How the children of a list are arranged.
Logical conjunction of tests and raw truth values.
Test whether two compatible scalars are equal.
(name)Return the inspectable physical row layout named by NAME.
(definition lane-name)Concrete per-lane declarations retained once by a columnar materialization. Rows remain raw array elements; this object carries their checked meaning at the aggregate boundary. #327W2B
(row lane-name)(definition lane-name declaration reason)(definition lane-name declaration physical-lane)(definition lane-name)(definition &optional declarations)Bind concrete represented DECLARATIONS to DEFINITION's physical lanes. DECLARATIONS is an alist from lane names to represented-value declarations. Representation compatibility and duplicate semantic ownership are checked once; returned rows retain the concrete declarations without wrapping values.
(&body body)The declarations BODY makes, read as a rule body, for a rule to include: the way to write a mixin.
(declaration)Headings, paragraphs, figures and their IDs, mentions, marks.
Logical negation of one test or raw truth value.
Logical disjunction of tests and raw truth values.
(extent projections)(positions specification)(options &key (default-tensor-order 0))Parse one source declaration plist into a quantity specification. Return NIL when OPTIONS contains no quantity attributes. This is the common source seam used by arithmetic parameters, shader interfaces, and semantic storage declarations; callers retain ownership of their source-specific error conditions and…
(name-and-options &body lane-descriptions)Define a concrete synchronized structure-of-arrays buffer. Each lane is (NAME INITIAL-ELEMENT :TYPE TYPE [:CLEAR-ON-REMOVE T]). Optional :QUANTITIES on NAME-AND-OPTIONS groups named physical lanes into fixed quantity projections. The generated MAKE-, -PUSH, -POP, and -RESET functions operate on raw specialized…
Multiplication and scalar scaling.
The maximum of compatible quantities.
(name-and-options &body lane-descriptions)Define fixed columnar storage whose exact extent comes from one DOMAIN. Each lane has the same syntax as DEFINE-COLUMNAR-BUFFER. The generated MAKE-NAME constructor takes DOMAIN first, asks DOMAIN-CARDINALITY for its exact extent, checks the row declaration once, and allocates one specialized array per lane. The…
(domain)Return the exact number of sites in finite DOMAIN. This deliberately says nothing about coordinate or offset representation. Those mappings belong to concrete domain protocols and are added only when a client needs to traverse them.
((bindings buffer buffer-type) &body body)Borrow BUFFER-TYPE's active extent, row declaration, and raw lane arrays. BINDINGS is (LENGTH ROW-DECLARATION (ARRAY LANE-NAME) ...). The buffer is evaluated once, and every array receives its precise specialized array type. This is the checked aggregate boundary for closed scalar or SIMD kernels; the kernel…
((bindings materialization materialization-type) &body body)Borrow a fixed materialization's domain, extent, row, and raw lane arrays. BINDINGS is (DOMAIN EXTENT ROW-DECLARATION (ARRAY LANE-NAME) ...). The materialization is evaluated once and each array receives its precise specialized array type.
((bindings buffer index buffer-type) &body body)((bindings buffer buffer-type &optional result) &body body)A columnar definition has two related descriptions which must not collapse into one. The physical lane layout fixes lane names, Common Lisp element types, initial values, and reference-clearing policy. It is sufficiently static for a defining macro to generate a concrete structure, specialized arrays, and inline…
Intent: extract the synchronized specialized storage proven by the lighting frontier into a generated columnar-buffer substrate, while making its physical lanes and concrete row quantity declaration inspectable. Keep level scheduling, spatial stepping, and fixed-point behavior in lighting. Evidence:…
Intent: eventually let a field or simulation phase select a scalar or SB-SIMD realization of the same semantic operation once per dense kernel. Evidence: #B5L7VG and the native SIMD study describe the representation seam, and #LDP5UR now supplies generated quantity-aware SoA storage. The first executable probe uses…
Generated structure-of-arrays storage with inspectable quantity meaning.