P1673: `symmetric_matrix_vector_product`: bug in implementation
@fnrizzi がすでに取り組んでいます。
2022年2月14日 から。
評価
この issue はまだ評価されていません。
説明
In here the lines starting at 442 :
if constexpr (std::is_same_v<Triangle, lower_triangle_t>) {
for (size_type j = 0; j < A.extent(1); ++j) {
for (size_type i = j; i < A.extent(0); ++i) {
const auto A_ij = A(i,j);
y(i) += A_ij * x(j);
y(j) += A_ij * x(i);
}
}
}
else {
for (size_type j = 0; j < A.extent(1); ++j) {
for (size_type i = 0; i <= j; ++i) {
const auto A_ij = A(i,j);
y(i) += A_ij * x(j);
y(j) += A_ij * x(i);
}
}
}
should be:
if constexpr (std::is_same_v<Triangle, lower_triangle_t>) {
for (size_type j = 0; j < A.extent(1); ++j) {
for (size_type i = j; i < A.extent(0); ++i) {
const auto A_ij = A(i,j);
y(i) += A_ij * x(j);
if(i != j){
y(j) += A_ij * x(i);
}
}
}
}
else {
for (size_type j = 0; j < A.extent(1); ++j) {
for (size_type i = 0; i <= j; ++i) {
const auto A_ij = A(i,j);
y(i) += A_ij * x(j);
if(i != j){
y(j) += A_ij * x(i);
}
}
}
}
Otherwise we count twice for that element.
Note the spec says: For i in the domain of y, the mathematical expression for the algorithm is y[i] = the sum of A[i,j] * x[j] for all j in the triangle of A specified by t, plus the sum of A[j,i] * x[j] for all j not equal to i such that j,i is in the domain of A but not in the triangle of A specified by t.
Most likely also the updating overload has same issue, have not checked that yet.
- 主要言語
- C++
- スター
- 167
- フォーク
- 31
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
kokkos/stdBLAS のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
[linalg] NB commentsオープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
espressif/esp-matter#1867 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
cuAmpcorParameter.cpp (CPU pycuampcor) does not compile with libc++: EXIT_FAILURE is undeclaredオープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
isce-framework/isce3#387 ·
-
upstream update
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
conan-io/conan-center-index#31055 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信