-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestmacroAny additions or improvements to procedural macrosAny additions or improvements to procedural macrosrustImprovements or additions that update the Rust codeImprovements or additions that update the Rust code
Milestone
Description
It may be possible to generate a macro that represents the gradient;
extern crate acme;
use acme::operator;
fn main() {
let dx = mul_gradient!(x: 10f64);
let (x, y) = (3f64, 4f64);
let dx = mul_gradient!(x);
let dy = mul_gradient!(y);
assert_eq!(dx, y);
assert_eq!(dy, x);
}
#[operator]
pub fn mul<A, B, C>(x: A, y: B) -> C where A: core::ops::Mul<B, Output = C> {
x * y
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestmacroAny additions or improvements to procedural macrosAny additions or improvements to procedural macrosrustImprovements or additions that update the Rust codeImprovements or additions that update the Rust code