All docs
Docs/ API Reference/ lsdtools.compiler reference
API Reference

lsdtools.compiler reference

Generated public SDK reference for lsdtools.compiler.

SDK distribution 1.0.0; API contract 1.0; generator 1.0.0.

Product source digest: 4ea39055732e8883c03ccfecf12af6ccebd2041a12ce1b843e4a769e200f5ef9.

Generated from declared public exports and source syntax. Signatures and annotations are declaration spellings; decorators, factories and annotations are never executed. Class members below are declared members; base classes remain explicit. Source docstrings describe their owning implementation; they do not grant app permissions.

text
Lazy public compiler API for authoring platform export packages.

The common compiler emits target-independent values and typed C++ kernels. A target package
accepts those values and owns its SDK, linker, graphics backend, signing and distribution.
No target is installed, imported or executed when this facade is imported.

lsdtools.compiler.Assignment#

Kind: class. Source: services/compiler/src/lsd_compiler/kernels.py:163.

Implementation alias: lsd_compiler.kernels.Assignment.

lsdtools.compiler.Assignment.target#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:164.

Python
target: str

lsdtools.compiler.Assignment.expression#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:165.

Python
expression: Expr

lsdtools.compiler.Binary#

Kind: class. Source: services/compiler/src/lsd_compiler/kernels.py:131.

Implementation alias: lsd_compiler.kernels.Binary.

lsdtools.compiler.Binary.op#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:132.

Python
op: str

lsdtools.compiler.Binary.left#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:133.

Python
left: Expr

lsdtools.compiler.Binary.right#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:134.

Python
right: Expr

lsdtools.compiler.Column#

Kind: class. Source: services/compiler/src/lsd_compiler/kernels.py:90.

Implementation alias: lsd_compiler.kernels.Column.

lsdtools.compiler.Column.name#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:91.

Python
name: str

lsdtools.compiler.Column.dtype#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:92.

Python
dtype: str
Python
dtype = 'float32'

lsdtools.compiler.Column.access#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:93.

Python
access: str
Python
access = 'read'

lsdtools.compiler.CompileError#

Kind: class. Source: services/compiler/src/lsd_compiler/scene.py:18.

Source docstring:

text
The exact authored feature or input which cannot be exported.

Implementation alias: lsd_compiler.scene.CompileError.

Declared bases: ValueError.

lsdtools.compiler.Constant#

Kind: class. Source: services/compiler/src/lsd_compiler/kernels.py:121.

Implementation alias: lsd_compiler.kernels.Constant.

lsdtools.compiler.Constant.value#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:122.

Python
value: float

lsdtools.compiler.Constant.dtype#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:123.

Python
dtype: str
Python
dtype = 'float32'

lsdtools.compiler.Kernel#

Kind: class. Source: services/compiler/src/lsd_compiler/kernels.py:173.

Implementation alias: lsd_compiler.kernels.Kernel.

lsdtools.compiler.Kernel.name#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:174.

Python
name: str

lsdtools.compiler.Kernel.columns#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:175.

Python
columns: tuple[Column, ...]

lsdtools.compiler.Kernel.assignments#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:176.

Python
assignments: tuple[Assignment, ...]

lsdtools.compiler.Kernel.parameters#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:177.

Python
parameters: tuple[Parameter, ...]
Python
parameters = ()

lsdtools.compiler.Mesh#

Kind: class. Source: services/compiler/src/lsd_compiler/assets.py:32.

Source docstring:

text
Triangle mesh: interleaved xyz/normal xyz float32 and absolute uint32 indices.

Implementation alias: lsd_compiler.assets.Mesh.

lsdtools.compiler.Mesh.vertices#

Kind: attribute. Source: services/compiler/src/lsd_compiler/assets.py:35.

Python
vertices: np.ndarray

lsdtools.compiler.Mesh.indices#

Kind: attribute. Source: services/compiler/src/lsd_compiler/assets.py:36.

Python
indices: np.ndarray

lsdtools.compiler.Mesh.digest#

Kind: method. Source: services/compiler/src/lsd_compiler/assets.py:51.

Python
digest(self) -> str
Python
self: (unannotated)

lsdtools.compiler.MeshAtlas#

Kind: class. Source: services/compiler/src/lsd_compiler/assets.py:57.

Implementation alias: lsd_compiler.assets.MeshAtlas.

lsdtools.compiler.MeshAtlas.vertices#

Kind: attribute. Source: services/compiler/src/lsd_compiler/assets.py:58.

Python
vertices: np.ndarray

lsdtools.compiler.MeshAtlas.indices#

Kind: attribute. Source: services/compiler/src/lsd_compiler/assets.py:59.

Python
indices: np.ndarray

lsdtools.compiler.MeshAtlas.ranges#

Kind: attribute. Source: services/compiler/src/lsd_compiler/assets.py:60.

Python
ranges: Mapping[str, tuple[int, int]]

lsdtools.compiler.MeshAtlas.unique_meshes#

Kind: attribute. Source: services/compiler/src/lsd_compiler/assets.py:61.

Python
unique_meshes: int

lsdtools.compiler.Node#

Kind: class. Source: services/compiler/src/lsd_compiler/pipeline.py:11.

Implementation alias: lsd_compiler.pipeline.Node.

lsdtools.compiler.Node.id#

Kind: attribute. Source: services/compiler/src/lsd_compiler/pipeline.py:12.

Python
id: str

lsdtools.compiler.Node.operation#

Kind: attribute. Source: services/compiler/src/lsd_compiler/pipeline.py:13.

Python
operation: str

lsdtools.compiler.Node.dependencies#

Kind: attribute. Source: services/compiler/src/lsd_compiler/pipeline.py:14.

Python
dependencies: tuple[str, ...]
Python
dependencies = ()

lsdtools.compiler.Node.phase#

Kind: attribute. Source: services/compiler/src/lsd_compiler/pipeline.py:15.

Python
phase: str
Python
phase = 'bake'

lsdtools.compiler.Parameter#

Kind: class. Source: services/compiler/src/lsd_compiler/kernels.py:103.

Implementation alias: lsd_compiler.kernels.Parameter.

lsdtools.compiler.Parameter.name#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:104.

Python
name: str

lsdtools.compiler.Parameter.dtype#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:105.

Python
dtype: str
Python
dtype = 'float32'

lsdtools.compiler.Ref#

Kind: class. Source: services/compiler/src/lsd_compiler/kernels.py:113.

Implementation alias: lsd_compiler.kernels.Ref.

lsdtools.compiler.Ref.name#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:114.

Python
name: str

lsdtools.compiler.SceneIR#

Kind: class. Source: services/compiler/src/lsd_compiler/scene.py:63.

Implementation alias: lsd_compiler.scene.SceneIR.

lsdtools.compiler.SceneIR.scene#

Kind: attribute. Source: services/compiler/src/lsd_compiler/scene.py:64.

Python
scene: Mapping

lsdtools.compiler.SceneIR.objects#

Kind: attribute. Source: services/compiler/src/lsd_compiler/scene.py:65.

Python
objects: tuple[Mapping, ...]

lsdtools.compiler.SceneIR.cameras#

Kind: attribute. Source: services/compiler/src/lsd_compiler/scene.py:66.

Python
cameras: tuple[Mapping, ...]

lsdtools.compiler.SceneIR.actors#

Kind: attribute. Source: services/compiler/src/lsd_compiler/scene.py:67.

Python
actors: tuple[Mapping, ...]

lsdtools.compiler.SceneIR.atlas#

Kind: attribute. Source: services/compiler/src/lsd_compiler/scene.py:68.

Python
atlas: MeshAtlas

lsdtools.compiler.SceneIR.shaders#

Kind: attribute. Source: services/compiler/src/lsd_compiler/scene.py:69.

Python
shaders: tuple[Shader, ...]

lsdtools.compiler.SceneIR.batches#

Kind: attribute. Source: services/compiler/src/lsd_compiler/scene.py:70.

Python
batches: tuple[DrawBatch, ...]

lsdtools.compiler.SceneIR.digest#

Kind: attribute. Source: services/compiler/src/lsd_compiler/scene.py:71.

Python
digest: str

lsdtools.compiler.SceneIR.describe#

Kind: method. Source: services/compiler/src/lsd_compiler/scene.py:73.

Python
describe(self) -> dict
Python
self: (unannotated)

lsdtools.compiler.Shader#

Kind: class. Source: services/compiler/src/lsd_compiler/assets.py:97.

Source docstring:

text
Explicit shader source variant. Platform adapters own translation and driver compilation.

Implementation alias: lsd_compiler.assets.Shader.

lsdtools.compiler.Shader.resource_id#

Kind: attribute. Source: services/compiler/src/lsd_compiler/assets.py:100.

Python
resource_id: str

lsdtools.compiler.Shader.language#

Kind: attribute. Source: services/compiler/src/lsd_compiler/assets.py:101.

Python
language: str

lsdtools.compiler.Shader.vertex#

Kind: attribute. Source: services/compiler/src/lsd_compiler/assets.py:102.

Python
vertex: str

lsdtools.compiler.Shader.fragment#

Kind: attribute. Source: services/compiler/src/lsd_compiler/assets.py:103.

Python
fragment: str

lsdtools.compiler.Shader.digest#

Kind: method. Source: services/compiler/src/lsd_compiler/assets.py:114.

Python
digest(self) -> str
Python
self: (unannotated)

lsdtools.compiler.TripProgram#

Kind: class. Source: services/compiler/src/lsd_compiler/trips.py:17.

Source docstring:

text
One fixed row layout and ordered kernels, without engine/Arrow in the exported process.

This owns a build-time snapshot. Trip identity/version/commit semantics remain on the
authoring side; native execution owns its detached arrays. Kernels neither add nor reorder
rows. Platform packages can call step/reset and read columns through the exported C ABI.

Implementation alias: lsd_compiler.trips.TripProgram.

lsdtools.compiler.TripProgram.kernels#

Kind: attribute. Source: services/compiler/src/lsd_compiler/trips.py:25.

Python
kernels: tuple[Kernel, ...]

lsdtools.compiler.TripProgram.eid#

Kind: attribute. Source: services/compiler/src/lsd_compiler/trips.py:26.

Python
eid: np.ndarray

lsdtools.compiler.TripProgram.columns#

Kind: attribute. Source: services/compiler/src/lsd_compiler/trips.py:27.

Python
columns: Mapping[str, np.ndarray]

lsdtools.compiler.TripProgram.parameters#

Kind: attribute. Source: services/compiler/src/lsd_compiler/trips.py:28.

Python
parameters: Mapping[str, Mapping[str, float]]

lsdtools.compiler.TripProgram.digest#

Kind: attribute. Source: services/compiler/src/lsd_compiler/trips.py:29.

Python
digest: str

lsdtools.compiler.TripProgram.from_trip#

Kind: method. Source: services/compiler/src/lsd_compiler/trips.py:32.

Python
from_trip(cls, trip, kernels, *, parameters=None)
Python
cls: (unannotated)
kernels: (unannotated)
parameters: (unannotated)
trip: (unannotated)

lsdtools.compiler.TripProgram.describe#

Kind: method. Source: services/compiler/src/lsd_compiler/trips.py:80.

Python
describe(self)
Python
self: (unannotated)

lsdtools.compiler.Unary#

Kind: class. Source: services/compiler/src/lsd_compiler/kernels.py:144.

Implementation alias: lsd_compiler.kernels.Unary.

lsdtools.compiler.Unary.op#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:145.

Python
op: str

lsdtools.compiler.Unary.operand#

Kind: attribute. Source: services/compiler/src/lsd_compiler/kernels.py:146.

Python
operand: Expr

lsdtools.compiler.bake_project#

Kind: function. Source: services/compiler/src/lsd_compiler/project.py:53.

Python
bake_project(project: Path | str, *, entity_id: str | None=None) -> BakedProject
Python
entity_id: str | None
project: Path | str

Implementation alias: lsd_compiler.project.bake_project.

lsdtools.compiler.cpp_symbol#

Kind: function. Source: services/compiler/src/lsd_compiler/kernels.py:238.

Python
cpp_symbol(kernel: Kernel) -> str
Python
kernel: Kernel

Source docstring:

text
The stable C ABI function name; input names are validated, never interpolated code.

Implementation alias: lsd_compiler.kernels.cpp_symbol.

lsdtools.compiler.emit_cpp#

Kind: function. Source: services/compiler/src/lsd_compiler/kernels.py:245.

Python
emit_cpp(kernel: Kernel) -> str
Python
kernel: Kernel

Source docstring:

text
Emit a deterministic, allocation-free fused row loop (ABI in module docstring).

Implementation alias: lsd_compiler.kernels.emit_cpp.

lsdtools.compiler.emit_trip_cpp#

Kind: function. Source: services/compiler/src/lsd_compiler/trips.py:87.

Python
emit_trip_cpp(program: TripProgram) -> str
Python
program: TripProgram

Source docstring:

text
Emit one C++17 translation unit; strict FP flags are required as for emit_cpp.

ABI: lsd_program_step(), lsd_program_reset(), lsd_program_rows(),
lsd_program_column(index) and lsd_program_eids(). Column order is describe()['columns'].
Column pointers are owned by one program instance and never resized. Calls are single-owner;
callers synchronize snapshots. Status values from a kernel propagate unchanged.

Implementation alias: lsd_compiler.trips.emit_trip_cpp.

lsdtools.compiler.evaluate#

Kind: function. Source: services/compiler/src/lsd_compiler/kernels.py:321.

Python
evaluate(kernel: Kernel, arrays: Mapping[str, np.ndarray], parameters: Mapping[str, float] | None=None) -> None
Python
arrays: Mapping[str, np.ndarray]
kernel: Kernel
parameters: Mapping[str, float] | None

Source docstring:

text
Reference evaluator: validate every binding before mutating declared output arrays.

This numpy oracle allocates expression temporaries. The native fused kernel
does not. Binding dtypes are exact, native endian, one-dimensional and
contiguous; no array cast, copy, resize, or broadcasting is inferred.

Implementation alias: lsd_compiler.kernels.evaluate.

lsdtools.compiler.lower_scene#

Kind: function. Source: services/compiler/src/lsd_compiler/scene.py:86.

Python
lower_scene(bundle: SceneBundle, *, meshes: Mapping[str, Mesh], shaders: Mapping[str, Shader], component_providers: tuple[str, ...]=(), colors: Mapping[int, tuple] | None=None) -> SceneIR
Python
bundle: SceneBundle
colors: Mapping[int, tuple] | None
component_providers: tuple[str, ...]
meshes: Mapping[str, Mesh]
shaders: Mapping[str, Shader]

Source docstring:

text
Lower already evaluated data; never discover, import or run authored project code.

Implementation alias: lsd_compiler.scene.lower_scene.

lsdtools.compiler.pack_meshes#

Kind: function. Source: services/compiler/src/lsd_compiler/assets.py:64.

Python
pack_meshes(meshes: Mapping[str, Mesh]) -> MeshAtlas
Python
meshes: Mapping[str, Mesh]

Source docstring:

text
Deduplicate identical meshes and pack once in deterministic resource-id order.

Instance transforms remain separate. Baking them into vertices would break moving objects
and increase geometry memory; instances with the same mesh and shader become one draw batch.

Implementation alias: lsd_compiler.assets.pack_meshes.

lsdtools.compiler.plan#

Kind: function. Source: services/compiler/src/lsd_compiler/pipeline.py:27.

Python
plan(nodes: Iterable[Node], *, supported: Iterable[str]) -> tuple[Node, ...]
Python
nodes: Iterable[Node]
supported: Iterable[str]

Source docstring:

text
Stable topological order; unsupported nodes, dangling edges and cycles fail closed.

This is an explicit lowering boundary, not a Python-to-C++ translator. Bake operations
run once on the authoring machine; tick operations must have a native implementation.

Implementation alias: lsd_compiler.pipeline.plan.

By LSD Team · Last updated Sep 09, 2026 Ask a question View as Markdown
Type to search every doc, guide, and tutorial.
↑↓ navigate openesc close