Skip to content

Commit d466893

Browse files
committed
fix: test case errors
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 441ce2e commit d466893

File tree

5 files changed

+44
-8
lines changed

5 files changed

+44
-8
lines changed

lib/node_modules/@stdlib/blas/base/dsyr2/manifest.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"@stdlib/napi/argv-int64",
5252
"@stdlib/napi/argv-int32",
5353
"@stdlib/napi/argv-strided-float64array",
54+
"@stdlib/napi/argv-strided-float64array2d",
5455
"@stdlib/ndarray/base/assert/is-row-major"
5556
]
5657
},
@@ -117,6 +118,7 @@
117118
"@stdlib/napi/argv-int64",
118119
"@stdlib/napi/argv-int32",
119120
"@stdlib/napi/argv-strided-float64array",
121+
"@stdlib/napi/argv-strided-float64array2d",
120122
"@stdlib/napi/argv-double"
121123
]
122124
},
@@ -182,6 +184,7 @@
182184
"@stdlib/napi/argv-int64",
183185
"@stdlib/napi/argv-int32",
184186
"@stdlib/napi/argv-strided-float64array",
187+
"@stdlib/napi/argv-strided-float64array2d",
185188
"@stdlib/napi/argv-double"
186189
]
187190
},
@@ -246,6 +249,7 @@
246249
"@stdlib/napi/argv-int64",
247250
"@stdlib/napi/argv-int32",
248251
"@stdlib/napi/argv-strided-float64array",
252+
"@stdlib/napi/argv-strided-float64array2d",
249253
"@stdlib/napi/argv-double",
250254
"@stdlib/strided/base/stride2offset",
251255
"@stdlib/ndarray/base/assert/is-row-major"

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

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "stdlib/napi/argv_int32.h"
2525
#include "stdlib/napi/argv_double.h"
2626
#include "stdlib/napi/argv_strided_float64array.h"
27+
#include "stdlib/napi/argv_strided_float64array2d.h"
2728
#include <node_api.h>
2829

2930
/**
@@ -55,4 +56,36 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
5556
return NULL;
5657
}
5758

58-
STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
59+
/**
60+
* Receives JavaScript callback invocation data.
61+
*
62+
* @param env environment under which the function is invoked
63+
* @param info callback data
64+
* @return Node-API value
65+
*/
66+
static napi_value addon_method( napi_env env, napi_callback_info info ) {
67+
STDLIB_NAPI_ARGV( env, info, argv, argc, 13 );
68+
69+
STDLIB_NAPI_ARGV_INT32( env, uplo, argv, 0 );
70+
71+
STDLIB_NAPI_ARGV_INT64( env, N, argv, 1 );
72+
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 4 );
73+
STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 5 );
74+
STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 7 );
75+
STDLIB_NAPI_ARGV_INT64( env, offsetY, argv, 8 );
76+
STDLIB_NAPI_ARGV_INT64( env, strideA1, argv, 10 );
77+
STDLIB_NAPI_ARGV_INT64( env, strideA2, argv, 11 );
78+
STDLIB_NAPI_ARGV_INT64( env, offsetA, argv, 12 );
79+
80+
STDLIB_NAPI_ARGV_DOUBLE( env, alpha, argv, 2 );
81+
82+
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 3 );
83+
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, N, strideY, argv, 6 );
84+
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY2D( env, A, N, N, strideA1, strideA2, argv, 9 );
85+
86+
API_SUFFIX(c_dsyr2_ndarray)( uplo, N, alpha, X, strideX, offsetX, Y, strideY, offsetY, A, strideA1, strideA2, offsetA );
87+
88+
return NULL;
89+
}
90+
91+
STDLIB_NAPI_MODULE_EXPORT_FCN_WITH_METHOD( addon, "ndarray", addon_method )

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void API_SUFFIX(c_dsyr2_ndarray)( const CBLAS_UPLO uplo, const CBLAS_INT N, cons
110110
iy1 = oy;
111111
if (
112112
( isrm && uplo == CblasLower ) ||
113-
( isrm && uplo == CblasUpper )
113+
( !isrm && uplo == CblasUpper )
114114
) {
115115
for ( i1 = 0; i1 < N; i1++ ) {
116116
if ( ( X[ ix1 ] != 0.0 ) || ( Y[ iy1 ] != 0.0 ) ) {

lib/node_modules/@stdlib/blas/base/dsyr2/test/test.dsyr2.native.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var cxnyn = require( './fixtures/column_major_xnyn.json' );
4949

5050
// VARIABLES //
5151

52-
var dsyr2 = tryRequire( resolve( __dirname, './../lib/dsyr.native.js' ) );
52+
var dsyr2 = tryRequire( resolve( __dirname, './../lib/dsyr2.native.js' ) );
5353
var opts = {
5454
'skip': ( dsyr2 instanceof Error )
5555
};
@@ -63,8 +63,8 @@ tape( 'main export is a function', opts, function test( t ) {
6363
t.end();
6464
});
6565

66-
tape( 'the function has an arity of 8', opts, function test( t ) {
67-
t.strictEqual( dsyr2.length, 8, 'returns expected value' );
66+
tape( 'the function has an arity of 10', opts, function test( t ) {
67+
t.strictEqual( dsyr2.length, 10, 'returns expected value' );
6868
t.end();
6969
});
7070

lib/node_modules/@stdlib/blas/base/dsyr2/test/test.ndarray.native.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ tape( 'main export is a function', opts, function test( t ) {
7474
t.end();
7575
});
7676

77-
tape( 'the function has an arity of 10', opts, function test( t ) {
78-
t.strictEqual( dsyr2.length, 10, 'returns expected value' );
77+
tape( 'the function has an arity of 13', opts, function test( t ) {
78+
t.strictEqual( dsyr2.length, 13, 'returns expected value' );
7979
t.end();
8080
});
8181

@@ -700,6 +700,5 @@ tape( 'the function supports complex access patterns (column-major)', function t
700700
out = dsyr2( str2enumMatrixTriangle( data.uplo ), data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
701701
t.strictEqual( out, a, 'returns expected value' );
702702
t.deepEqual( out, expected, 'returns expected value' );
703-
704703
t.end();
705704
});

0 commit comments

Comments
 (0)