
Eric Niebler a écrit :
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. ??? No, I wasn't and you did ;) What is domain here? template<class SIMDDescriptor> struct simd_domain : bp::domain< simd_generator<SIMDDescriptor> , simd_grammar {};
It's a template domain to go with the template generator of the tempalte expression.
Please post complete code that I can test. Here is a small test case :
http://codepad.org/x1U86VS9 I used string and lexical cast instead of real SIMD value cause the amount of extra code was really large and because those two type has the same non native casting properties than two different vector types. This exhibits the same problem than I have currently aka failure to properly evaluate the to_float expression which is an expression of domain X with a child of domain Z. The error log with g++ 4.3 is : /usr/local/include/boost-1_38/boost/proto/context/callable.hpp||In member function ‘typename boost::result_of<Context ()(typename Expr::proto_tag, typename boost::proto::result_of::value<const Expr&>::type)>::type boost::proto::context::callable_eval<Expr, Context, 0l>::operator()(Expr&, Context&) const [with Expr = const simd_expr<vec<int, 4, boost::proto::exprns_::is_proto_expr>, simd_info<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 4>, boost::proto::exprns_::is_proto_expr>, Context = const simd_context<simd_info<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 4> >]’:| /usr/local/include/boost-1_38/boost/proto/eval.hpp|102|instantiated from ‘typename boost::proto::result_of::eval<Expr, Context>::type boost::proto::eval(Expr&, const Context&) [with Expr = const simd_expr<vec<int, 4, boost::proto::exprns_::is_proto_expr>, simd_info<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 4>, boost::proto::exprns_::is_proto_expr>, Context = simd_context<simd_info<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 4> >]’ ... <snip call tree> ... error.cpp|317|instantiated from here| /usr/local/include/boost-1_38/boost/proto/context/callable.hpp|122|erreur: invalid conversion from ‘int’ to ‘const char*’ /usr/local/include/boost-1_38/boost/proto/context/callable.hpp|122|erreur: initializing argument 1 of ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]’ I hope it's only a glitch on my side :/