I have lots of problems using for in GPU computing becuse it take a huge amount of time (as u know). My kind of loop is particular because the step n depends from n-1 n-2 .... n-m. Here is the code which gives the idea of problem:
For CPU is all ok but if I put
I have trouble with time. I tried using arrayfun but thre is no way to realize the "previous-steps-dependence". So please help me.