diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2018-11-13 22:24:12 +0300 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2018-11-14 00:38:08 +0300 |
commit | ec53ec6d5b4ebbb06d5c7209fd4f25634a6ad606 (patch) | |
tree | 2bcdec6fd89091ecdce7c4f5b411fbde385da4ff /include | |
parent | e10b855c530a3a5ed519fcb3f3ec085a6e0aa79e (diff) |
Add support for scaled references
Fixes #121.
Diffstat (limited to 'include')
-rw-r--r-- | include/common/intops.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/common/intops.h b/include/common/intops.h index ddfa62d..62c46af 100644 --- a/include/common/intops.h +++ b/include/common/intops.h @@ -52,6 +52,10 @@ static inline int apply_sign(const int v, const int s) { return s < 0 ? -v : v; } +static inline int apply_sign64(const int v, const int64_t s) { + return s < 0 ? -v : v; +} + static inline int ulog2(const unsigned v) { return 31 - clz(v); } |