Boost logo

Boost Users :

Subject: Re: [Boost-users] [Proto] Reducing domain check in operator
From: joel falcou (joel.falcou_at_[hidden])
Date: 2009-02-27 01:24:32


OK.

Last question. I changed my make_expr to use domain_of and
it worked nice for the base case.
Then I changed the domain of the
exponent thingy.

exponent takes a float/double vec adn return
an integral vec of the same size. So I gave to
simd_expr<tag::exponent_> the same domain as vec<integer>. Now
I can build things like :

exponent(vf) + vi with the proper
type and everything works.

Now, I had some strange behavior in
my calalble_context. When I debug it, it seems that the type of
exponent(vf) is

simd_expr< vec<float,4>, domain<
simd_info<int,4> > >

instead of some :

simd_expr< bp::terminal<vec<float,4> >, domain<
simd_info<int,4> > >
 
So I don't how how to catch
it in my context operator() overload.

For info, my exponent
function is something like :

template<class A0> static
inline typename
proto::result_of::make_expr< tag::exponent_
,
domain< make_integrer_vec<A0>::info_type >
, A0
const&>
exponent( A0 const a0)
{
return
proto::make_expr< tag::exponent_
 , domain<
make_integrer_vec<A0>::info_type > >( boost::cref(a0));
}



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net