[vsipl++] [patch] Support for Cell FFT's up to 4K points.

Jules Bergmann jules at codesourcery.com
Mon Feb 12 23:37:06 UTC 2007


Stefan Seefeld wrote:
> Don McCoy wrote:
>> Stefan Seefeld wrote:
>>>> -  Fft_impl(Domain<1> const &dom)
>>>> +  Fft_impl(Domain<1> const &dom, rtype scale)
>>>> VSIP_THROW((std::bad_alloc))
>>>>     
>>> Since any throw specifier other than 'throw ()' will lead to worse
>>> code, I
>>> think we should not use it if we can, in particular in non-public-API
>>> code.
>>>
>>>   
>> The reason for the above is the the alloc below.  I guess I'm not sure
>> what the right thing to do here is.
> 
> I understand, this constructor can throw. My point is that expressing that
> in a throw specifier unfortunately isn't really helpful.

To elaborate, it isn't helpful for the of performance of generated code.

Putting the specifier there requires the compiler to generate extra code 
that guarantees the specifier is "obeyed" by catching exceptions other 
than bad_alloc and converting them to an unexpected exception.

We should use specifiers where the VSIPL++ API requires them, and avoid 
them elsewhere.

We haven't always done this, so some existing code may have unnecessary 
specifiers.




-- 
Jules Bergmann
CodeSourcery
jules at codesourcery.com
(650) 331-3385 x705



More information about the vsipl++ mailing list