summaryrefslogtreecommitdiff
path: root/cogl/cogl-debug.h
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2011-10-28 20:09:53 +0100
committerNeil Roberts <neil@linux.intel.com>2011-11-16 16:21:31 +0000
commit2ba4fe417acb0352e6eca0e1f61627975c9716e3 (patch)
treec316a6b3688bae8c13d4f64e012e817e789d6af1 /cogl/cogl-debug.h
parentf0f9493f5c3abe2e465f5758e21d50292dd43854 (diff)
downloadcogl-2ba4fe417acb0352e6eca0e1f61627975c9716e3.tar.gz
cogl-bitmask: Use ffsl to speedup bitmask iteration
Instead of testing each bit when iterating a bitmask, we can use ffsl to skip over unset bits in single instruction. That way it will scale by the number of bits set, not the total number of bits. ffsl is a non-standard function which glibc only provides by defining GNUC_SOURCE. However if we are compiling with GCC we can avoid that mess and just use the equivalent builtin. When not compiling for GCC it will fall back to _cogl_util_ffs if the size of ints and longs are the same (which is the case on i686). Otherwise it fallbacks to a slow function implementation. Reviewed-by: Robert Bragg <robert@linux.intel.com>
Diffstat (limited to 'cogl/cogl-debug.h')
0 files changed, 0 insertions, 0 deletions