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 Jul 1, 2024
1 parent 0be389f commit abf90c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 38 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<section class="release" id="unreleased">

## Unreleased (2024-06-30)
## Unreleased (2024-07-01)

<section class="packages">

Expand Down Expand Up @@ -2143,6 +2143,7 @@ A total of 35 people contributed to this release. Thank you to the following con

<details>

- [`4d08374`](https://github.com/stdlib-js/stdlib/commit/4d0837401b68ebd4e5b8c38e0214158dbe410a07) - **refactor:** reduce code duplication [(#2479)](https://github.com/stdlib-js/stdlib/pull/2479) _(by Aman Bhansali, Athan Reines)_
- [`a591e05`](https://github.com/stdlib-js/stdlib/commit/a591e052cf1b1515c267781b914c6a482e150425) - **test:** fix test configuration _(by Athan Reines)_
- [`ca56638`](https://github.com/stdlib-js/stdlib/commit/ca566387ddc147c4f15fd012a09bd55713307394) - **feat:** add `blas/base/dspmv` [(#2456)](https://github.com/stdlib-js/stdlib/pull/2456) _(by Aman Bhansali, Athan Reines)_
- [`4c95c4b`](https://github.com/stdlib-js/stdlib/commit/4c95c4b36797d601976e647baf2f4a493aff8de5) - **feat:** add `blas/base/dsymv` [(#2458)](https://github.com/stdlib-js/stdlib/pull/2458) _(by Aman Bhansali, Athan Reines)_
Expand Down
42 changes: 5 additions & 37 deletions base/dcopy/lib/dcopy.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

'use strict';

// VARIABLES //
// MODULES //

var M = 8;
var ndarray = require( './ndarray.js' );


// MAIN //
Expand All @@ -47,52 +47,20 @@ var M = 8;
function dcopy( N, x, strideX, y, strideY ) {
var ix;
var iy;
var m;
var i;
if ( N <= 0 ) {
return y;
}
// Use unrolled loops if both strides are equal to `1`...
if ( strideX === 1 && strideY === 1 ) {
m = N % M;

// If we have a remainder, run a clean-up loop...
if ( m > 0 ) {
for ( i = 0; i < m; i++ ) {
y[ i ] = x[ i ];
}
}
if ( N < M ) {
return y;
}
for ( i = m; i < N; i += M ) {
y[ i ] = x[ i ];
y[ i+1 ] = x[ i+1 ];
y[ i+2 ] = x[ i+2 ];
y[ i+3 ] = x[ i+3 ];
y[ i+4 ] = x[ i+4 ];
y[ i+5 ] = x[ i+5 ];
y[ i+6 ] = x[ i+6 ];
y[ i+7 ] = x[ i+7 ];
}
return y;
}
if ( strideX < 0 ) {
ix = (1-N) * strideX;
ix = ( 1 - N ) * strideX;
} else {
ix = 0;
}
if ( strideY < 0 ) {
iy = (1-N) * strideY;
iy = ( 1 - N ) * strideY;
} else {
iy = 0;
}
for ( i = 0; i < N; i++ ) {
y[ iy ] = x[ ix ];
ix += strideX;
iy += strideY;
}
return y;
return ndarray( N, x, strideX, ix, y, strideY, iy );
}


Expand Down

0 comments on commit abf90c4

Please sign in to comment.