#[non_exhaustive]pub enum Form {
Flat,
Constant,
Sequence,
Dictionary,
}Expand description
Which physical form a vector is in.
An operator asks this once per vector and then takes the path it wants, which is the one branch per vector that the whole design is willing to spend.
Not exhaustive, and that is a decision rather than an oversight. Encoded is the fifth form
and it arrives at layer three with the specialization contract. If this enum were exhaustive,
the day it lands is the day every kernel in the workspace stops compiling, and the pressure at
that moment would be to add an arm to each of them in a hurry rather than to think about what
each one should do with an encoded vector. A required fallback arm means each kernel already
has a correct answer for a form it has never seen, and specializing it is then a change that
can be made one kernel at a time with a benchmark next to it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Flat
One value per position.
Constant
One value, repeated.
Sequence
A start and a step, computed rather than stored.
Dictionary
Codes into a smaller vector of distinct values.