Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Apr 27, 2024
1 parent 36cede4 commit a9a3a36
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/stdlib/blas/base/dnrm2.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern "C" {
/**
* Computes the L2-norm of a double-precision floating-point vector.
*/
double c_dnrm2( const CBLAS_INT N, const double *X, const CBLAS_INT stride );
double API_SUFFIX(c_dnrm2)( const CBLAS_INT N, const double *X, const CBLAS_INT stride );

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion include/stdlib/blas/base/dnrm2_cblas.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern "C" {
/**
* Computes the L2-norm of a double-precision floating-point vector.
*/
double cblas_dnrm2( const CBLAS_INT N, const double *X, const CBLAS_INT stride );
double API_SUFFIX(cblas_dnrm2)( const CBLAS_INT N, const double *X, const CBLAS_INT stride );

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion include/stdlib/blas/base/dnrm2_fortran.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extern "C" {
/**
* Computes the L2-norm of a double-precision floating-point vector.
*/
void dnrm2sub( const int *, const double *, const int *, double * );
void dnrm2sub( const CBLAS_INT *, const double *, const CBLAS_INT *, double * );

#ifdef __cplusplus
}
Expand Down
3 changes: 2 additions & 1 deletion src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#include "stdlib/blas/base/dnrm2.h"
#include "stdlib/blas/base/shared.h"
#include "stdlib/napi/export.h"
#include "stdlib/napi/argv.h"
#include "stdlib/napi/argv_int64.h"
Expand All @@ -37,7 +38,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 );
STDLIB_NAPI_CREATE_DOUBLE( env, c_dnrm2( N, X, strideX ), v );
STDLIB_NAPI_CREATE_DOUBLE( env, API_SUFFIX(c_dnrm2)( N, X, strideX ), v );
return v;
}

Expand Down
2 changes: 1 addition & 1 deletion src/dnrm2.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @param stride stride length
* @return L2-norm
*/
double c_dnrm2( const CBLAS_INT N, const double *X, const CBLAS_INT stride ) {
double API_SUFFIX(c_dnrm2)( const CBLAS_INT N, const double *X, const CBLAS_INT stride ) {
double scale;
double ssq;
double ax;
Expand Down
4 changes: 2 additions & 2 deletions src/dnrm2_cblas.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
* @param stride stride length
* @return L2-norm
*/
double c_dnrm2( const CBLAS_INT N, const double *X, const CBLAS_INT stride ) {
return cblas_dnrm2( N, X, stride );
double API_SUFFIX(c_dnrm2)( const CBLAS_INT N, const double *X, const CBLAS_INT stride ) {
return API_SUFFIX(cblas_dnrm2)( N, X, stride );
}
2 changes: 1 addition & 1 deletion src/dnrm2_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @param stride stride length
* @return L2-norm
*/
double c_dnrm2( const CBLAS_INT N, const double *X, const CBLAS_INT stride ) {
double API_SUFFIX(c_dnrm2)( const CBLAS_INT N, const double *X, const CBLAS_INT stride ) {
double nrm2;
dnrm2sub( &N, X, &stride, &nrm2 );
return nrm2;
Expand Down

0 comments on commit a9a3a36

Please sign in to comment.