Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var isRowMajor = require( '@stdlib/ndarray/base/assert/is-row-major' );
* Computes the Cartesian square for a strided accessor array.
*
* @private
* @param {NonNegativeInteger} N - number of indexed elements
* @param {PositiveInteger} N - number of indexed elements
* @param {Object} x - input array object
* @param {Collection} x.data - input array data
* @param {Array<Function>} x.accessors - array element accessors
Expand All @@ -41,7 +41,7 @@ var isRowMajor = require( '@stdlib/ndarray/base/assert/is-row-major' );
* @param {integer} strideOut1 - stride length for the first dimension of `out`
* @param {integer} strideOut2 - stride length for the second dimension of `out`
* @param {NonNegativeInteger} offsetOut - starting index for `out`
* @returns {Collection} output array
* @returns {Object} output array object
*
* @example
* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
Expand Down Expand Up @@ -86,7 +86,7 @@ function gcartesianSquare( N, x, strideX, offsetX, out, strideOut1, strideOut2,
}
ix += strideX;
}
return obuf;
return out;
}
// Column-major...
for ( i = 0; i < N; i++ ) { // Note: these loops inline the equivalent of `gfill` to avoid the overhead of intermediate object creation and accessor dispatch on each call...
Expand All @@ -106,7 +106,7 @@ function gcartesianSquare( N, x, strideX, offsetX, out, strideOut1, strideOut2,
io += strideOut1;
}
}
return obuf;
return out;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* Computes the Cartesian square for a strided array.
*
* @param {string} order - storage layout
* @param {NonNegativeInteger} N - number of indexed elements
* @param {PositiveInteger} N - number of indexed elements
* @param {Collection} x - input array
* @param {integer} strideX - stride length for `x`
* @param {Collection} out - output array
Expand Down Expand Up @@ -70,7 +70,7 @@
sa1 = LDO;
sa2 = 1;
}
return ndarray( N, x, strideX, stride2offset( N, strideX ), out, sa1, sa2, 0 );

Check warning on line 73 in lib/node_modules/@stdlib/blas/ext/base/gcartesian-square/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

This line has a length of 83. Maximum allowed is 80
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var accessors = require( './accessors.js' );
*
* - Pairs are stored as rows in the output matrix, where the first column contains the first element of each pair and the second column contains the second element.
*
* @param {NonNegativeInteger} N - number of indexed elements
* @param {PositiveInteger} N - number of indexed elements
* @param {Collection} x - input array
* @param {integer} strideX - stride length for `x`
* @param {NonNegativeInteger} offsetX - starting index for `x`
Expand Down Expand Up @@ -68,7 +68,8 @@ function gcartesianSquare( N, x, strideX, offsetX, out, strideOut1, strideOut2,
xobj = arraylike2object( x );
oobj = arraylike2object( out );
if ( xobj.accessorProtocol || oobj.accessorProtocol ) {
return accessors( N, xobj, strideX, offsetX, oobj, strideOut1, strideOut2, offsetOut ); // eslint-disable-line max-len
accessors( N, xobj, strideX, offsetX, oobj, strideOut1, strideOut2, offsetOut ); // eslint-disable-line max-len
return out;
}
ix = offsetX;
io = offsetOut;
Expand Down