Skip to content

Commit

Permalink
style: update to use tabs for indentation
Browse files Browse the repository at this point in the history
---
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: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: passed
  - task: lint_c_examples
    status: passed
  - task: lint_c_benchmarks
    status: passed
  - 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
---
  • Loading branch information
Planeshifter committed Dec 23, 2024
1 parent 8553770 commit 6a0d6b8
Show file tree
Hide file tree
Showing 40 changed files with 502 additions and 501 deletions.
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/cscal/src/cscal_cblas.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void API_SUFFIX(c_cscal_ndarray)( const CBLAS_INT N, const stdlib_complex64_t ca
stdlib_complex64_t *cx = (stdlib_complex64_t *)CX;
CBLAS_INT sx = strideX;

cx += stdlib_strided_min_view_buffer_index( N, strideX, offsetX );
cx += stdlib_strided_min_view_buffer_index( N, strideX, offsetX );
if ( sx < 0 ) {
sx = -sx;
}
Expand Down
8 changes: 4 additions & 4 deletions lib/node_modules/@stdlib/blas/base/sdsdot/src/sdsdot_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/

/**
* Compute the dot product of two single-precision floating-point vectors with extended accumulation.
*
* @see <a href="http://www.netlib.org/lapack/expolore-html/df/d28/group__single__blas__level1.html">sdsdot</a>
*/
* Compute the dot product of two single-precision floating-point vectors with extended accumulation.
*
* @see <a href="http://www.netlib.org/lapack/expolore-html/df/d28/group__single__blas__level1.html">sdsdot</a>
*/
#include "stdlib/blas/base/sdsdot.h"
#include "stdlib/blas/base/sdsdot_fortran.h"
#include "stdlib/blas/base/shared.h"
Expand Down
44 changes: 22 additions & 22 deletions lib/node_modules/@stdlib/blas/base/srotm/examples/c/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,33 @@
#include <stdio.h>

int main( void ) {
// Create strided arrays:
float x[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f };
float y[] = { 6.0f, 7.0f, 8.0f, 9.0f, 10.0f };
// Create strided arrays:
float x[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f };
float y[] = { 6.0f, 7.0f, 8.0f, 9.0f, 10.0f };

// Specify the number of elements:
const int N = 5;
// Specify the number of elements:
const int N = 5;

// Specify stride lengths:
const int strideX = 1;
const int strideY = 1;
// Specify stride lengths:
const int strideX = 1;
const int strideY = 1;

// Specify parameters for the modified Givens transformation:
const float param[5] = { 0.0f, 0.0f, 2.0f, -3.0f, 0.0f };
// Specify parameters for the modified Givens transformation:
const float param[5] = { 0.0f, 0.0f, 2.0f, -3.0f, 0.0f };

// Apply plane rotation:
c_srotm( N, x, strideX, y, strideY, param );
// Apply plane rotation:
c_srotm( N, x, strideX, y, strideY, param );

// Print the result:
for ( int i = 0; i < 5; i++ ) {
printf( "x[ %i ] = %f, y[ %i ] = %f\n", i, x[ i ], i, y[ i ] );
}
// Print the result:
for ( int i = 0; i < 5; i++ ) {
printf( "x[ %i ] = %f, y[ %i ] = %f\n", i, x[ i ], i, y[ i ] );
}

// Apply plane rotation:
c_srotm_ndarray( N, x, -strideX, N-1, y, -strideY, N-1, param );
// Apply plane rotation:
c_srotm_ndarray( N, x, -strideX, N-1, y, -strideY, N-1, param );

// Print the result:
for ( int i = 0; i < 5; i++ ) {
printf( "x[ %i ] = %f, y[ %i ] = %f\n", i, x[ i ], i, y[ i ] );
}
// Print the result:
for ( int i = 0; i < 5; i++ ) {
printf( "x[ %i ] = %f, y[ %i ] = %f\n", i, x[ i ], i, y[ i ] );
}
}
20 changes: 10 additions & 10 deletions lib/node_modules/@stdlib/blas/ext/base/dapxsumkbn2/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
* @return Node-API value
*/
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_DOUBLE( env, alpha, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 2 );
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_DOUBLE( env, alpha, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 2 );
STDLIB_NAPI_CREATE_DOUBLE( env, API_SUFFIX(stdlib_strided_dapxsumkbn2)( N, alpha, X, strideX ), v );
return v;
}
Expand All @@ -51,12 +51,12 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
* @return Node-API value
*/
static napi_value addon_method( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 5 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_DOUBLE( env, alpha, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
STDLIB_NAPI_ARGV( env, info, argv, argc, 5 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_DOUBLE( env, alpha, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 4 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 2 );
STDLIB_NAPI_CREATE_DOUBLE( env, API_SUFFIX(stdlib_strided_dapxsumkbn2_ndarray)( N, alpha, X, strideX, offsetX ), v );
return v;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @return Node-API value
*/
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 6 );
STDLIB_NAPI_ARGV( env, info, argv, argc, 6 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_DOUBLE( env, sum, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
Expand Down
22 changes: 11 additions & 11 deletions lib/node_modules/@stdlib/blas/ext/base/dnannsumpw/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@
* @return Node-API value
*/
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 5 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
STDLIB_NAPI_ARGV_INT64( env, strideOut, argv, 4 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Out, 2, strideOut, argv, 3 );
STDLIB_NAPI_ARGV( env, info, argv, argc, 5 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
STDLIB_NAPI_ARGV_INT64( env, strideOut, argv, 4 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Out, 2, strideOut, argv, 3 );

int64_t io = stdlib_strided_stride2offset( 2, strideOut );
CBLAS_INT n;
Out[ io ] = API_SUFFIX(stdlib_strided_dnannsumpw)( N, X, strideX, &n );
Out[ io + strideOut ] = (double)n;
int64_t io = stdlib_strided_stride2offset( 2, strideOut );
CBLAS_INT n;
Out[ io ] = API_SUFFIX(stdlib_strided_dnannsumpw)( N, X, strideX, &n );
Out[ io + strideOut ] = (double)n;

return NULL;
return NULL;
}

/**
Expand Down
18 changes: 9 additions & 9 deletions lib/node_modules/@stdlib/blas/ext/base/dsort2sh/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@
* @return Node-API value
*/
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 6 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_DOUBLE( env, order, argv, 1 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, order, argv, 2 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, N, order, argv, 4 );
STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 5 );
STDLIB_NAPI_ARGV( env, info, argv, argc, 6 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_DOUBLE( env, order, argv, 1 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, order, argv, 2 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, N, order, argv, 4 );
STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 5 );

c_dsort2sh( N, order, X, strideX, Y, strideY );
c_dsort2sh( N, order, X, strideX, Y, strideY );

return NULL;
return NULL;
}

STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
16 changes: 8 additions & 8 deletions lib/node_modules/@stdlib/blas/ext/base/snansumkbn/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
* @return Node-API value
*/
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 3 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 1 );
STDLIB_NAPI_ARGV( env, info, argv, argc, 3 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 1 );

napi_value v;
napi_status status = napi_create_double( env, stdlib_strided_snansumkbn( N, X, stride ), &v );
assert( status == napi_ok );
napi_value v;
napi_status status = napi_create_double( env, stdlib_strided_snansumkbn( N, X, stride ), &v );
assert( status == napi_ok );

return v;
return v;
}

STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
16 changes: 8 additions & 8 deletions lib/node_modules/@stdlib/blas/ext/base/snansumkbn2/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
* @return Node-API value
*/
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 3 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 1 );
STDLIB_NAPI_ARGV( env, info, argv, argc, 3 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 1 );

napi_value v;
napi_status status = napi_create_double( env, stdlib_strided_snansumkbn2( N, X, stride ), &v );
assert( status == napi_ok );
napi_value v;
napi_status status = napi_create_double( env, stdlib_strided_snansumkbn2( N, X, stride ), &v );
assert( status == napi_ok );

return v;
return v;
}

STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#include <stdbool.h>

int main( void ) {
double x;
bool v;
int i;
for ( i = 0; i < 100; i++ ) {
x = ( ( (double)rand() / (double)RAND_MAX ) * 100.0 ) - 50.0;
v = stdlib_base_is_integer( x );
printf( "x = %lf, is_integer(x) = %s\n", x, ( v ) ? "true" : "false" );
}
double x;
bool v;
int i;

for ( i = 0; i < 100; i++ ) {
x = ( ( (double)rand() / (double)RAND_MAX ) * 100.0 ) - 50.0;
v = stdlib_base_is_integer( x );
printf( "x = %lf, is_integer(x) = %s\n", x, ( v ) ? "true" : "false" );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#include <stdio.h>

int main( void ) {
const double x[] = { -1.0, -0.78, -0.56, -0.33, -0.11, 0.11, 0.33, 0.56, 0.78, 1.0 };
const double x[] = { -1.0, -0.78, -0.56, -0.33, -0.11, 0.11, 0.33, 0.56, 0.78, 1.0 };

double v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_acos( x[ i ] );
printf( "acos(%lf) = %lf\n", x[ i ], v );
}
double v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_acos( x[ i ] );
printf( "acos(%lf) = %lf\n", x[ i ], v );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#include <stdio.h>

int main( void ) {
const double x[] = { 1.0, 1.45, 1.89, 2.33, 2.78, 3.22, 3.66, 4.11, 4.55, 5.0 };
const double x[] = { 1.0, 1.45, 1.89, 2.33, 2.78, 3.22, 3.66, 4.11, 4.55, 5.0 };

double v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_acosh( x[ i ] );
printf( "acosh(%lf) = %lf\n", x[ i ], v );
}
double v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_acosh( x[ i ] );
printf( "acosh(%lf) = %lf\n", x[ i ], v );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
* // returns ~0.5493
*/
double stdlib_base_acoth( const double x ) {
return stdlib_base_atanh( 1.0 / x );
return stdlib_base_atanh( 1.0 / x );
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
* // returns ~1.5708
*/
double stdlib_base_acovercos( const double x ) {
return stdlib_base_asin( 1.0 + x );
return stdlib_base_asin( 1.0 + x );
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
* // returns ~3.1416
*/
double stdlib_base_ahavercos( const double x ) {
return 2.0 * stdlib_base_acos( stdlib_base_sqrt( x ) );
return 2.0 * stdlib_base_acos( stdlib_base_sqrt( x ) );
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#include <stdio.h>

int main( void ) {
const double x[] = { -5.0, -3.89, -2.78, -1.67, -0.56, 0.56, 1.67, 2.78, 3.89, 5.0 };
const double x[] = { -5.0, -3.89, -2.78, -1.67, -0.56, 0.56, 1.67, 2.78, 3.89, 5.0 };

double v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_cosh( x[ i ] );
printf( "cosh(%lf) = %lf\n", x[ i ], v );
}
double v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_cosh( x[ i ] );
printf( "cosh(%lf) = %lf\n", x[ i ], v );
}
}
Loading

1 comment on commit 6a0d6b8

@kgryte
Copy link
Member

@kgryte kgryte commented on 6a0d6b8 Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Planeshifter Thanks for fixing all these. Hopefully, now that we have EditorConfig linting, we'll start catching these before merge.

Please sign in to comment.