Skip to content

Commit

Permalink
fix diag compare bug, closes #136
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hishinuma committed Jun 19, 2022
1 parent 0ca1b97 commit 1ee5f09
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/blas/matrix/diag_op/dense_diag_add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ template <typename T> void Dense<T>::diag_add(const T alpha) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

if (gpu_status == true) {
#if MONOLISH_USE_NVIDIA_GPU // gpu
Expand Down Expand Up @@ -42,7 +42,7 @@ template <typename T> void Dense<T>::diag_add(const vector<T> &vec) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

assert(Len == vec.size());

Expand Down Expand Up @@ -78,7 +78,7 @@ template <typename T> void Dense<T>::diag_add(const view1D<vector<T>, T> &vec) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

assert(Len == vec.size());

Expand Down Expand Up @@ -115,7 +115,7 @@ void Dense<T>::diag_add(const view1D<matrix::Dense<T>, T> &vec) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

assert(Len == vec.size());

Expand Down
8 changes: 4 additions & 4 deletions src/blas/matrix/diag_op/dense_diag_div.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ template <typename T> void Dense<T>::diag_div(const T alpha) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

if (gpu_status == true) {
#if MONOLISH_USE_NVIDIA_GPU // gpu
Expand Down Expand Up @@ -42,7 +42,7 @@ template <typename T> void Dense<T>::diag_div(const vector<T> &vec) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

assert(Len == vec.size());

Expand Down Expand Up @@ -78,7 +78,7 @@ template <typename T> void Dense<T>::diag_div(const view1D<vector<T>, T> &vec) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

assert(Len == vec.size());

Expand Down Expand Up @@ -115,7 +115,7 @@ void Dense<T>::diag_div(const view1D<matrix::Dense<T>, T> &vec) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

assert(Len == vec.size());

Expand Down
8 changes: 4 additions & 4 deletions src/blas/matrix/diag_op/dense_diag_mul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ template <typename T> void Dense<T>::diag_mul(const T alpha) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

if (gpu_status == true) {
#if MONOLISH_USE_NVIDIA_GPU // gpu
Expand Down Expand Up @@ -42,7 +42,7 @@ template <typename T> void Dense<T>::diag_mul(const vector<T> &vec) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

assert(Len == vec.size());

Expand Down Expand Up @@ -78,7 +78,7 @@ template <typename T> void Dense<T>::diag_mul(const view1D<vector<T>, T> &vec) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

assert(Len == vec.size());

Expand Down Expand Up @@ -115,7 +115,7 @@ void Dense<T>::diag_mul(const view1D<matrix::Dense<T>, T> &vec) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

assert(Len == vec.size());

Expand Down
8 changes: 4 additions & 4 deletions src/blas/matrix/diag_op/dense_diag_sub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ template <typename T> void Dense<T>::diag_sub(const T alpha) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

if (gpu_status == true) {
#if MONOLISH_USE_NVIDIA_GPU // gpu
Expand Down Expand Up @@ -42,7 +42,7 @@ template <typename T> void Dense<T>::diag_sub(const vector<T> &vec) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

assert(Len == vec.size());

Expand Down Expand Up @@ -78,7 +78,7 @@ template <typename T> void Dense<T>::diag_sub(const view1D<vector<T>, T> &vec) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

assert(Len == vec.size());

Expand Down Expand Up @@ -115,7 +115,7 @@ void Dense<T>::diag_sub(const view1D<matrix::Dense<T>, T> &vec) {

T *vald = val.data();
const auto N = get_col();
const auto Len = get_row() > get_col() ? get_row() : get_col();
const auto Len = get_row() < get_col() ? get_row() : get_col();

assert(Len == vec.size());

Expand Down

0 comments on commit 1ee5f09

Please sign in to comment.