pub trait SemanticLinearTransposeRule:
Debug
+ Send
+ Sync
+ 'static {
// Required methods
fn family_id(&self) -> &'static str;
fn linear_transpose(
&self,
request: SemanticLinearTransposeRequest<'_>,
builder: &mut SemanticProgramBuilder,
) -> Result<Box<[AdValue]>, SemanticAdError>;
}Expand description
Transpose rule for an extension viewed as a linear map.
Required Methods§
Sourcefn family_id(&self) -> &'static str
fn family_id(&self) -> &'static str
Return the versioned extension family handled by this rule.
Sourcefn linear_transpose(
&self,
request: SemanticLinearTransposeRequest<'_>,
builder: &mut SemanticProgramBuilder,
) -> Result<Box<[AdValue]>, SemanticAdError>
fn linear_transpose( &self, request: SemanticLinearTransposeRequest<'_>, builder: &mut SemanticProgramBuilder, ) -> Result<Box<[AdValue]>, SemanticAdError>
Emit ordered optional input cotangents into builder.
§Errors
Returns SemanticAdError::Unsupported when the payload is outside
the rule’s supported domain, or SemanticAdError::Build when emitted
semantic operations fail validation.