I know that @Vector
can be used for element-wise operations. However, the vectors must have comptime known size. What if I want to do calculations on inputs that are not known at comptime? let’s say image data that is provided by the user?
You can have a @Vector
size suitable for your cpu. Then load up to the vector size elements from input, calculate, and loop.
1 Like