#define BOOST_UBLAS_SHALLOW_ARRAY_ADAPTOR #include using namespace boost::numeric::ublas; int main(int argc, char* argv[]) { matrix mat(10, 10); const double * v = new double[10]; shallow_array_adaptor tmp1(10, v); vector > tmp2(10, tmp1); prod(mat, tmp2); }