enum class lookahead
Description
Controls how many command groups the runtime can queue up until starting execution of the first one.
Declared at: include/types.h:192
Enumerators
Name | Value | Comment |
---|---|---|
none | 0 | Command groups begin executing as soon as possible, minimizing latency. This is the right choice when asynchronous command groups must overlap with user code in the application thread. Depending on the application, this might trigger frequent and expensive buffer resizes which can limit the maximum buffer allocation (and thus problem size) per device. |
automatic | 1 | Queue up a window of command groups at the runtime's discretion. This is the default, and will combine buffer allocations and eliminate resizes and out-of-memory conditions in most applications. |
infinite | 2 | Always queue up all command groups until the next synchronization point, i.e. `queue::fence`, `queue::wait` or runtime shutdown. This maximizes throughput and avoids suboptimal buffer allocations at the expense of higher up-front scheduling latency. |