[vsipl++] [PATCH] Use IPP for Fir<>
Nathan (Jasper) Myers
ncm at codesourcery.com
Thu Oct 13 23:18:07 UTC 2005
On Thu, Oct 13, 2005 at 03:45:50PM -0400, Jules Bergmann wrote:
> Nathan (Jasper) Myers wrote:
> >I have checked in the patch below.
> >
> >It makes vsip::Fir<> use IPP's FIR support where possible. In practice,
> >that means whenever block size and decimation are not relatively prime.
> >(IPP produces bad output when they are. The IPP API seems to make it
> >impossible, so it amounts to an IPP documentation bug.) Fir<> uses
> >the native C++ implementation for such cases. They are probably rare
> >in real programs.
>
> What happens when using a type not support by IPP (such as long double)?
> Does the generic code get used? Also, what happens when instantiating
> a FIR for a type we don't support (such as int)?
For the existing code, it will get compile-time error saying there
is no definition for (e.g.) vsip::impl::Ipp_fir_driver<long double>.
It is a minor effort to make it do something more friendly.
> >The spec says the copy constructor Fir(Fir const&) is supposed to
> >be VSIP_NOTHROW, but it seems to me that to implement it safely, it
> >needs to do allocation. I declared it VSIP_THROW((std::bad_alloc)).
>
> Please file an issue for this in the tracker.
Will do.
Nathan Myers
ncm
More information about the vsipl++
mailing list