How to address not a full span of ArrayFire within gFor

  arrayfire, c++, indexing

If I use A(i, span) = A(i, span) + 1; within gfor it works.
But what if I want to use a limited range instead of a full span of a dimension:

gfor(seq i, A.elements()) {
     A(i, span) = A(i, span) + 1;               // this works
     A(i, i+3) = A(i, i+3) + 1;                 // compile error
     A(i, seq(i, i+3)) = A(i, seq(i, i+3)) + 1; // compile error
}

Thanks.

Source: Windows Questions C++

LEAVE A COMMENT