Skip to content

Commit

Permalink
docstr
Browse files Browse the repository at this point in the history
  • Loading branch information
shashi committed Dec 11, 2023
1 parent b9220ee commit 46195a8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/register.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ Example:
size=(length(x), length(x))
eltype=eltype(x) # optional, will default to the promoted eltypes of x
end
```
You can also register calls on callable structs:
```julia
@register_array_symbolic (c::Conv)(x::AbstractMatrix) begin
size=size(x) .- size(c.kernel) .+ 1
eltype=promote_type(eltype(x), eltype(c))
end
```
"""
macro register_array_symbolic(expr, block)
f, ftype, argnames, Ts, ret_type = destructure_registration_expr(expr, :([]))
Expand Down

0 comments on commit 46195a8

Please sign in to comment.