Cycles: use LIKELY/UNLIKELY macros

Gives overall ~3% speedup in own tests for BMW scene.
This commit is contained in:
Campbell Barton
2014-05-05 03:49:22 +10:00
parent dc13969e48
commit d828d44d7a
5 changed files with 67 additions and 25 deletions

View File

@@ -50,7 +50,11 @@ CCL_NAMESPACE_BEGIN
/* RenderServices implementation */
#define COPY_MATRIX44(m1, m2) memcpy(m1, m2, sizeof(*m2))
#define COPY_MATRIX44(m1, m2) { \
CHECK_TYPE(m1, OSL::Matrix44*); \
CHECK_TYPE(m2, Transform*); \
memcpy(m1, m2, sizeof(*m2)); \
} (void)0
/* static ustrings */
ustring OSLRenderServices::u_distance("distance");