array shape
stride array
index offset
boolean indicating if an array is row-major contiguous
var shape = [ 2, 2 ];
var strides = [ 2, 1 ];
var offset = 0;
var bool = isRowMajorContiguous( shape, strides, offset );
// returns true
var shape = [ 2, 2 ];
var strides = [ -2, 1 ];
var offset = 2;
var bool = isRowMajorContiguous( shape, strides, offset );
// returns false
var shape = [ 2, 2 ];
var strides = [ 2, 2 ];
var offset = 0;
var bool = isRowMajorContiguous( shape, strides, offset );
// returns false
Returns a boolean indicating if an array is row-major contiguous.