/// @ref gtc_integer namespace glm{ namespace detail { template struct compute_log2 { GLM_FUNC_QUALIFIER static vec call(vec const& v) { //Equivalent to return findMSB(vec); but save one function call in ASM with VC //return findMSB(vec); return vec(detail::compute_findMSB_vec::call(v)); } }; # if GLM_HAS_BITSCAN_WINDOWS template struct compute_log2<4, int, Q, false, Aligned> { GLM_FUNC_QUALIFIER static vec<4, int, Q> call(vec<4, int, Q> const& v) { vec<4, int, Q> Result; _BitScanReverse(reinterpret_cast(&Result.x), v.x); _BitScanReverse(reinterpret_cast(&Result.y), v.y); _BitScanReverse(reinterpret_cast(&Result.z), v.z); _BitScanReverse(reinterpret_cast(&Result.w), v.w); return Result; } }; # endif//GLM_HAS_BITSCAN_WINDOWS }//namespace detail }//namespace glm