Why should width be explicitly mentioned in SIMD #2330
-
In this code
I see that the result is: But I get for
This result It took quite a while to figure that out. Is this a bug or does it make sense that we need to be this explicit with the width? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I would call that a bug. Mojo appears to be calling the overloaded According to the manual's rules:
The load method of |
Beta Was this translation helpful? Give feedback.
I would call that a bug.
Mojo appears to be calling the overloaded
load
method ofload[len: Int, width: Int](self: Self, indices: StaticIntTuple[len]) -> SIMD[dtype, width]
which it should not.According to the manual's rules:
The load method of
load[width: Int](self: Self, index: Int) -> SIMD[dtype, width]
should have been called because rule 1 should have been applied.