How to address not a full span of ArrayFire within gFor

68 views Asked by At

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.

0

There are 0 answers