Home | History | Annotate | Download | only in SparseCore

Lines Matching refs:Lhs

17 template<typename Lhs, typename Rhs, typename ResultType>
18 static void conservative_sparse_sparse_product_impl(const Lhs& lhs, const Rhs& rhs, ResultType& res)
20 typedef typename remove_all<Lhs>::type::Scalar Scalar;
21 typedef typename remove_all<Lhs>::type::Index Index;
24 Index rows = lhs.innerSize();
26 eigen_assert(lhs.outerSize() == rhs.innerSize());
34 // of the lhs differs in average of one non zeros, thus the number of non zeros for
35 // the product of a rhs column with the lhs is X+Y where X is the average number of non zero
36 // per column of the lhs.
37 // Therefore, we have nnz(lhs*rhs) = nnz(lhs) + nnz(rhs)
38 Index estimated_nnz_prod = lhs.nonZeros() + rhs.nonZeros();
52 for (typename Lhs::InnerIterator lhsIt(lhs, k); lhsIt; ++lhsIt)
123 template<typename Lhs, typename Rhs, typename ResultType,
124 int LhsStorageOrder = traits<Lhs>::Flags&RowMajorBit,
129 template<typename Lhs, typename Rhs, typename ResultType>
130 struct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,ColMajor,ColMajor,ColMajor>
132 typedef typename remove_all<Lhs>::type LhsCleaned;
135 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
139 ColMajorMatrix resCol(lhs.rows(),rhs.cols());
140 internal::conservative_sparse_sparse_product_impl<Lhs,Rhs,ColMajorMatrix>(lhs, rhs, resCol);
147 template<typename Lhs, typename Rhs, typename ResultType>
148 struct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,RowMajor,ColMajor,ColMajor>
150 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
154 RowMajorMatrix resRow(lhs.rows(), rhs.cols());
155 internal::conservative_sparse_sparse_product_impl<RowMajorMatrix,Lhs,RowMajorMatrix>(rhsRow, lhs, resRow);
160 template<typename Lhs, typename Rhs, typename ResultType>
161 struct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,ColMajor,RowMajor,ColMajor>
163 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
166 RowMajorMatrix lhsRow = lhs;
167 RowMajorMatrix resRow(lhs.rows(), rhs.cols());
173 template<typename Lhs, typename Rhs, typename ResultType>
174 struct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,RowMajor,RowMajor,ColMajor>
176 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
179 RowMajorMatrix resRow(lhs.rows(), rhs.cols());
180 internal::conservative_sparse_sparse_product_impl<Rhs,Lhs,RowMajorMatrix>(rhs, lhs, resRow);
186 template<typename Lhs, typename Rhs, typename ResultType>
187 struct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,ColMajor,ColMajor,RowMajor>
189 typedef typename traits<typename remove_all<Lhs>::type>::Scalar Scalar;
191 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
194 ColMajorMatrix resCol(lhs.rows(), rhs.cols());
195 internal::conservative_sparse_sparse_product_impl<Lhs,Rhs,ColMajorMatrix>(lhs, rhs, resCol);
200 template<typename Lhs, typename Rhs, typename ResultType>
201 struct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,RowMajor,ColMajor,RowMajor>
203 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
206 ColMajorMatrix lhsCol = lhs;
207 ColMajorMatrix resCol(lhs.rows(), rhs.cols());
213 template<typename Lhs, typename Rhs, typename ResultType>
214 struct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,ColMajor,RowMajor,RowMajor>
216 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
220 ColMajorMatrix resCol(lhs.rows(), rhs.cols());
221 internal::conservative_sparse_sparse_product_impl<Lhs,ColMajorMatrix,ColMajorMatrix>(lhs, rhsCol, resCol);
226 template<typename Lhs, typename Rhs, typename ResultType>
227 struct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,RowMajor,RowMajor,RowMajor>
229 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
233 RowMajorMatrix resRow(lhs.rows(),rhs.cols());
234 internal::conservative_sparse_sparse_product_impl<Rhs,Lhs,RowMajorMatrix>(rhs, lhs, resRow);