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: "Rutledge, Edward" <rutledge@xxxxxxxxxx>
  • Subject: Re: [vsipl++] Problem compiling VSIPL++ Matrix code
  • From: Stefan Seefeld <stefan@xxxxxxxxxxxxxxxx>
  • Date: Thu, 08 May 2008 09:09:02 -0400

Edward,

there is a small hard-to-see bug in this code that I ran into accidentally:

Rutledge, Edward wrote:

int main(void)

{

  vsip::vsipl prog();

While you probably want to create a 'vsip::vsipl' object here, what this actually does is declare a function returning 'vsip::vsipl' and taking no argument. (Remember the C++ rule: whenever it can be interpreted as a declaration, it is one.)

This may lead to strange effects when you expect the library to be initialized while it actually isn't.

Regards,
		Stefan


--
Stefan Seefeld
CodeSourcery
stefan@xxxxxxxxxxxxxxxx
(650) 331-3385 x718