Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: Stefan Seefeld <stefan@xxxxxxxxxxxxxxxx>
  • Subject: RE: [vsipl++] Problem compiling VSIPL++ Matrix code
  • From: "Rutledge, Edward" <rutledge@xxxxxxxxxx>
  • Date: Thu, 8 May 2008 08:53:22 -0400

I will do that.  Thanks for your help.

-Eddie

___________________________

Edward Rutledge
MIT Lincoln Laboratory
244 Wood St
Lexington, MA 02420
781-981-0274
rutledge@xxxxxxxxxx
___________________________
-----Original Message-----
From: Stefan Seefeld [mailto:stefan@xxxxxxxxxxxxxxxx]
Sent: Wednesday, May 07, 2008 10:20 PM
To: Rutledge, Edward
Cc: vsipl++@xxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxx
(650) 331-3385 x718