Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ndarray/base/assert/is-single-segment-compatible/docs/types/index.d"

Index

Functions

Export assignment isSingleSegmentCompatible

  • isSingleSegmentCompatible(shape: ArrayLike<number>, strides: ArrayLike<number>, offset: number): boolean
  • Returns a boolean indicating if an array is compatible with a single memory segment.

    Parameters

    • shape: ArrayLike<number>

      array shape

    • strides: ArrayLike<number>

      stride array

    • offset: number

      index offset

    Returns boolean

    boolean indicating if an array is compatible with a single memory segment

    Example

    var shape = [ 2, 2 ];
    var strides = [ 2, 1 ];
    var offset = 0;
    
    var bool = isSingleSegmentCompatible( shape, strides, offset );
    // returns true

    Example

    var shape = [ 10 ];
    var strides = [ 3 ];
    var offset = 0;
    
    var bool = isSingleSegmentCompatible( shape, strides, offset );
    // returns false