You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// c++ test_prod_sparse.cpp -std=c++11
#include <viennacl/vector.hpp>
#include <viennacl/matrix.hpp>
#include <viennacl/compressed_matrix.hpp>
#include <viennacl/linalg/prod.hpp>
#include <viennacl/linalg/vector_operations.hpp>
#include <viennacl/linalg/matrix_operations.hpp>
#include <viennacl/scalar.hpp>
#include <viennacl/matrix_proxy.hpp>
int main() {
using namespace viennacl;
using namespace viennacl::linalg;
auto a = matrix<float>(10,10);
auto b = compressed_matrix<float>(10,10);
auto v = prod(a, b);
return 0;
}
So far we only support a sparse first factor, i.e. in C = prod(A, B); only A can be sparse, not B or C. This has performance reasons, because one can only iterate quickly along rows of a sparse matrix, not along columns.
prod(B, A) with sparse A will only work reasonably well if the cost of transposing A in memory is substantially smaller than the cost of prod(B, A') where A' is the same as A but stored in column-major layout.
Code:
Error:
The text was updated successfully, but these errors were encountered: