Skip to content
Merged
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
11 changes: 7 additions & 4 deletions lib/node_modules/@stdlib/blas/base/ssymv/lib/ndarray.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

// MODULES //

var isMatrixTriangle = require( '@stdlib/blas/base/assert/is-matrix-triangle' );
var resolveStr = require( '@stdlib/blas/base/matrix-triangle-resolve-str' );
var format = require( '@stdlib/string/format' );
var base = require( './base.js' );

Expand All @@ -30,7 +30,7 @@ var base = require( './base.js' );
/**
* Performs the matrix-vector operation `y = α*A*x + β*y` where `α` and `β` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix.
*
* @param {string} uplo - specifies whether the upper or lower triangular part of the symmetric matrix `A` should be referenced
* @param {(integer|string)} uplo - specifies whether the upper or lower triangular part of the symmetric matrix `A` should be referenced
* @param {NonNegativeInteger} N - number of elements along each dimension of `A`
* @param {number} alpha - scalar constant
* @param {Float32Array} A - input matrix
Expand Down Expand Up @@ -63,7 +63,10 @@ var base = require( './base.js' );
* // y => <Float32Array>[ 10.0, 12.0, 14.0 ]
*/
function ssymv( uplo, N, alpha, A, strideA1, strideA2, offsetA, x, strideX, offsetX, beta, y, strideY, offsetY ) { // eslint-disable-line max-params, max-len
if ( !isMatrixTriangle( uplo ) ) {
var u;

u = resolveStr( uplo );
if ( u === null ) {
throw new TypeError( format( 'invalid argument. First argument must specify whether to reference the lower or upper triangular matrix. Value: `%s`.', uplo ) );
}
if ( N < 0 ) {
Expand All @@ -84,7 +87,7 @@ function ssymv( uplo, N, alpha, A, strideA1, strideA2, offsetA, x, strideX, offs
if ( N === 0 || ( alpha === 0.0 && beta === 1.0 ) ) {
return y;
}
return base( uplo, N, alpha, A, strideA1, strideA2, offsetA, x, strideX, offsetX, beta, y, strideY, offsetY ); // eslint-disable-line max-len
return base( u, N, alpha, A, strideA1, strideA2, offsetA, x, strideX, offsetX, beta, y, strideY, offsetY ); // eslint-disable-line max-len
}


Expand Down
10 changes: 6 additions & 4 deletions lib/node_modules/@stdlib/blas/base/ssymv/lib/ssymv.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
var max = require( '@stdlib/math/base/special/max' );
var stride2offset = require( '@stdlib/strided/base/stride2offset' );
var isLayout = require( '@stdlib/blas/base/assert/is-layout' );
var isMatrixTriangle = require( '@stdlib/blas/base/assert/is-matrix-triangle' );
var resolveStr = require( '@stdlib/blas/base/matrix-triangle-resolve-str' );
var format = require( '@stdlib/string/format' );
var base = require( './base.js' );

Expand All @@ -34,7 +34,7 @@ var base = require( './base.js' );
* Performs the matrix-vector operation `y = α*A*x + β*y` where `α` and `β` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix.
*
* @param {string} order - storage layout
* @param {string} uplo - specifies whether the upper or lower triangular part of the symmetric matrix `A` should be referenced
* @param {(integer|string)} uplo - specifies whether the upper or lower triangular part of the symmetric matrix `A` should be referenced
* @param {NonNegativeInteger} N - number of elements along each dimension of `A`
* @param {number} alpha - scalar constant
* @param {Float32Array} A - input matrix
Expand Down Expand Up @@ -67,11 +67,13 @@ function ssymv( order, uplo, N, alpha, A, LDA, x, strideX, beta, y, strideY ) {
var sa2;
var ox;
var oy;
var u;

if ( !isLayout( order ) ) {
throw new TypeError( format( 'invalid argument. First argument must be a valid order. Value: `%s`.', order ) );
}
if ( !isMatrixTriangle( uplo ) ) {
u = resolveStr( uplo );
if ( u === null ) {
throw new TypeError( format( 'invalid argument. Second argument must specify whether to reference the lower or upper triangular matrix. Value: `%s`.', uplo ) );
}
if ( N < 0 ) {
Expand All @@ -98,7 +100,7 @@ function ssymv( order, uplo, N, alpha, A, LDA, x, strideX, beta, y, strideY ) {
sa1 = LDA;
sa2 = 1;
}
return base( uplo, N, alpha, A, sa1, sa2, 0, x, strideX, ox, beta, y, strideY, oy ); // eslint-disable-line max-len
return base( u, N, alpha, A, sa1, sa2, 0, x, strideX, ox, beta, y, strideY, oy ); // eslint-disable-line max-len
}


Expand Down