# @\_inline\_meta

**URL:** <https://discourse.julialang.org/t/-inline-meta/4915>\
**Category:** General Usage\
**Tags:** metaprogramming\
**Created:** [July 18, 2017, 2:40am UTC](https://discourse.julialang.org/t/-inline-meta/4915 "2017-07-18T02:40:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [July 18, 2017, 2:40am UTC](https://discourse.julialang.org/t/-inline-meta/4915/1 "2017-07-18T02:40:18Z")

</div>

I was going through some examples of generated functions in StaticArrays and I came across the following code snippet with the seemingly unearthly syntax of `@_inline_meta` and the 2 return statements. I would appreciate an earthly explanation for that and why it is necessary, thank you!

```julia
@generated function _A_mul_B(Sa::Size{sa}, Sb::Size{sb}, a::StaticMatrix{<:Any, <:Any, Ta}, b::StaticMatrix{<:Any, <:Any, Tb}) where {sa, sb, Ta, Tb}
    # Heuristic choice for amount of codegen
    if sa[1]*sa[2]*sb[2] <= 8*8*8
        return quote
            @_inline_meta
            return A_mul_B_unrolled(Sa, Sb, a, b)
        end
    elseif sa[1] <= 14 && sa[2] <= 14 && sb[2] <= 14
        return quote
            @_inline_meta
            return A_mul_B_unrolled_chunks(Sa, Sb, a, b)
        end
    else
        return quote
            @_inline_meta
            return A_mul_B_loop(Sa, Sb, a, b)
        end
    end
end

```

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [July 18, 2017, 3:23am UTC](https://discourse.julialang.org/t/-inline-meta/4915/2 "2017-07-18T03:23:20Z")

</div>

The generated function returns the expression of the functions it generates (which includes a return statement).

The inline meta stuff is the same as putting `@inline` on the function being generated (but since there is no actual function to put the macro on on you need to directly enter the meta-node into the expression).

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [July 18, 2017, 3:48am UTC](https://discourse.julialang.org/t/-inline-meta/4915/3 "2017-07-18T03:48:52Z")

</div>

Cool thanks.
