Skip to content

Commit 97dfb64

Browse files
authored
chore: minor clean-up
Signed-off-by: Shabareesh Shetty <[email protected]>
1 parent 3491219 commit 97dfb64

File tree

1 file changed

+9
-2
lines changed
  • lib/node_modules/@stdlib/blas/base/dsyr2/src

1 file changed

+9
-2
lines changed

lib/node_modules/@stdlib/blas/base/dsyr2/src/dsyr2.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
* @param LDA stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
3737
*/
3838
void API_SUFFIX(c_dsyr2)( const CBLAS_LAYOUT layout, const CBLAS_UPLO uplo, const CBLAS_INT N, const double alpha, const double *X, const CBLAS_INT strideX, const double *Y, const CBLAS_INT strideY, double *A, const CBLAS_INT LDA ) {
39+
CBLAS_INT vala;
3940
CBLAS_INT sa1;
4041
CBLAS_INT sa2;
4142
CBLAS_INT ox;
@@ -62,8 +63,14 @@ void API_SUFFIX(c_dsyr2)( const CBLAS_LAYOUT layout, const CBLAS_UPLO uplo, cons
6263
c_xerbla( 8, "c_dsyr2", "Error: invalid argument. Eighth argument must be nonzero. Value: `%d`.", strideX );
6364
return;
6465
}
65-
if ( LDA < N ) {
66-
c_xerbla( 10, "c_dsyr2", "Error: invalid argument. Tenth argument must be greater than or equal to max(1,%d). Value: `%d`.", N, LDA );
66+
// max(1, N)
67+
if ( N < 1 ) {
68+
vala = 1;
69+
} else {
70+
vala = N;
71+
}
72+
if ( LDA < vala ) {
73+
c_xerbla( 10, "c_dsyr2", "Error: invalid argument. Tenth argument must be greater than or equal to max(1,%d). Value: `%d`.", vala, LDA );
6774
return;
6875
}
6976
// Check whether we can avoid computation altogether...

0 commit comments

Comments
 (0)