Naroxar
Naroxar
MModular
Created by Naroxar on 12/16/2023 in #questions
simd_load of Tensor with StaticIntTuple
How is simd_load of Tensor type supposed to work with multiple indices? This example
test = Tensor[float_type](10)
for i in range(10):
test[i] = i

indices = StaticIntTuple[4](1,3,5,6)
vals = test.simd_load[4](indices)

for i in range(4):
print(vals[i], test[indices[i]])
test = Tensor[float_type](10)
for i in range(10):
test[i] = i

indices = StaticIntTuple[4](1,3,5,6)
vals = test.simd_load[4](indices)

for i in range(4):
print(vals[i], test[indices[i]])
gives
6.0 1.0
7.0 3.0
8.0 5.0
9.0 6.0
6.0 1.0
7.0 3.0
8.0 5.0
9.0 6.0
It simply seems to take the last entry of "indices" and load the next 4 elements. It is not clear (to me at least 🙂 ) what this is supposed to give from the documentation.
2 replies