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.
-- YK
--
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 not just shorten
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.
Defined if_PT and if_PF for predict true
and predict false respectively.
Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il
---
include/complib/cl_types_osd.h | 17 -
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/include/complib/cl_types_osd.h
+#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
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 statements