0

i have one problem. Y have a 3d ArrayFire array and i need to shift each slice in a determinated amount. ArrayFire comes with a function to do this but i dont undestand some things. the code is something like this, but dont seems to work i think i'm doing something ilegal assigning the shi array to the f.slice(i). de array V is shift in x an y direccionts.

array shi;

shi = shift( f.slice(i) , V[0][i] ,  V[1][i]  );
f.slice(i) = shi.copy();

Any help is really apreciated /* sorry for my not so good english */

Thanks!

RolandDeschain
  • 483
  • 1
  • 4
  • 17

1 Answers1

1

I think all you need to do is this:

f(span, span, i) = shift(f(span, span, i), v[0][i], v[1][i]);
Pavan Yalamanchili
  • 12,021
  • 2
  • 35
  • 55