[patch] C-VSIP Solver cleanup

Jules Bergmann jules at codesourcery.com
Thu Dec 7 19:30:06 UTC 2006


This patch

  - adds Is_{solver}_impl_avail specializations so that C-VSIPL solvers
    are found by dispatch when used in the optimized impl.

  - adds coverage events to the solver front-ends to make it possible to
    determine what backend was used when coverage is turned on.

  - Centralizes implementation tags used by the different dispatchers
    into a single file (impl_tags.hpp).

  - Adds a variant of Compile_time_assert called
    'Compile_time_assert_msg' that takes an extra type for purposes of
    encoding an error message.

    This is used by the CVSIP Convolution backend to signal an error
    when the backend doesn't support a particular value type:

    class Convolution_impl<const_Matrix, S, R, T, N, H, Cvsip_tag>
      : public cvsip::Convolution_impl<2, T, S, R>
      , Compile_time_assert_msg<cvsip::Conv_traits<2, T>::valid,
			  Conv_cvsip_backend_does_not_support_type<T> >
    {

    If a program attempts to perform a convolution with a type not
    supported by the backend (such as 'int'), the following error
    message gets emitted:

/home/jules/csl/src/vpp/work-ref-impl/tests/../src/vsip/core/signal/conv_common.hpp:69: 

    error: invalid use of undefined type '

    struct vsip::impl::Compile_time_assert_msg<
       false,
       vsip::impl::Conv_cvsip_backend_does_not_support_type<int>
    >

    This message is of course buried deep within the template call stack.

With this patch, all tests pass when using the C-VSIP backends as part 
of the optimized library, except

  - convolution, correlation, fir, and regressions/conv_to_subview
    all of which get a miscompare,

  - solver-lu: uses functionality not provided by C-VSIP BE,
    resulting in a nice unimplemented exception.

All ref-impl tests pass with the ref-impl library.

Patch applied.

				-- Jules

-- 
Jules Bergmann
CodeSourcery
jules at codesourcery.com
(650) 331-3385 x705
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: solvers.diff
URL: <http://sourcerytools.com/pipermail/vsipl++/attachments/20061207/db9bfdbb/attachment.ksh>


More information about the vsipl++ mailing list