Update generic tests

This commit is contained in:
Marcelo Domínguez 2025-05-20 12:36:12 +00:00
parent 8dd62e8188
commit 8917ff6024
2 changed files with 3 additions and 3 deletions

View file

@ -3,9 +3,9 @@
//@ needs-enzyme
#![feature(autodiff)]
use std::autodiff::autodiff;
use std::autodiff::autodiff_reverse;
#[autodiff(d_square, Reverse, Duplicated, Active)]
#[autodiff_reverse(d_square, Duplicated, Active)]
fn square<T: std::ops::Mul<Output = T> + Copy>(x: &T) -> T {
*x * *x
}

View file

@ -64,7 +64,7 @@ pub fn f9() {
}
// Make sure we can handle generics
#[autodiff(d_square, Reverse, Duplicated, Active)]
#[autodiff_reverse(d_square, Duplicated, Active)]
pub fn f10<T: std::ops::Mul<Output = T> + Copy>(x: &T) -> T {
*x * *x
}