public int currentElement ( ) { int value = offset ; // NB: dont have to check each index again for ( int ii = 0 ; ii < rank ; ii ++ ) { // general rank if ( shape [ ii ] < 0 ) break ; //vlen value += current [ ii ] * stride [ ii ] ; } return value ; }
Get the current element s index into the 1D backing array . VLEN stops processing .