Added uint log2 and deprecate GTX_unsigned_int

This commit is contained in:
Christophe Riccio
2011-10-11 15:31:16 +01:00
parent e3da53946e
commit 09ee14ad4c
8 changed files with 235 additions and 81 deletions

View File

@@ -42,6 +42,7 @@ namespace detail
detail::type<genFIType>::is_float ||
detail::type<genFIType>::is_int, "'abs' only accept floating-point and integer inputs");
return x >= genFIType(0) ? x : -x;
// TODO, perf comp with: *(((int *) &x) + 1) &= 0x7fffffff;
}
};