diff options
| author | Sebastian Berg <sebastianb@nvidia.com> | 2022-09-22 15:37:17 +0200 |
|---|---|---|
| committer | Sebastian Berg <sebastianb@nvidia.com> | 2022-09-22 15:37:17 +0200 |
| commit | a4ae17cf8f576e954591892bf99de1dda7ee5961 (patch) | |
| tree | a3ec88b0509e93bab23c0ac0de215fc802651d8e /numpy/core/src/multiarray | |
| parent | 2524a53ba30c1207770a27a513eb18a33837a145 (diff) | |
| download | numpy-a4ae17cf8f576e954591892bf99de1dda7ee5961.tar.gz | |
BUG: Fix complex vector dot with more than NPY_CBLAS_CHUNK elements
The iteration was simply using the wrong value, the larger value
might even work sometimes, but then we do another iteration counting
the remaining elements twice.
Closes gh-22262
Diffstat (limited to 'numpy/core/src/multiarray')
| -rw-r--r-- | numpy/core/src/multiarray/arraytypes.c.src | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/arraytypes.c.src b/numpy/core/src/multiarray/arraytypes.c.src index 56ac83cbb..f06875cae 100644 --- a/numpy/core/src/multiarray/arraytypes.c.src +++ b/numpy/core/src/multiarray/arraytypes.c.src @@ -3637,7 +3637,8 @@ NPY_NO_EXPORT void CBLAS_INT chunk = n < NPY_CBLAS_CHUNK ? n : NPY_CBLAS_CHUNK; @type@ tmp[2]; - CBLAS_FUNC(cblas_@prefix@dotu_sub)((CBLAS_INT)n, ip1, is1b, ip2, is2b, tmp); + CBLAS_FUNC(cblas_@prefix@dotu_sub)( + (CBLAS_INT)chunk, ip1, is1b, ip2, is2b, tmp); sum[0] += (double)tmp[0]; sum[1] += (double)tmp[1]; /* use char strides here */ |
