Skip to content

Commit fa335a1

Browse files
authored
Transform VecElement-contained values. (#123)
1 parent a7f6021 commit fa335a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/transform.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@ end
2525

2626
@inline (transf::Elementwise)(x, tile) = transf.func.(x)
2727

28+
# when dealing with tuples of VecElements, transform the contained values
29+
@inline (transf::Elementwise)(x::NTuple{N, <:VecElement}, tile) where {N} =
30+
ntuple(i->VecElement(transf.func(x[i].value)), Val(N))
31+
2832
end

0 commit comments

Comments
 (0)