@@ -70,18 +70,14 @@ function ode_factory_gen(state::TransformationState, ci::CodeInstance, key::Torn
7070 @assert sicm_ci != = nothing
7171
7272 line = result. ir[SSAValue (1 )][:line ]
73- # insert_node_here!(compact, NewInstruction(Expr(:call, println, "Trace: A"), Cvoid, line))
74- sicm = insert_node_here! (compact,
75- NewInstruction (Expr (:call , invoke, Argument (3 ), sicm_ci, (Argument (i+ 1 ) for i = 2 : length (result. ir. argtypes)). .. ), Tuple, line))
76- # insert_node_here!(compact, NewInstruction(Expr(:call, println, "Trace: B"), Cvoid, line))
73+ sicm = @insert_node_here compact line invoke (Argument (3 ), sicm_ci, (Argument (i+ 1 ) for i = 2 : length (result. ir. argtypes)). .. ):: Tuple
7774 else
7875 sicm = ()
7976 end
8077
8178 odef_ci = rhs_finish! (state, ci, key, world, 1 )
8279
83- # Create a small opaque closure to adapt from SciML ABI to our own internal
84- # ABI
80+ # Create a small opaque closure to adapt from SciML ABI to our own internal ABI
8581
8682 numstates = zeros (Int, Int (LastEquationStateKind))
8783
@@ -106,12 +102,12 @@ function ode_factory_gen(state::TransformationState, ci::CodeInstance, key::Torn
106102 p = Argument (4 )
107103 t = Argument (5 )
108104
109- # Zero the output
110105 line = ir_oc[SSAValue (1 )][:line ]
111106
107+ # Zero the output
112108 @insert_node_here oc_compact line zero! (du):: VectorViewType
113109
114- # out_du_mm, out_eq, in_u_mm, in_u_unassgn, in_alg
110+ # out_du_mm, out_eq, in_u_mm, in_u_unassgn, in_alg, in_alg_derv
115111 nassgn = numstates[AssignedDiff]
116112 ntotalstates = numstates[AssignedDiff] + numstates[UnassignedDiff] + numstates[Algebraic] + numstates[AlgebraicDerivative]
117113 out_du_mm = @insert_node_here oc_compact line view (du, 1 : nassgn):: VectorViewType
0 commit comments