Skip to main content

Module parallel

Module parallel 

Source
Expand description

Concurrent execution of lane-partitioned kernels.

A kernel is a list of tasks. Every task belongs to one lane, and each lane runs its tasks in list order on one thread: lane 0 on the calling thread, the others on persistent worker threads. Before a task starts, its waits require other lanes to have completed a number of their tasks in the current execution. Completion counts are published with release stores and observed with acquire loads, so a consumer sees every state write of the producer tasks it waited for.

Idle workers spin briefly for the next kernel and then park; dispatch unparks only workers that announced they were going to sleep.

Structs§

KernelSelector
Picks a kernel implementation from measured execution times.
LanePool
Persistent worker threads for one lane-partitioned program.
LaneSchedule
Validated execution order of a lane-partitioned kernel.
LaneTaskFailure
A kernel failure. Non-fatal failures take precedence over combinational fatal captures; within either class the lowest task index wins.
LaneTaskSpec
One task of a lane-partitioned kernel.

Enums§

KernelChoice
Which implementation of a kernel to run next.
KernelSelection
How a runtime picks between a kernel’s partitioned and sequential code.
LaneScheduleError

Constants§

LANE_TASK_PANICKED
Status reported for a task whose runner panicked.

Traits§

LaneTaskRunner
Executes the tasks of one kernel.

Functions§

new_diagnostic_id
Process-local identity for diagnostic objects. Never derived from addresses or topology, and never persisted in native images.