diff --git a/lib/node_modules/@stdlib/blas/base/csrot/README.md b/lib/node_modules/@stdlib/blas/base/csrot/README.md index 7a66a0100ddd..d198ee8617f0 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/README.md +++ b/lib/node_modules/@stdlib/blas/base/csrot/README.md @@ -312,6 +312,33 @@ The function accepts the following arguments: 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 ); ``` +#### c_csrot_ndarray( N, \*X, strideX, offsetX, \*Y, strideY, offsetY, c, s ) + +Applies a plane rotation using alternative indexing semantics. + +```c +float x[] = { 1.0f, 2.0f, 3.0f, 4.0f }; // interleaved real and imaginary components +float y[] = { 5.0f, 6.0f, 7.0f, 8.0f }; + +c_csrot_ndarray( 2, (void *)x, 1, 0, (void *)y, 1, 0, 0.8f, 0.6f ); +``` + +The function accepts the following arguments: + +- **N**: `[in] CBLAS_INT` number of indexed elements. +- **CX**: `[inout] void*` first input array. +- **strideX**: `[in] CBLAS_INT` index increment for `CX`. +- **offsetX**: `[in] CBLAS_INT` starting index for `CX`. +- **CY**: `[inout] void*` second input array. +- **strideY**: `[in] CBLAS_INT` index increment for `CY`. +- **offsetY**: `[in] CBLAS_INT` starting index for `CY`. +- **c**: `[in] float` cosine of the angle of rotation. +- **s**: `[in] float` sine of the angle of rotation. + +```c +void c_csrot_ndarray( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *CY, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ); +``` + diff --git a/lib/node_modules/@stdlib/blas/base/csrot/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/base/csrot/benchmark/c/benchmark.length.c index db8a45137b6d..19a414936151 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/blas/base/csrot/benchmark/c/benchmark.length.c @@ -94,7 +94,7 @@ static float rand_float( void ) { * @param len array length * @return elapsed time in seconds */ -static double benchmark( int iterations, int len ) { +static double benchmark1( int iterations, int len ) { double elapsed; float x[ len*2 ]; float y[ len*2 ]; @@ -122,6 +122,41 @@ static double benchmark( int iterations, int len ) { return elapsed; } +/** +* Runs a benchmark. +* +* @param iterations number of iterations +* @param len array length +* @return elapsed time in seconds +*/ +static double benchmark2( int iterations, int len ) { + double elapsed; + float x[ len*2 ]; + float y[ len*2 ]; + double t; + int i; + + for ( i = 0; i < len; i++ ) { + x[ i ] = ( rand_float()*10000.0f ) - 5000.0f; + x[ i+1 ] = ( rand_float()*10000.0f ) - 5000.0f; + y[ i ] = ( rand_float()*10000.0f ) - 5000.0f; + y[ i+1 ] = ( rand_float()*10000.0f ) - 5000.0f; + } + t = tic(); + for ( i = 0; i < iterations; i++ ) { + c_csrot_ndarray( len, (void *)x, 1, 0, (void *)y, 1, 0, 0.8f, 0.6f ); + if ( y[ 0 ] != y[ 0 ] ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( y[ 0 ] != y[ 0 ] ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + /** * Main execution sequence. */ @@ -144,7 +179,14 @@ int main( void ) { for ( j = 0; j < REPEATS; j++ ) { count += 1; printf( "# c::%s:len=%d\n", NAME, len ); - elapsed = benchmark( iter, len ); + elapsed = benchmark1( iter, len ); + print_results( iter, elapsed ); + printf( "ok %d benchmark finished\n", count ); + } + for ( j = 0; j < REPEATS; j++ ) { + count += 1; + printf( "# c::%s:ndarray:len=%d\n", NAME, len ); + elapsed = benchmark2( iter, len ); print_results( iter, elapsed ); printf( "ok %d benchmark finished\n", count ); } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/examples/c/example.c b/lib/node_modules/@stdlib/blas/base/csrot/examples/c/example.c index 50adbfa5c692..ed8617efbe1f 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/examples/c/example.c +++ b/lib/node_modules/@stdlib/blas/base/csrot/examples/c/example.c @@ -38,4 +38,12 @@ int main( void ) { 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 ] ); } + + c_csrot_ndarray( N, (void *)x, -strideX, N-1, (void *)y, strideY, N-1, 0.8f, 0.6f ); + + // Print the result: + for ( int i = 0; i < N; i++ ) { + 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 ] ); + } } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/include/stdlib/blas/base/csrot.h b/lib/node_modules/@stdlib/blas/base/csrot/include/stdlib/blas/base/csrot.h index f7a6abafa0de..b6b18f4b67d4 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/include/stdlib/blas/base/csrot.h +++ b/lib/node_modules/@stdlib/blas/base/csrot/include/stdlib/blas/base/csrot.h @@ -36,6 +36,11 @@ extern "C" { */ 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 ); +/** +* Applies a plane rotation using alternative indexing semantics. +*/ +void API_SUFFIX(c_csrot_ndarray)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *CY, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ); + #ifdef __cplusplus } #endif diff --git a/lib/node_modules/@stdlib/blas/base/csrot/lib/ndarray.native.js b/lib/node_modules/@stdlib/blas/base/csrot/lib/ndarray.native.js index 93a96e89f8c7..881cead113f1 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/lib/ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/lib/ndarray.native.js @@ -21,7 +21,6 @@ // MODULES // var reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' ); -var minViewBufferIndex = require( '@stdlib/strided/base/min-view-buffer-index' ); var addon = require( './../src/addon.node' ); @@ -70,16 +69,9 @@ var addon = require( './../src/addon.node' ); * // returns ~1.6 */ function csrot( N, cx, strideX, offsetX, cy, strideY, offsetY, c, s ) { - var viewX; - var viewY; - - offsetX = minViewBufferIndex( N, strideX, offsetX ); - offsetY = minViewBufferIndex( N, strideY, offsetY ); - - viewX = reinterpret( cx, offsetX ); - viewY = reinterpret( cy, offsetY ); - - addon( N, viewX, strideX, viewY, strideY, c, s ); + var viewX = reinterpret( cx, 0 ); + var viewY = reinterpret( cy, 0 ); + addon.ndarray( N, viewX, strideX, offsetX, viewY, strideY, offsetY, c, s ); return cy; } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/manifest.json b/lib/node_modules/@stdlib/blas/base/csrot/manifest.json index 05257328b566..cc887ead627f 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/manifest.json +++ b/lib/node_modules/@stdlib/blas/base/csrot/manifest.json @@ -45,10 +45,12 @@ "dependencies": [ "@stdlib/napi/export", "@stdlib/napi/argv", + "@stdlib/strided/base/min-view-buffer-index", "@stdlib/napi/argv-int64", "@stdlib/napi/argv-float", "@stdlib/napi/argv-strided-complex64array", - "@stdlib/blas/base/shared" + "@stdlib/blas/base/shared", + "@stdlib/complex/float32/ctor" ] }, { @@ -57,7 +59,8 @@ "blas": "", "wasm": false, "src": [ - "./src/csrot.c" + "./src/csrot.c", + "./src/csrot_ndarray.c" ], "include": [ "./include" @@ -75,7 +78,8 @@ "blas": "", "wasm": false, "src": [ - "./src/csrot.c" + "./src/csrot.c", + "./src/csrot_ndarray.c" ], "include": [ "./include" @@ -107,10 +111,12 @@ "dependencies": [ "@stdlib/napi/export", "@stdlib/napi/argv", + "@stdlib/strided/base/min-view-buffer-index", "@stdlib/napi/argv-int64", "@stdlib/napi/argv-float", "@stdlib/napi/argv-strided-complex64array", - "@stdlib/blas/base/shared" + "@stdlib/blas/base/shared", + "@stdlib/complex/float32/ctor" ] }, { @@ -130,7 +136,9 @@ ], "libpath": [], "dependencies": [ - "@stdlib/blas/base/shared" + "@stdlib/blas/base/shared", + "@stdlib/strided/base/min-view-buffer-index", + "@stdlib/complex/float32/ctor" ] }, { @@ -150,7 +158,9 @@ ], "libpath": [], "dependencies": [ - "@stdlib/blas/base/shared" + "@stdlib/blas/base/shared", + "@stdlib/strided/base/min-view-buffer-index", + "@stdlib/complex/float32/ctor" ] }, @@ -171,10 +181,12 @@ "dependencies": [ "@stdlib/napi/export", "@stdlib/napi/argv", + "@stdlib/strided/base/min-view-buffer-index", "@stdlib/napi/argv-int64", "@stdlib/napi/argv-float", "@stdlib/napi/argv-strided-complex64array", - "@stdlib/blas/base/shared" + "@stdlib/blas/base/shared", + "@stdlib/complex/float32/ctor" ] }, { @@ -183,7 +195,8 @@ "blas": "", "wasm": false, "src": [ - "./src/csrot.c" + "./src/csrot.c", + "./src/csrot_ndarray.c" ], "include": [ "./include" @@ -201,7 +214,8 @@ "blas": "", "wasm": false, "src": [ - "./src/csrot.c" + "./src/csrot.c", + "./src/csrot_ndarray.c" ], "include": [ "./include" @@ -232,10 +246,12 @@ "dependencies": [ "@stdlib/napi/export", "@stdlib/napi/argv", + "@stdlib/strided/base/min-view-buffer-index", "@stdlib/napi/argv-int64", "@stdlib/napi/argv-float", "@stdlib/napi/argv-strided-complex64array", - "@stdlib/blas/base/shared" + "@stdlib/blas/base/shared", + "@stdlib/complex/float32/ctor" ] }, { @@ -254,7 +270,9 @@ ], "libpath": [], "dependencies": [ - "@stdlib/blas/base/shared" + "@stdlib/blas/base/shared", + "@stdlib/strided/base/min-view-buffer-index", + "@stdlib/complex/float32/ctor" ] }, { @@ -273,7 +291,9 @@ ], "libpath": [], "dependencies": [ - "@stdlib/blas/base/shared" + "@stdlib/blas/base/shared", + "@stdlib/strided/base/min-view-buffer-index", + "@stdlib/complex/float32/ctor" ] }, @@ -299,7 +319,8 @@ "@stdlib/napi/argv-int64", "@stdlib/napi/argv-float", "@stdlib/napi/argv-strided-complex64array", - "@stdlib/blas/base/shared" + "@stdlib/blas/base/shared", + "@stdlib/complex/float32/ctor" ] }, { @@ -319,7 +340,9 @@ ], "libpath": [], "dependencies": [ - "@stdlib/blas/base/shared" + "@stdlib/blas/base/shared", + "@stdlib/strided/base/min-view-buffer-index", + "@stdlib/complex/float32/ctor" ] }, { @@ -339,7 +362,9 @@ ], "libpath": [], "dependencies": [ - "@stdlib/blas/base/shared" + "@stdlib/blas/base/shared", + "@stdlib/strided/base/min-view-buffer-index", + "@stdlib/complex/float32/ctor" ] }, @@ -349,7 +374,8 @@ "blas": "", "wasm": false, "src": [ - "./src/csrot.c" + "./src/csrot.c", + "./src/csrot_ndarray.c" ], "include": [ "./include" @@ -372,7 +398,8 @@ "blas": "", "wasm": false, "src": [ - "./src/csrot.c" + "./src/csrot.c", + "./src/csrot_ndarray.c" ], "include": [ "./include" @@ -390,7 +417,8 @@ "blas": "", "wasm": false, "src": [ - "./src/csrot.c" + "./src/csrot.c", + "./src/csrot_ndarray.c" ], "include": [ "./include" @@ -409,7 +437,8 @@ "blas": "", "wasm": true, "src": [ - "./src/csrot.c" + "./src/csrot.c", + "./src/csrot_ndarray.c" ], "include": [ "./include" diff --git a/lib/node_modules/@stdlib/blas/base/csrot/src/addon.c b/lib/node_modules/@stdlib/blas/base/csrot/src/addon.c index 51bea962b8e7..3e74276095b7 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/src/addon.c +++ b/lib/node_modules/@stdlib/blas/base/csrot/src/addon.c @@ -45,4 +45,26 @@ static napi_value addon( napi_env env, napi_callback_info info ) { return NULL; } -STDLIB_NAPI_MODULE_EXPORT_FCN( addon ) +/** +* Receives JavaScript callback invocation data. +* +* @param env environment under which the function is invoked +* @param info callback data +* @return Node-API value +*/ +static napi_value addon_method( napi_env env, napi_callback_info info ) { + STDLIB_NAPI_ARGV( env, info, argv, argc, 9 ); + STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 ); + STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 ); + STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 3 ); + STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 5 ); + STDLIB_NAPI_ARGV_INT64( env, offsetY, argv, 6 ); + STDLIB_NAPI_ARGV_FLOAT( env, c, argv, 7 ); + STDLIB_NAPI_ARGV_FLOAT( env, s, argv, 8 ); + STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, CX, N, strideX, argv, 1 ); + STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, CY, N, strideY, argv, 4 ); + API_SUFFIX(c_csrot_ndarray)( N, (void *)CX, strideX, offsetX, (void *)CY, strideY, offsetY, c, s ); + return NULL; +} + +STDLIB_NAPI_MODULE_EXPORT_FCN_WITH_METHOD( addon, "ndarray", addon_method ) diff --git a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot.c b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot.c index beba6c32cd9f..a1ec0c856f94 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot.c +++ b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot.c @@ -32,47 +32,7 @@ * @param s sine of the angle of rotation */ 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; - CBLAS_INT ix; - CBLAS_INT iy; - CBLAS_INT sx; - CBLAS_INT sy; - CBLAS_INT i; - CBLAS_INT j; - float tmp; - - if ( N <= 0 ) { - return; - } - if ( strideX == 1 && strideY == 1 ) { - for ( i = 0; i < N*2; i += 2 ) { - tmp = ( c*x[ i ] ) + ( s*y[ i ] ); - y[ i ] = ( c*y[ i ] ) - ( s*x[ i ] ); - x[ i ] = tmp; - - j = i + 1; - tmp = ( c*x[ j ] ) + ( s*y[ j ] ); - y[ j ] = ( c*y[ j ] ) - ( s*x[ j ] ); - x[ j ] = tmp; - } - return; - } - sx = strideX * 2; - sy = strideY * 2; - ix = stdlib_strided_stride2offset( N, strideX ); - iy = stdlib_strided_stride2offset( N, strideY ); - for ( i = 0; i < N; i++ ) { - tmp = ( c*x[ ix ] ) + ( s*y[ iy ] ); - y[ iy ] = ( c*y[ iy ] ) - ( s*x[ ix ] ); - x[ ix ] = tmp; - - tmp = ( c*x[ ix+1 ] ) + ( s*y[ iy+1 ] ); - y[ iy+1 ] = ( c*y[ iy+1 ] ) - ( s*x[ ix+1 ] ); - x[ ix+1 ] = tmp; - - ix += sx; - iy += sy; - } - return; + CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX ); + CBLAS_INT oy = stdlib_strided_stride2offset( N, strideY ); + API_SUFFIX(c_csrot_ndarray)( N, CX, strideX, ox, CY, strideY, oy, c, s ); } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_cblas.c b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_cblas.c index e7db4349dcce..f5128a068568 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_cblas.c +++ b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_cblas.c @@ -19,6 +19,8 @@ #include "stdlib/blas/base/csrot.h" #include "stdlib/blas/base/csrot_cblas.h" #include "stdlib/blas/base/shared.h" +#include "stdlib/complex/float32/ctor.h" +#include "stdlib/strided/base/min_view_buffer_index.h" /** * Applies a plane rotation. @@ -34,3 +36,25 @@ 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 ); } + +/** +* Applies a plane rotation using alternative indexing semantics. +* +* @param N number of indexed elements +* @param CX first input array +* @param strideX CX stride length +* @param offsetX starting index for CX +* @param CY second input array +* @param strideY CY stride length +* @param offsetY starting index for CY +* @param c cosine of the angle of rotation +* @param s sine of the angle of rotation +*/ +void API_SUFFIX(c_csrot_ndarray)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *CY, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ) { + stdlib_complex64_t *cx = (stdlib_complex64_t *)CX; + stdlib_complex64_t *cy = (stdlib_complex64_t *)CY; + + cx += stdlib_strided_min_view_buffer_index( N, strideX, offsetX ); // adjust array pointer + cy += stdlib_strided_min_view_buffer_index( N, strideY, offsetY ); // adjust array pointer + API_SUFFIX(cblas_csrot)( N, (void *)cx, strideX, (void *)cy, strideY, c, s ); +} diff --git a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_f.c b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_f.c index 7242d6851073..baf3e9798e80 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_f.c +++ b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_f.c @@ -19,6 +19,8 @@ #include "stdlib/blas/base/csrot.h" #include "stdlib/blas/base/csrot_fortran.h" #include "stdlib/blas/base/shared.h" +#include "stdlib/complex/float32/ctor.h" +#include "stdlib/strided/base/min_view_buffer_index.h" /** * Applies a plane rotation. @@ -34,3 +36,25 @@ 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 ); } + +/** +* Applies a plane rotation using alternative indexing semantics. +* +* @param N number of indexed elements +* @param CX first input array +* @param strideX CX stride length +* @param offsetX starting index for CX +* @param CY second input array +* @param strideY CY stride length +* @param offsetY starting index for CY +* @param c cosine of the angle of rotation +* @param s sine of the angle of rotation +*/ +void API_SUFFIX(c_csrot_ndarray)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *CY, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ) { + stdlib_complex64_t *cx = (stdlib_complex64_t *)CX; + stdlib_complex64_t *cy = (stdlib_complex64_t *)CY; + + cx += stdlib_strided_min_view_buffer_index( N, strideX, offsetX ); + cy += stdlib_strided_min_view_buffer_index( N, strideY, offsetY ); + csrot( &N, (void *)cx, &strideX, (void *)cy, &strideY, &c, &s ); +} diff --git a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_ndarray.c b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_ndarray.c new file mode 100644 index 000000000000..f76a254e0e50 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_ndarray.c @@ -0,0 +1,65 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/blas/base/csrot.h" +#include "stdlib/blas/base/shared.h" + +/** +* Applies a plane rotation. +* +* @param N number of indexed elements +* @param CX first input array +* @param strideX CX stride length +* @param offsetX starting index for CX +* @param CY second input array +* @param strideY CY stride length +* @param offsetY starting index for CY +* @param c cosine of the angle of rotation +* @param s sine of the angle of rotation +*/ +void API_SUFFIX(c_csrot_ndarray)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *CY, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ) { + float *x = (float *)CX; + float *y = (float *)CY; + CBLAS_INT ix; + CBLAS_INT iy; + CBLAS_INT sx; + CBLAS_INT sy; + CBLAS_INT i; + float tmp; + + if ( N <= 0 ) { + return; + } + sx = strideX * 2; + sy = strideY * 2; + ix = offsetX * 2; + iy = offsetY * 2; + for ( i = 0; i < N; i++ ) { + tmp = ( c*x[ ix ] ) + ( s*y[ iy ] ); + y[ iy ] = ( c*y[ iy ] ) - ( s*x[ ix ] ); + x[ ix ] = tmp; + + tmp = ( c*x[ ix+1 ] ) + ( s*y[ iy+1 ] ); + y[ iy+1 ] = ( c*y[ iy+1 ] ) - ( s*x[ ix+1 ] ); + x[ ix+1 ] = tmp; + + ix += sx; + iy += sy; + } + return; +}