File tree Expand file tree Collapse file tree
enzyme/test/Fortran/ReverseMode Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44! RUN: if [ %llvmver -ge 13 ]; then ifx -flto -O3 -c %s -o /dev/stdout | %opt %loadEnzyme -enzyme -o %t && ifx -flto -O3 %t -o %t1 && %t1 | FileCheck %s; fi
55
66module math
7- interface
8- subroutine square__enzyme_autodiff (fn , x , dx )
9- interface
10- real function fn_decal (a )
11- real , intent (in ) :: a
12- end function
13- end interface
14- procedure (fn_decal) :: fn
15- real , intent (in ) :: x
16- real , intent (inout ) :: dx
17- end subroutine
18- end interface
197contains
208 real function square ( x )
219 real , intent (in ) :: x
@@ -26,13 +14,14 @@ end module math
2614program app
2715 use math
2816 implicit none
17+ external :: __enzyme_autodiff
2918 real :: x, dx
3019
3120 x = 3
3221 print * , square(x)
3322
3423 dx = 0
35- call square__enzyme_autodiff (square, x, dx);
24+ call __enzyme_autodiff (square, x, dx);
3625
3726 print * , dx
3827end program app
You can’t perform that action at this time.
0 commit comments