Skip to content

Commit 0752f47

Browse files
committed
Auto-generated commit
1 parent e725fa6 commit 0752f47

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-07-11)
7+
## Unreleased (2025-07-12)
88

99
<section class="features">
1010

@@ -520,6 +520,7 @@ A total of 24 issues were closed in this release:
520520

521521
<details>
522522

523+
- [`a41c427`](https://github.com/stdlib-js/stdlib/commit/a41c427ee9ddd87f48288a737ea9820ea48b5498) - **refactor:** reduce pointer arithmetic operations _(by Athan Reines)_
523524
- [`c9f4cb9`](https://github.com/stdlib-js/stdlib/commit/c9f4cb9b593f963d25efc20a6bd3b2aeeda515c2) - **fix:** add missing checks and tests _(by Athan Reines)_
524525
- [`fffbf73`](https://github.com/stdlib-js/stdlib/commit/fffbf730b1a27175ece26a82f05c4053567e4386) - **feat:** add C implementation for `blas/base/dsyr` [(#6566)](https://github.com/stdlib-js/stdlib/pull/6566) _(by Shabareesh Shetty, Athan Reines)_
525526
- [`b7ebe14`](https://github.com/stdlib-js/stdlib/commit/b7ebe14a38ddc3ccce67834db16835f420431494) - **feat:** add `blas/ext/base/wasm/dnansumkbn2` [(#5735)](https://github.com/stdlib-js/stdlib/pull/5735) _(by Shabareesh Shetty, Athan Reines, JoyBoy, stdlib-bot)_

base/dsyr/lib/base.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function dsyr( uplo, N, alpha, x, strideX, offsetX, A, strideA1, strideA2, offse
5959
var sa1;
6060
var i0;
6161
var i1;
62-
var oa;
62+
var ia;
6363
var ox;
6464

6565
isrm = isRowMajor( [ strideA1, strideA2 ] );
@@ -81,11 +81,12 @@ function dsyr( uplo, N, alpha, x, strideX, offsetX, A, strideA1, strideA2, offse
8181
for ( i1 = 0; i1 < N; i1++ ) {
8282
if ( x[ ix1 ] !== 0.0 ) {
8383
tmp = alpha * x[ ix1 ];
84-
oa = offsetA + (sa1*i1);
84+
ia = offsetA + (sa1*i1);
8585
ix0 = ox;
8686
for ( i0 = 0; i0 <= i1; i0++ ) {
87-
A[ oa+(sa0*i0) ] += x[ ix0 ] * tmp;
87+
A[ ia ] += x[ ix0 ] * tmp;
8888
ix0 += strideX;
89+
ia += sa0;
8990
}
9091
}
9192
ix1 += strideX;
@@ -97,11 +98,12 @@ function dsyr( uplo, N, alpha, x, strideX, offsetX, A, strideA1, strideA2, offse
9798
for ( i1 = 0; i1 < N; i1++ ) {
9899
if ( x[ ix1 ] !== 0.0 ) {
99100
tmp = alpha * x[ ix1 ];
100-
oa = offsetA + (sa1*i1);
101+
ia = offsetA + (sa1*i1) + (sa0*i1);
101102
ix0 = ix1;
102103
for ( i0 = i1; i0 < N; i0++ ) {
103-
A[ oa+(sa0*i0) ] += x[ ix0 ] * tmp;
104+
A[ ia ] += x[ ix0 ] * tmp;
104105
ix0 += strideX;
106+
ia += sa0;
105107
}
106108
}
107109
ix1 += strideX;

base/dsyr/src/dsyr_ndarray.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void API_SUFFIX(c_dsyr_ndarray)( const CBLAS_UPLO uplo, const CBLAS_INT N, const
4444
CBLAS_INT sa1;
4545
CBLAS_INT i0;
4646
CBLAS_INT i1;
47-
CBLAS_INT oa;
47+
CBLAS_INT ia;
4848
CBLAS_INT ox;
4949
double tmp;
5050

@@ -89,11 +89,12 @@ void API_SUFFIX(c_dsyr_ndarray)( const CBLAS_UPLO uplo, const CBLAS_INT N, const
8989
for ( i1 = 0; i1 < N; i1++ ) {
9090
if ( X[ ix1 ] != 0.0 ) {
9191
tmp = alpha * X[ ix1 ];
92-
oa = offsetA + (sa1*i1);
92+
ia = offsetA + (sa1*i1);
9393
ix0 = ox;
9494
for ( i0 = 0; i0 <= i1; i0++ ) {
95-
A[ oa+(sa0*i0) ] += X[ ix0 ] * tmp;
95+
A[ ia ] += X[ ix0 ] * tmp;
9696
ix0 += strideX;
97+
ia += sa0;
9798
}
9899
}
99100
ix1 += strideX;
@@ -105,11 +106,12 @@ void API_SUFFIX(c_dsyr_ndarray)( const CBLAS_UPLO uplo, const CBLAS_INT N, const
105106
for ( i1 = 0; i1 < N; i1++ ) {
106107
if ( X[ ix1 ] != 0.0 ) {
107108
tmp = alpha * X[ ix1 ];
108-
oa = offsetA + (sa1*i1);
109+
ia = offsetA + (sa1*i1) + (sa0*i1);
109110
ix0 = ix1;
110111
for ( i0 = i1; i0 < N; i0++ ) {
111-
A[ oa+(sa0*i0) ] += X[ ix0 ] * tmp;
112+
A[ ia ] += X[ ix0 ] * tmp;
112113
ix0 += strideX;
114+
ia += sa0;
113115
}
114116
}
115117
ix1 += strideX;

0 commit comments

Comments
 (0)