Skip to content

Commit

Permalink
chore: apply review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-095 committed May 22, 2024
1 parent 9a70c57 commit 454131b
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 47 deletions.
18 changes: 9 additions & 9 deletions lib/node_modules/@stdlib/blas/base/csrot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.

# csrot

> Applies a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
> Applies a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.
<section class="usage">

Expand All @@ -32,7 +32,7 @@ var csrot = require( '@stdlib/blas/base/csrot' );

#### csrot( N, cx, strideX, cy, strideY, c, s )

Applies a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
Applies a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.

```javascript
var Complex64Array = require( '@stdlib/array/complex64' );
Expand Down Expand Up @@ -284,7 +284,7 @@ console.log( cy.get( cy.length-1 ).toString() );

#### c_csrot( N, \*X, strideX, \*Y, strideY, c, s )

Applies a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
Applies a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.

```c
float x[] = { 1.0f, 2.0f, 3.0f, 4.0f }; // interleaved real and imaginary components
Expand All @@ -304,7 +304,7 @@ The function accepts the following arguments:
- **s**: `[in] float` sine of the angle of rotation.
```c
void c_csrot( const CBLAS_INT N, void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY, const float c, const float s );
void c_csrot( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, void *CY, const CBLAS_INT strideY, const float c, const float s );
```

</section>
Expand All @@ -331,8 +331,8 @@ void c_csrot( const CBLAS_INT N, void *X, const CBLAS_INT strideX, void *Y, cons

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

// Specify the number of elements:
const int N = 4;
Expand All @@ -342,12 +342,12 @@ int main( void ) {
const int strideY = -1;

// Copy elements:
c_csrot( N, (void *)cx, strideX, (void *)cy, strideY, 0.8, 0.6 );
c_csrot( N, (void *)x, strideX, (void *)y, strideY, 0.8f, 0.6f );

// Print the result:
for ( int i = 0; i < N; i++ ) {
printf( "cx[ %i ] = %f + %fj\n", i, cx[ i*2 ], cx[ (i*2)+1 ] );
printf( "cy[ %i ] = %f + %fj\n", i, cy[ i*2 ], cy[ (i*2)+1 ] );
printf( "x[ %i ] = %f + %fj\n", i, x[ i*2 ], x[ (i*2)+1 ] );
printf( "y[ %i ] = %f + %fj\n", i, y[ i*2 ], y[ (i*2)+1 ] );
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ double benchmark( int iterations, int len ) {
}
t = tic();
for ( i = 0; i < iterations; i++ ) {
c_csrot( len, (void *)x, 1, (void *)y, 1, 0.8, 0.6 );
c_csrot( len, (void *)x, 1, (void *)y, 1, 0.8f, 0.6f );
if ( y[ 0 ] != y[ 0 ] ) {
printf( "should not return NaN\n" );
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ int main( void ) {
const int strideX = 1;
const int strideY = -1;

c_csrot( N, (void *)x, strideX, (void *)y, strideY, 0.8, 0.6 );
c_csrot( N, (void *)x, strideX, (void *)y, strideY, 0.8f, 0.6f );

// Print the result:
for ( int i = 0; i < N; i++ ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ extern "C" {
#endif

/**
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.
*/
void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY, const float c, const float s );
void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, void *CY, const CBLAS_INT strideY, const float c, const float s );

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ extern "C" {
#endif

/**
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.
*/
void API_SUFFIX(cblas_csrot)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY, const float c, const float s );
void API_SUFFIX(cblas_csrot)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, void *CY, const CBLAS_INT strideY, const float c, const float s );

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C" {
#endif

/**
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.
*/
void csrot( const CBLAS_INT *, void *, const CBLAS_INT *, void *, const CBLAS_INT *, const float *, const float * );

Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/csrot/lib/csrot.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' );
// MAIN //

/**
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.
*
* @param {PositiveInteger} N - number of indexed elements
* @param {Complex64Array} cx - first input array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var addon = require( './../src/addon.node' );
// MAIN //

/**
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.
*
* @param {PositiveInteger} N - number of indexed elements
* @param {Complex64Array} cx - first input array
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/csrot/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'use strict';

/**
* BLAS level 1 routine to apply a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
* BLAS level 1 routine to apply a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.
*
* @module @stdlib/blas/base/csrot
*
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/csrot/lib/ndarray.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' );
// MAIN //

/**
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.
*
* @param {PositiveInteger} N - number of indexed elements
* @param {Complex64Array} cx - first input array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var addon = require( './../src/addon.node' );
// MAIN //

/**
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.
*
* @param {PositiveInteger} N - number of indexed elements
* @param {Complex64Array} cx - first input array
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/csrot/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/base/csrot",
"version": "0.0.0",
"description": "Apply a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.",
"description": "Apply a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
6 changes: 3 additions & 3 deletions lib/node_modules/@stdlib/blas/base/csrot/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 4 );
STDLIB_NAPI_ARGV_FLOAT( env, c, argv, 5 );
STDLIB_NAPI_ARGV_FLOAT( env, s, argv, 6 );
STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, X, N, strideX, argv, 1 );
STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, Y, N, strideY, argv, 3 );
API_SUFFIX(c_csrot)( N, (void *)X, strideX, (void *)Y, strideY, c, s );
STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, CX, N, strideX, argv, 1 );
STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, CY, N, strideY, argv, 3 );
API_SUFFIX(c_csrot)( N, (void *)CX, strideX, (void *)CY, strideY, c, s );
return NULL;
}

Expand Down
16 changes: 8 additions & 8 deletions lib/node_modules/@stdlib/blas/base/csrot/src/csrot.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
#include "stdlib/blas/base/shared.h"

/**
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.
*
* @param N number of indexed elements
* @param X first input array
* @param strideX X stride length
* @param Y second input array
* @param strideY Y stride length
* @param CX first input array
* @param strideX CX stride length
* @param CY second input array
* @param strideY CY stride length
* @param c cosine of the angle of rotation
* @param s sine of the angle of rotation
*/
void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY, const float c, const float s ) {
float *x = (float *)X;
float *y = (float *)Y;
void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, void *CY, const CBLAS_INT strideY, const float c, const float s ) {
float *x = (float *)CX;
float *y = (float *)CY;
float tmp1;
float tmp2;
CBLAS_INT ix;
Expand Down
14 changes: 7 additions & 7 deletions lib/node_modules/@stdlib/blas/base/csrot/src/csrot_cblas.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
#include "stdlib/blas/base/shared.h"

/**
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.
*
* @param N number of indexed elements
* @param X first input array
* @param strideX X stride length
* @param Y second input array
* @param strideY Y stride length
* @param CX first input array
* @param strideX CX stride length
* @param CY second input array
* @param strideY CY stride length
* @param c cosine of the angle of rotation
* @param s sine of the angle of rotation
*/
void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY, const float c, const float s ) {
API_SUFFIX(cblas_csrot)( N, X, strideX, Y, strideY, c, s );
void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, void *CY, const CBLAS_INT strideY, const float c, const float s ) {
API_SUFFIX(cblas_csrot)( N, CX, strideX, CY, strideY, c, s );
}
14 changes: 7 additions & 7 deletions lib/node_modules/@stdlib/blas/base/csrot/src/csrot_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
#include "stdlib/blas/base/shared.h"

/**
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are single-precision floating-point vectors.
* Applies a plane rotation where the cos and sin (c and s) are real and the vectors are complex single-precision floating-point vectors.
*
* @param N number of indexed elements
* @param X first input array
* @param strideX X stride length
* @param Y second input array
* @param strideY Y stride length
* @param CX first input array
* @param strideX CX stride length
* @param CY second input array
* @param strideY CY stride length
* @param c cosine of the angle of rotation
* @param s sine of the angle of rotation
*/
void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY, const float c, const float s ) {
csrot( &N, X, &strideX, Y, &strideY, &c, &s );
void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, void *CY, const CBLAS_INT strideY, const float c, const float s ) {
csrot( &N, CX, &strideX, CY, &strideY, &c, &s );
}

0 comments on commit 454131b

Please sign in to comment.