Hi, I got a problem when I tried to use a static vector values as 0th index of the matrix: this is the code:
@ti.kernel
def streaming1():
for i,j,k in rho:
if (solid[i,j,k] == 0):
ci = ti.Vector([i,j,k])
for s in ti.static(range(19)):
ip = periodic_index(ci+e[s])
if (solid[ip]==0):
F[ip][s] = f[ci][s]
else:
F[ci][LR[s]] = f[ci][s]
The compiler said this line got problem: F[ci][LR[s]] = f[ci][s], the 0-th index should be compiler time constant, Actually I have defined LR as a compiler time constant vector using ti.static(LR), why I still got this message? If I still want the compiler to unroll the loop to gain performance, what should I do? Thank you very much!