Commit 9a48df2e authored by Steve Lhomme's avatar Steve Lhomme

add helper functions for ctz/clz

parent 79764604
......@@ -51,4 +51,16 @@
#define ALIGN_STK_16(type, var, sz1d, sznd) \
ALIGN(type var[sz1d]sznd, 16)
static inline int ctz(const unsigned int mask) {
return __builtin_ctz(mask);
}
static inline int clz(const unsigned int mask) {
return __builtin_clz(mask);
}
static inline int clzll(const unsigned long long mask) {
return __builtin_clzll(mask);
}
#endif /* __DAV1D_COMMON_ATTRIBUTES_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment