32 #ifndef CORE_DATATYPES_DENSEMATRIXMULTIPLICATION_H
33 #define CORE_DATATYPES_DENSEMATRIXMULTIPLICATION_H
35 #if defined(HAVE_CBLAS)
36 #if defined(__APPLE__)
37 #include <vecLib/cblas.h>
56 if (beg == -1) beg = 0;
57 if (end == -1) end = this->nrows_;
59 #if defined(HAVE_CBLAS)
62 cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, (end-beg),
63 1, this->ncols_, ALPHA, dataptr_+(beg*this->ncols_), this->ncols_,
77 for (i=beg; i<end; i++)
114 for (i=beg; i<end; i++) b[i]=0;
115 for (j=0; j<this->ncols_; j++)
118 for (i=beg; i<end; i++)
120 b[i]+=
data[i][j]*x[j];
128 template <
typename T>
140 for (i=0; i<this->nrows_; i++)
143 double* row =
data[i];
176 template <
typename T>
185 if (beg == -1) beg = 0;
186 if (end == -1) end = this->ncols_;
190 for (i=beg; i<end; i++)
193 for (j=0; j<this->nrows_; j++)
195 sum+=
data[j][i]*x[j];
202 for (i=beg; i<end; i++) b[i]=0;
203 for (j=0; j<this->nrows_; j++)
207 for (i=beg; i<end; i++)
213 template <
typename T>
219 (*result)[i][i] = column[i];
Definition: DenseMatrix.h:68
#define ASSERTEQ(c1, c2)
Definition: Assert.h:98
virtual void mult(const ColumnMatrix &x, ColumnMatrix &b, index_type beg=-1, index_type end=-1, int spVec=0) const
Definition: DenseMatrixMultiplication.h:49
static DenseMatrix * make_diagonal_from_column(const ColumnMatrix &column, size_type rows, size_type cols)
Definition: DenseMatrixMultiplication.h:215
#define ASSERT(condition)
Definition: Assert.h:110
long long size_type
Definition: Types.h:40
dictionary data
Definition: eabLatVolData.py:11
Definition: ColumnMatrix.h:55
virtual T * get_data_pointer() const
Definition: ColumnMatrix.h:200
virtual void mult_transpose(const ColumnMatrix &x, ColumnMatrix &b, index_type beg=-1, index_type end=-1, int spVec=0) const
Definition: DenseMatrixMultiplication.h:178
long long index_type
Definition: Types.h:39
size_type nrows() const
Definition: Matrix.h:132
void multiply(ColumnMatrix &x, ColumnMatrix &b) const
Definition: DenseMatrixMultiplication.h:130