[vsipl++] Problem compiling VSIPL++ Matrix code

Rutledge, Edward rutledge at ll.mit.edu
Thu May 8 12:53:22 UTC 2008


I will do that.  Thanks for your help.

-Eddie

___________________________

Edward Rutledge
MIT Lincoln Laboratory
244 Wood St
Lexington, MA 02420
781-981-0274
rutledge at ll.mit.edu
___________________________
-----Original Message-----
From: Stefan Seefeld [mailto:stefan at codesourcery.com]
Sent: Wednesday, May 07, 2008 10:20 PM
To: Rutledge, Edward
Cc: vsipl++ at codesourcery.com
Subject: Re: [vsipl++] Problem compiling VSIPL++ Matrix code

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