@@ -181,7 +181,7 @@ function to be used from within the same world-age, one simply needs to pass `Va
181
181
generate the function, i.e.:
182
182
183
183
``` 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 ]
185
185
```
186
186
187
187
which uses GeneralizedGenerated.jl to build a same world-age function on the fly without eval.
@@ -330,19 +330,22 @@ a = y - x
330
330
eqs = [0 ~ σ* a,
331
331
0 ~ x* (ρ- z)- y,
332
332
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
335
335
```
336
336
337
337
expands to:
338
338
339
339
``` 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
346
349
end )
347
350
```
348
351
0 commit comments