$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Proto] Reducing domain check in operator
From: Eric Niebler (eric_at_[hidden])
Date: 2009-02-27 01:55:35
joel falcou wrote:
> OK.
> 
> Last question. I changed my make_expr to use domain_of and it worked 
> nice for the base case.
I'm confused. You *were* using domain_of and I told you not to. ???
> 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 >
----^^^^^^
What is domain here?
> , A0 const&>
> exponent( A0 const a0)
> {
> return proto::make_expr< tag::exponent_
> , domain< make_integrer_vec<A0>::info_type > >( boost::cref(a0));
> }
Please post complete code that I can test.
-- Eric Niebler BoostPro Computing http://www.boostpro.com