0
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/io.hpp>
#include <boost/numeric/ublas/operation.hpp>
using namespace boost::numeric::ublas;
int main() {
boost::numeric::ublas::matrix<double> m (1000, 1000);
boost::numeric::ublas::matrix<double> n (1000, 1000);
boost::numeric::ublas::matrix<double> mn (1000, 1000);
for (unsigned i = 0; i < m.size1(); ++ i)
for (unsigned j = 0; j < m.size2(); ++ j)
m (i, j) = 3 * i + j;
for (unsigned i = 0; i < n.size1(); ++ i)
for (unsigned j = 0; j < n.size2(); ++ j)
n (i, j) = 2 * i + j;
mn = block_prod<matrix<double>, 1024>(m, n);
return 0;
}
,但我得到這些錯誤:
newfile.cpp:88: error: ‘block_prod’ is not a member of ‘boost::numeric::ublas’
newfile.cpp:88: error: expected primary-expression before ‘,’ token
newfile.cpp:88: error: no match for ‘operator>’ in ‘1024 > (0, n)’
我到處搜尋,但未能找到這些錯誤。我很欣賞任何想法。由於
太謝謝你了 – user1450005