Skip to content

Commit

Permalink
refactor: use macro to convert stride to offset
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Jul 1, 2024
1 parent 8248b4a commit 5418177
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions lib/node_modules/@stdlib/blas/base/dcopy/src/dcopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,8 @@ void API_SUFFIX(c_dcopy)( const CBLAS_INT N, const double *X, const CBLAS_INT st
}
return;
}
if ( strideX < 0 ) {
ix = (1-N) * strideX;
} else {
ix = 0;
}
if ( strideY < 0 ) {
iy = (1-N) * strideY;
} else {
iy = 0;
}
ix = STDLIB_BLAS_BASE_STRIDE2OFFSET( N, strideX );
iy = STDLIB_BLAS_BASE_STRIDE2OFFSET( N, strideY );
for ( i = 0; i < N; i++ ) {
Y[ iy ] = X[ ix ];
ix += strideX;
Expand Down

1 comment on commit 5418177

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverage Report

Package Statements Branches Functions Lines
blas/base/dcopy $\color{green}425/425$
$\color{green}+100.00\%$
$\color{green}29/29$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}425/425$
$\color{green}+100.00\%$
blas/base/shared $\color{green}100/100$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}100/100$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.