Does anyone understand why does the very simple example below fail ?
#define VIENNACL_WITH_UBLAS #include "viennacl/compressed_matrix.hpp" #include "viennacl/linalg/power_iter.hpp" using namespace boost::numeric; int main(){ double lambda; ublas::compressed_matrix<double> M(10, 10), P(10,10); viennacl::compressed_matrix<double> C(10, 10); viennacl::linalg::power_iter_tag ptag(1e-6); M(2,2) = M(2,4) = 1; viennacl::copy(M,C); lambda = viennacl::linalg::eig(C, ptag); P = M / 2; viennacl::copy(P,C); std::cout << C; return 0; } /* Output of the example : ../ViennaCL-1.7.1/viennacl/backend/util.hpp:151: viennacl::backend::typesafe_host_array<T, special>::cpu_type viennacl::backend::typesafe_host_array<T, special>::operator[](viennacl::vcl_size_t) const [with T = unsigned int; bool special = false; viennacl::backend::typesafe_host_array<T, special>::cpu_type = unsigned int; viennacl::vcl_size_t = long unsigned int]: Assertion `index < size() && bool("index out of bounds")' failed. Aborted */
Fixed here: https://github.com/viennacl/viennacl-dev/commit/489c11964a1e7c32faa1c6d26e1ef43fd856e0ca
Log in to post a comment.
Does anyone understand why does the very simple example below fail ?
Fixed here: https://github.com/viennacl/viennacl-dev/commit/489c11964a1e7c32faa1c6d26e1ef43fd856e0ca