Thanks for the pointer! `meta(:inline)` is easy enough to generate. -erik
On Wed, Jan 20, 2016 at 9:55 PM, Jeffrey Sarnoff <[email protected]> wrote: > I'd prefer @inline @generated > because @generated @inline seems to say "generate this function inline" (not > "inline the function generated") > > > On Wednesday, January 20, 2016 at 2:50:55 PM UTC-5, Matt Bauman wrote: >> >> Yeah, I was thinking about that as I responded. An easier intermediate >> solution (which could be implemented purely in the Julia macro) would be to >> support `@inline quote … end`. Either way, the semantics are a little >> strange — you're not inlining the quote block, nor are you inlining the >> function generator itself. >> >> On Wednesday, January 20, 2016 at 2:39:23 PM UTC-5, Stefan Karpinski >> wrote: >>> >>> This seems like a viable feature request if you want to open an issue – >>> i.e. @inline @generated or @generated @inline should arrange that the >>> resulting function body be annotated appropriately. >>> >>> On Wed, Jan 20, 2016 at 2:35 PM, Matt Bauman <[email protected]> wrote: >>>> >>>> You need to manually attach the inline annotation within the function >>>> body that gets generated. See, e.g., >>>> https://github.com/JuliaLang/julia/blob/275c7e8929dd391960ba88e741c6f537ccca6cc9/base/multidimensional.jl#L233-L236 >>>> >>>> On Wednesday, January 20, 2016 at 2:27:14 PM UTC-5, Erik Schnetter >>>> wrote: >>>>> >>>>> I have a generated function that generates a very small function >>>>> (essentially a vector load instruction). Unfortunately, this function >>>>> is not inlined, and I thus want to mark the generated function as >>>>> @inline. How do I do so? >>>>> >>>>> Writing either "@inline @generated" or "@generated @inline" both fail. >>>>> >>>>> -erik >>>>> >>>>> -- >>>>> Erik Schnetter <[email protected]> >>>>> http://www.perimeterinstitute.ca/personal/eschnetter/ >>> >>> > -- Erik Schnetter <[email protected]> http://www.perimeterinstitute.ca/personal/eschnetter/
