Re: [proto] vector of proto expressions

2011-03-18 Thread Nate Knight
In pseudo code it should look like this: Expressions N expressions; construct( expressions );// or something similar do_step( epxressions , x ); // my method How about something like? ~ #include boost/proto/proto.hpp using namespace boost::proto;

Re: [proto] vector of proto expressions

2011-03-18 Thread Nate Knight
On Mar 18, 2011, at 9:17 AM, Karsten Ahnert wrote: Hmm, this might work. It is similar to my_method( fusion::make_vector( i+i , i*i*i , i*i ) , x ); But the expression might become really large, say 100 elements. A separation between construction and usage would be nicer. How about?

Re: [proto] Nested Transforms

2011-02-28 Thread Nate Knight
On Feb 26, 2011, at 4:55 AM, Eric Niebler wrote: On 2/26/2011 8:18 AM, Nate Knight wrote: int main() { la::state_type x = {1.0,2.0}; la::state_type const xc = x; // this compiles la::EvalOpt()( lit(x)[1] ); // this fails to compile //la::EvalOpt()( lit(xc)[1

Re: [proto] proto performance

2011-02-24 Thread Nate Knight
On Feb 20, 2011, at 4:43 AM, Joel Falcou wrote: On 20/02/11 12:41, Eric Niebler wrote: On 2/20/2011 6:40 PM, Joel Falcou wrote: On 20/02/11 12:31, Karsten Ahnert wrote: It is amazing that the proto expression is faster then the naive one. The compiler must really love the way proto

Re: [proto] proto performance

2011-02-24 Thread Nate Knight
Not sure what happened to those tables. I'll try again. MacBook Pro, 10.6.6, Core 2 Duo ProtoContextProtoTransform ProtoLambda Loop GCC 4.2.1 (Apple) : 5.3565438 5.3721942 126.38458 1.3657978 GCC 4.4.5 : 1.8878364

Re: [proto] pod_generator Question

2011-02-12 Thread Nate Knight
On 2/12/2011 7:17 AM, Nate Knight wrote: I see in the Proto documentation a trick for getting the Proto operator overloads found by ADL using something like templateclass T, class Dummy = proto::is_proto_expr struct my_complex { BOOST_PROTO_EXTENDS( typename proto::terminalstd

Re: [proto] Proto Transform Questions

2011-01-18 Thread Nate Knight
Eric Niebler eric@... writes: This is a fun little problem. The answer is very simple, but requires some knowledge of proto's pass_through transform, possessed by proto::nary_expr (and friends): Eric, Thanks for the pointers. I had tried this with nary_expr, but had some trouble

[proto] Proto Transform Questions

2011-01-15 Thread Nate Knight
them all). Also, as written the transform doesn't recurse properly, and I'm having some trouble seeing how to correct this. As I'm really just trying to get my mind around how proto works, any comments would be appreciated. Thanks Nate Knight test2.cpp Description: test2.cpp