[vsipl++] [patch] Profiling for IIR, FIR and matrix-vector functions
Don McCoy
don at codesourcery.com
Tue Aug 8 19:08:07 UTC 2006
Jules Bergmann wrote:
>
> - I think that 'impl::Length' would be more efficient than 'Domain'
> for passing view sizes to the Op_count_xyz::value() functions.
>
> - The template parameter to Domain is a 'dimension_type'. To be correct,
> the template parameters for Op_count_xyz classes that take a dimension
> should also use 'dimension_type'. (The same would be true if you switch
> to impl::Length).
>
> Please have a look to see if those make sense. Otherwise it looks
> good, please check it in.
>
Yes. Thanks for pointing that out. Committed with changes as noted below.
> Also, I will rename the MPI specific benchmarks to use the same naming
> convention as IPP and SAL specific benchmarks.
>
Sounds good.
> [1] 'dimension_type' should be used for dimensions (such as D).
> Likewise for several template declarations below.
>
Changed.
> > +namespace matvec
> > +{
> > +template <typename T>
> > +struct Op_count_dot
> > +{
> > + static length_type value(Domain<1> const &dom)
>
> [2] Given the way these functions are called, it will probably be more
> efficient to pass the size as a 'length_type' or a 'impl::Length'
> instead of a 'Domain'. A Domain encodes has offset and stride fields
> that aren't used in the op-count calculation.
>
All these use Length in place of Domain now.
> > const_Vector<T0, Block0> v,
> > const_Vector<T1, Block1> w) VSIP_NOTHROW
> > {
> > - typedef typename Promotion<T0, T1>::type return_type;
> > + typedef typename Promotion<T0, T1>::type result_type;
> > + Domain<1> dom_v( view_domain(v) );
> > + impl::profile::Scope_event event(
> > + impl::matvec::Description<result_type>::tag("dot", dom_v),
> > + impl::matvec::Op_count_dot<result_type>::value(dom_v) );
>
> [3] if you change the Op_count_dot::value to accept a Length, you can
> use the 'extent()' function to get the size of the view as a Length.
> This becomes:
>
> impl::profile::Scope_event event(
> impl::matvec::Description<result_type>::tag("dot", dom_v),
> impl::matvec::Op_count_dot<result_type>::value(extent(v)) );
>
That is nicer. I also found we have a built-in converter for making
Length objects from Domains. That was needed in signal-conv.hpp where
the function returning the output size does so using a domain.
> > Index: benchmarks/GNUmakefile.inc.in
> > ===================================================================
> > --- benchmarks/GNUmakefile.inc.in (revision 145922)
> > +++ benchmarks/GNUmakefile.inc.in (working copy)
> > @@ -41,6 +41,7 @@
> > $(srcdir)/benchmarks/qrd.cpp
> > benchmarks_cxx_srcs_ipp := $(wildcard
> $(srcdir)/benchmarks/*_ipp.cpp)
> > benchmarks_cxx_srcs_sal := $(wildcard
> $(srcdir)/benchmarks/*_sal.cpp)
> > +benchmarks_cxx_srcs_mpi := $(wildcard
> $(srcdir)/benchmarks/mpi_*.cpp)
>
> [4] I will rename the mpi only benchmarks to match the convention.
>
I changed it to *_mpi.cpp to correspond.
Thanks for the suggestions!
--
Don McCoy
don (at) CodeSourcery
(888) 776-0262 / (650) 331-3385, x712
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pm2.diff
URL: <http://sourcerytools.com/pipermail/vsipl++/attachments/20060808/ac9887a6/attachment.ksh>
More information about the vsipl++
mailing list