solprop.driver.batch#

Prepare compatible fixed-schedule scan members without changing their backend.

Functions

compatible_groups(members, size)

Group adjacent compatible points with bounded resident translation products.

refuse_mixed_guides(problems)

Refuse a formed group whose members are not the same general modal guide.

shared_table_bytes(problems)

Count host array storage once across shared translated member records.

Classes

BatchMember(index, simulation)

Bind a global scan index to its independently translated simulation.

class solprop.driver.batch.BatchMember(index, simulation)[source]#

Bases: object

Bind a global scan index to its independently translated simulation.

Attributes:
indexint

Zero-based global scan index, retained after grouping and output splitting.

simulationSimulation

Member with its own input, noise, parameter tables and backend selection.

index: int#
simulation: Simulation#
solprop.driver.batch.compatible_groups(members, size)[source]#

Group adjacent compatible points with bounded resident translation products.

Parameters:
membersiterable of BatchMember

Members in scan dispatch order. Their global indices are never renumbered.

sizeint

Maximum positive number of members per group.

Yields:
tuple of BatchMember

A full batch, a group ended by a layout change, or the final partial batch.

Raises:
DriverError

If size is invalid, an index is negative, a member is unsupported, or a formed group mixes general modal guides (refuse_mixed_guides(), which every yielded group passes through).

solprop.driver.batch.refuse_mixed_guides(problems)[source]#

Refuse a formed group whose members are not the same general modal guide.

The defence the descriptor cannot give. _signature separates two guides into different groups, so this never fires on a group compatible_groups() built; it fires on one assembled by hand or by a future grouping rule, where a silently mixed group would propagate one guide’s channels against another’s reference and nothing downstream would say so.

Parameters:
problemscollections.abc.Sequence

The members’ translated problems, in group order.

Raises:
DriverError

Naming the field at which two members part company.

solprop.driver.batch.shared_table_bytes(problems)[source]#

Count host array storage once across shared translated member records.

Parameters:
problemsiterable of PropagationProblem

Translations whose resident host allocations are being admitted.

Returns:
int

Unique backing-array bytes. This excludes native workspace and outputs, which must be added from the backend ledger and retention plan separately.