pub struct ResolvedPrimitive {
pub op: OpKind,
pub dtypes: KernelDTypes,
pub backend: BackendId,
pub caps: KernelCaps,
pub layouts: Vec<ResolvedLayout>,
pub precision: PrecisionGuarantee,
pub cost: CompiledCostExpr,
pub cost_fn: Option<CostFn>,
pub kernel: KernelRef,
pub kernel_source: String,
pub revision: KernelRevisionHash,
pub variant: Option<String>,
}Expand description
A fully-lowered primitive (op_kind) contract — typed dispatch record
ready for the register slice. The cost is held as a parsed AST
(CompiledCostExpr), NOT a CostFn fn-pointer (the trampoline is the
next slice).
Fields§
§op: OpKindThe dispatch op (key.0).
dtypes: KernelDTypesPer-operand dtypes, inputs in order then outputs (key.1).
backend: BackendIdThe backend (key.2).
caps: KernelCapsProjected layout capabilities (§6) — one bool today, every parsed
flag retained on layouts.
layouts: Vec<ResolvedLayout>Per-operand parsed five-flag layout sets (retained for forward use; §6 [consumer-ahead]).
precision: PrecisionGuaranteeLowered precision guarantee.
cost: CompiledCostExprParsed cost AST (capacity-eval next slice; Unknown ⇒ unknown_cost).
cost_fn: Option<CostFn>A CONTRACT-PINNED CostFn resolved from cost.cost_fn through the
LinkRegistry (§4.4 cost-fn trampoline, Task-F). Some(fn) ⇒ the
register slice stamps THIS CostFn on the binding, which SURVIVES the
fill_unset_cost_for_backend pass (that pass only replaces the
unknown_cost sentinel); None ⇒ the imported unknown_cost sentinel
(the fill pass upgrades it to the op/backend default). This is how the
CUDA flash_decoding contract keeps its static infeasibility-gate cost.
kernel: KernelRefThe resolved kernel function pointer.
kernel_source: StringThe kernel_source tag (BindingEntry.kernel_source).
revision: KernelRevisionHashThe kernel revision hash (§4.7).
variant: Option<String>OPAQUE specialization-variant tag (contract variant:), retained
verbatim from crate::fkc::schema::FkcKernel::variant so it survives
to where records / ImplId construction (the emission step) will read
it. Never parsed or validated here; the entry point remains the true
kernel identity.
Trait Implementations§
Source§impl Clone for ResolvedPrimitive
impl Clone for ResolvedPrimitive
Auto Trait Implementations§
impl Forget for ResolvedPrimitive
impl Freeze for ResolvedPrimitivewhere
*const DType is !null: Freeze,
PhantomData<DType>: Freeze,
*const u8 is !null: Freeze,
PhantomData<ResolvedLayout>: Freeze,
&'static str: Freeze,
PhantomData<u8>: Freeze,
*const CostNode is !null: Freeze,
PhantomData<CostNode>: Freeze,
impl Move for ResolvedPrimitive
impl RefUnwindSafe for ResolvedPrimitivewhere
DType: RefUnwindSafe,
impl Send for ResolvedPrimitive
impl Sync for ResolvedPrimitive
impl Unpin for ResolvedPrimitive
impl UnsafeUnpin for ResolvedPrimitivewhere
*const DType is !null: UnsafeUnpin,
PhantomData<DType>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<ResolvedLayout>: UnsafeUnpin,
&'static str: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const CostNode is !null: UnsafeUnpin,
PhantomData<CostNode>: UnsafeUnpin,
impl UnwindSafe for ResolvedPrimitivewhere
NonNull<DType>: UnwindSafe,
DType: UnwindSafe,
RawVecInner: UnwindSafe,
&'static str: UnwindSafe,
BoxRaw<CostNode>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more