Re: [PATCH 2/8] opensm/complib: define "if" statements with branch prediction hints

2012-09-11 Thread Yevgeny Kliteynik
> > I would not abstract the 'if' statement. If CL_PREDICT_FALSE/TRUE are not > readable, then shorten those. > > if (PF(...)) > > is just as readable as > > if_PF(...) OK, agree. I'll issue a v2 shortly - the only difference would be change in this macro and rebase to the updated trunk. --

RE: [PATCH 2/8] opensm/complib: define "if" statements with branch prediction hints

2012-08-27 Thread Hefty, Sean
> On 8/15/2012 12:54 AM, Jason Gunthorpe wrote: > > On Tue, Aug 14, 2012 at 09:39:23PM +, Hefty, Sean wrote: > >>> +#define if_PF(cond) if(CL_PREDICT_FALSE(cond)) > >>> +#define if_PT(cond) if(CL_PREDICT_TRUE(cond)) > >> > >> If CL_PREDICT_TRUE/FALSE are too long, why

Re: [PATCH 2/8] opensm/complib: define "if" statements with branch prediction hints

2012-08-26 Thread Yevgeny Kliteynik
On 8/26/2012 4:43 PM, Yevgeny Kliteynik wrote: > >> If you are typing these so often (ie more than in some datastructure >> kernels) that the length is a problem then you really should be using >> profile guided optimization instead... > > I'm trying to optimize all the 'if' conditions in the SM.

Re: [PATCH 2/8] opensm/complib: define "if" statements with branch prediction hints

2012-08-26 Thread Yevgeny Kliteynik
Hi, Sorry for the delay with a response - just got back from a long vacation. On 8/15/2012 12:54 AM, Jason Gunthorpe wrote: > On Tue, Aug 14, 2012 at 09:39:23PM +, Hefty, Sean wrote: >>> +#define if_PF(cond)if(CL_PREDICT_FALSE(cond)) >>> +#define if_PT(cond)if(

Re: [PATCH 2/8] opensm/complib: define "if" statements with branch prediction hints

2012-08-14 Thread Jason Gunthorpe
On Tue, Aug 14, 2012 at 09:39:23PM +, Hefty, Sean wrote: > > +#define if_PF(cond)if(CL_PREDICT_FALSE(cond)) > > +#define if_PT(cond)if(CL_PREDICT_TRUE(cond)) > > If CL_PREDICT_TRUE/FALSE are too long, why not just shorten those, > rather than abstract if stateme

RE: [PATCH 2/8] opensm/complib: define "if" statements with branch prediction hints

2012-08-14 Thread Hefty, Sean
> +#define if_PF(cond) if(CL_PREDICT_FALSE(cond)) > +#define if_PT(cond) if(CL_PREDICT_TRUE(cond)) If CL_PREDICT_TRUE/FALSE are too long, why not just shorten those, rather than abstract if statements behind a macro? -- To unsubscribe from this list: send the line "unsubscribe l