Skip to content

Commit 3cff9af

Browse files
committed
refactor: add support for strides
--- 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: passed - 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: na - 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 e1e4446 commit 3cff9af

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

lib/node_modules/@stdlib/fft/base/fftpack/lib/radb2.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,17 @@ function optr( i, k, j, L, M, stride, offset ) {
225225
* @param {NonNegativeInteger} M - number of elements in each sub-sequence to be transformed
226226
* @param {NonNegativeInteger} L - number of sub-sequences to be transformed
227227
* @param {Float64Array} cc - input array containing the sub-sequences to be transformed
228+
* @param {integer} sc - stride length for `cc`
228229
* @param {NonNegativeInteger} oc - offset for `cc`
229230
* @param {Float64Array} out - output array containing transformed sub-sequences
231+
* @param {integer} so - stride length for `out`
230232
* @param {NonNegativeInteger} oo - offset for `out`
231233
* @param {Float64Array} twiddles - array of twiddle factors
234+
* @param {integer} st - stride length for `twiddles`
232235
* @param {NonNegativeInteger} ot - offset for `twiddles`
233236
* @returns {void}
234237
*/
235-
function radb2( M, L, cc, oc, out, oo, twiddles, ot ) { // FIXME: support strides
238+
function radb2( M, L, cc, sc, oc, out, so, oo, twiddles, st, ot ) { // eslint-disable-line max-params
236239
var MP1;
237240
var tr2;
238241
var ti2;
@@ -242,8 +245,6 @@ function radb2( M, L, cc, oc, out, oo, twiddles, ot ) { // FIXME: support stride
242245
var it2;
243246
var io;
244247
var im;
245-
var sc = 1; // FIXME: make a parameter
246-
var so = 1; // FIXME: make a parameter
247248
var i;
248249
var k;
249250

@@ -340,8 +341,8 @@ function radb2( M, L, cc, oc, out, oo, twiddles, ot ) { // FIXME: support stride
340341
* ↑ ↑
341342
* cos twiddle sine twiddle
342343
*/
343-
it1 = i - 1 + ot; // cos(θ)
344-
it2 = i + ot; // sin(θ)
344+
it1 = ( (i-1)*st ) + ot; // cos(θ)
345+
it2 = ( i*st ) + ot; // sin(θ)
345346

346347
io = optr( i, k, 1, L, M, so, oo ); // Re(x[2n+1])
347348
out[ io ] = ( twiddles[ it1 ] * tr2 ) - ( twiddles[ it2 ] * ti2 ); // real part

lib/node_modules/@stdlib/fft/base/fftpack/lib/rfftb1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function rfftb1( N, c, cOffset, ch, chOffset, wa, waOffset, ifac, ifacOffset ) {
129129
FLG = 1 - FLG;
130130
break;
131131
case 2:
132-
radb2( ido, l1, ( FLG ) ? ch : c, ( FLG ) ? chOffset : cOffset, ( FLG ) ? c : ch, ( FLG ) ? cOffset : chOffset, wa, iw+waOffset );
132+
radb2( ido, l1, ( FLG ) ? ch : c, 1, ( FLG ) ? chOffset : cOffset, ( FLG ) ? c : ch, 1, ( FLG ) ? cOffset : chOffset, wa, 1, iw+waOffset );
133133
FLG = 1 - FLG;
134134
break;
135135
case 3:

0 commit comments

Comments
 (0)