static private long computeStrides ( int [ ] shape , int [ ] stride ) { long product = 1 ; for ( int ii = shape . length - 1 ; ii >= 0 ; ii -- ) { final int thisDim = shape [ ii ] ; if ( thisDim < 0 ) continue ; // ignore vlen stride [ ii ] = ( int ) product ; product *= thisDim ; } return product ; }
Compute standard strides based on array s shape . Ignore vlen