pub struct SemanticLinearTransposeRequest<'a> { /* private fields */ }Expand description
Ordered inputs for one semantic linear-transpose rule.
Implementations§
Source§impl<'a> SemanticLinearTransposeRequest<'a>
impl<'a> SemanticLinearTransposeRequest<'a>
Sourcepub fn op(&self) -> &dyn ExtensionOp
pub fn op(&self) -> &dyn ExtensionOp
Sourcepub fn primal_input_value(
&self,
index: usize,
) -> Result<ProgramValue, SemanticAdError>
pub fn primal_input_value( &self, index: usize, ) -> Result<ProgramValue, SemanticAdError>
Return one declared primal input tensor value.
§Errors
Returns SemanticAdError::PrimalIndexOutOfBounds before checking the
residual mask, or SemanticAdError::UndeclaredResidualValue when the
rule did not declare this input as a tensor residual.
§Examples
let _ = request.primal_input_value(0)?;Sourcepub fn primal_output_value(
&self,
index: usize,
) -> Result<ProgramValue, SemanticAdError>
pub fn primal_output_value( &self, index: usize, ) -> Result<ProgramValue, SemanticAdError>
Return one declared primal output tensor value.
§Errors
Returns SemanticAdError::PrimalIndexOutOfBounds before checking the
residual mask, or SemanticAdError::UndeclaredResidualValue when the
rule did not declare this output as a tensor residual.
§Examples
let _ = request.primal_output_value(0)?;Sourcepub fn primal_input_meta(
&self,
index: usize,
) -> Result<&ProgramValueMetadata, SemanticAdError>
pub fn primal_input_meta( &self, index: usize, ) -> Result<&ProgramValueMetadata, SemanticAdError>
Borrow metadata for one primal input without exposing its value token.
§Errors
Returns SemanticAdError::PrimalIndexOutOfBounds when index is not
an ordered primal input.
§Examples
let _ = request.primal_input_meta(0)?;Sourcepub fn primal_output_meta(
&self,
index: usize,
) -> Result<&ProgramValueMetadata, SemanticAdError>
pub fn primal_output_meta( &self, index: usize, ) -> Result<&ProgramValueMetadata, SemanticAdError>
Borrow metadata for one primal output without exposing its value token.
§Errors
Returns SemanticAdError::PrimalIndexOutOfBounds when index is not
an ordered primal output.
§Examples
let _ = request.primal_output_meta(0)?;Sourcepub const fn primal_input_count(&self) -> usize
pub const fn primal_input_count(&self) -> usize
Sourcepub const fn primal_output_count(&self) -> usize
pub const fn primal_output_count(&self) -> usize
Sourcepub fn cotangent_outputs(&self) -> &[AdValue]
pub fn cotangent_outputs(&self) -> &[AdValue]
Sourcepub fn active_inputs(&self) -> &[bool]
pub fn active_inputs(&self) -> &[bool]
Sourcepub fn residuals(&self) -> &[ProgramValue]
pub fn residuals(&self) -> &[ProgramValue]
Sourcepub const fn residual_mask(&self) -> ResidualSpec
pub const fn residual_mask(&self) -> ResidualSpec
Return this rule’s declared residual mask: which primal input/output indices may be read as tensor values. Accesses outside the mask must only use shape/dtype metadata.
§Examples
let _ = request.residual_mask();Sourcepub const fn provenance(&self) -> SemanticProvenanceView<'a>
pub const fn provenance(&self) -> SemanticProvenanceView<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SemanticLinearTransposeRequest<'a>
impl<'a> !UnwindSafe for SemanticLinearTransposeRequest<'a>
impl<'a> Freeze for SemanticLinearTransposeRequest<'a>
impl<'a> Send for SemanticLinearTransposeRequest<'a>
impl<'a> Sync for SemanticLinearTransposeRequest<'a>
impl<'a> Unpin for SemanticLinearTransposeRequest<'a>
impl<'a> UnsafeUnpin for SemanticLinearTransposeRequest<'a>
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<T, U> Imply<T> for U
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