@@ -181,7 +181,7 @@ function to be used from within the same world-age, one simply needs to pass `Va
181181generate the function, i.e.:
182182
183183``` julia
184- nlsys_func = generate_function (ns, [x,y,z], [σ,ρ,β], Val{false })[2 ]
184+ nlsys_func = generate_function (ns, [x,y,z], [σ,ρ,β], expression = Val{false })[2 ]
185185```
186186
187187which uses GeneralizedGenerated.jl to build a same world-age function on the fly without eval.
@@ -330,19 +330,22 @@ a = y - x
330330eqs = [0 ~ σ* a,
331331 0 ~ x* (ρ- z)- y,
332332 0 ~ x* y - β* z]
333- ns = NonlinearSystem (eqs, [x,y,z])
334- nlsys_func = generate_function (ns, [x,y,z], [σ,ρ,β])
333+ ns = NonlinearSystem (eqs, [x,y,z], [σ,ρ,β] )
334+ nlsys_func = generate_function (ns)[ 2 ] # second is the inplace version
335335```
336336
337337expands to:
338338
339339``` julia
340- :((# #365, u, p)->begin
341- let (x, y, z, σ, ρ, β) = (u[1 ], u[2 ], u[3 ], p[1 ], p[2 ], p[3 ])
342- # #365[1] = σ * (y - x)
343- # #365[2] = x * (ρ - z) - y
344- # #365[3] = x * y - β * z
345- end
340+ :((var"##MTIIPVar#368" , var"##MTKArg#365" , var"##MTKArg#366" )-> begin
341+ @inbounds begin
342+ let (x, y, z, σ, ρ, β) = (var"##MTKArg#365" [1 ], var"##MTKArg#365" [2 ], var"##MTKArg#365" [3 ], var"##MTKArg#366" [1 ], var"##MTKArg#366" [2 ], var"##MTKArg#366" [3 ])
343+ var"##MTIIPVar#368" [1 ] = (* )(σ, (- )(y, x))
344+ var"##MTIIPVar#368" [2 ] = (- )((* )(x, (- )(ρ, z)), y)
345+ var"##MTIIPVar#368" [3 ] = (- )((* )(x, y), (* )(β, z))
346+ end
347+ end
348+ nothing
346349 end )
347350```
348351
0 commit comments