[vsipl++] Problem compiling VSIPL++ Matrix code
Stefan Seefeld
stefan at codesourcery.com
Thu May 8 02:20:11 UTC 2008
Rutledge, Edward wrote:
> vsip::vsipl prog();
> const vsip::Matrix<vsip::scalar_i> constM(2,2,99);
> vsip::scalar_i a = constM(0,0); // fails to compile
> return 0;
Another possible change would be to replace the 'const
vsip::Matrix<...>' by 'vsip::const_Matrix<...>'. Note that VSIPL++
promotes passing view types (such as Matrix<>) by value, so the const
qualifier isn't really very meaningful. Instead, use 'const_Matrix<>' to
convey that its content is to be immutable.
Using the above operator() notation on const_Matrix<> will work as
expected, too.
Thanks,
Stefan
--
Stefan Seefeld
CodeSourcery
stefan at codesourcery.com
(650) 331-3385 x718
More information about the vsipl++
mailing list