pub struct SemanticValueDesc { /* private fields */ }Expand description
Handle-free description of one logical value.
Implementations§
Source§impl SemanticValueDesc
impl SemanticValueDesc
Sourcepub fn new(
name: impl Into<String>,
kind: OpValueKind,
shape: impl Into<Vec<usize>>,
dtype: DType,
) -> Result<Self>
pub fn new( name: impl Into<String>, kind: OpValueKind, shape: impl Into<Vec<usize>>, dtype: DType, ) -> Result<Self>
Construct a dense handle-free value description.
Sourcepub const fn external(self, external: bool) -> Self
pub const fn external(self, external: bool) -> Self
Mark whether storage is supplied from outside the captured graph.
Sourcepub const fn virtual_value(self, virtual_value: bool) -> Self
pub const fn virtual_value(self, virtual_value: bool) -> Self
Mark whether the value should be materialized only during lowering.
Sourcepub const fn byte_offset(self, byte_offset: u64) -> Self
pub const fn byte_offset(self, byte_offset: u64) -> Self
Set the captured absolute byte offset within a storage identity.
Sourcepub fn strides(self, strides: impl Into<Vec<isize>>) -> Result<Self>
pub fn strides(self, strides: impl Into<Vec<isize>>) -> Result<Self>
Replace dense strides with explicit element strides.
Sourcepub const fn id(&self) -> Option<SemanticValueId>
pub const fn id(&self) -> Option<SemanticValueId>
Return the graph-assigned identity, if this value has been admitted.
Sourcepub const fn kind(&self) -> OpValueKind
pub const fn kind(&self) -> OpValueKind
Return the semantic value kind.
Sourcepub fn strides_ref(&self) -> &[isize]
pub fn strides_ref(&self) -> &[isize]
Return element strides.
Sourcepub const fn byte_offset_value(&self) -> u64
pub const fn byte_offset_value(&self) -> u64
Return the absolute byte offset within captured storage.
Sourcepub const fn is_external(&self) -> bool
pub const fn is_external(&self) -> bool
Return whether storage enters from outside this graph.
Sourcepub const fn is_virtual(&self) -> bool
pub const fn is_virtual(&self) -> bool
Return whether lowering owns materialization.
Sourcepub const fn producer(&self) -> Option<SemanticOpId>
pub const fn producer(&self) -> Option<SemanticOpId>
Return the producing semantic operation, if any.
Sourcepub const fn view_source(&self) -> Option<SemanticValueId>
pub const fn view_source(&self) -> Option<SemanticValueId>
Return the earlier value from which this metadata-only view derives.
Sourcepub const fn view_byte_offset(&self) -> i64
pub const fn view_byte_offset(&self) -> i64
Return the signed byte delta from the view source.