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

Stefan Seefeld stefan at codesourcery.com
Wed May 7 22:32:02 UTC 2008


Edward,

Rutledge, Edward wrote:
> Stefan,
> That did fix one of the compile errors, but the other still occurs.
> 
> 
> Here is the code that fails to compile:
> 
> #include <vsip/matrix.hpp>
> #include <vsip/initfin.hpp>
> #include <vsip/parallel.hpp>
> 
> int main(void)
> {
>   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;
> }

I don't think the operator() notation you use above is officially 
supported, and in fact may not be supposed to work on const views.
Can you use 'get()' instead ?

vsip::scalar_i a = constM.get(0, 0);

should work.

Thanks,
		Stefan

-- 
Stefan Seefeld
CodeSourcery
stefan at codesourcery.com
(650) 331-3385 x718



More information about the vsipl++ mailing list