Commit Graph

9 Commits (2c4c7aea8adba63af3ebf89bd930b2cacae781a7)

Author SHA1 Message Date
Lioncash 6ff2db181f bit_util: Unify implementations of MostSignificantBit32/MostSignificantBit64
We can use the standardized CLZ facilities to perform this. This also
allows us to make utilizing functions constexpr and eliminate the
inclusion of an intrinsics header.
4 years ago
Lioncash 8620de6b20 common/bit_util: Replace CLZ/CTZ operations with standardized ones
Makes for less code that we need to maintain.
5 years ago
Lioncash df72480395 common: Make use of [[nodiscard]] where applicable
Now that clang-format makes [[nodiscard]] attributes format sensibly, we
can apply them to several functions within the common library to allow
the compiler to complain about any misuses of the functions.
5 years ago
Fernando Sahmkow 94f2be5473 texture_cache: Optimize GetMipBlockHeight and GetMipBlockDepth 6 years ago
Lioncash 33db37e669 common/bit_util: Make CountLeading/CountTrailing functions have the same return types
Makes the return type consistently uniform (like the intrinsics we're
wrapping). This also conveniently silences a truncation warning within
the kernel multi_level_queue.
6 years ago
Fernando Sahmkow db42bcb306 Fixes and corrections on formatting. 6 years ago
Fernando Sahmkow 3bc815a5dc Implement intrinsics CountTrailingZeroes and test it. 6 years ago
Fernando Sahmkow 522957f9f3 Implement a MultiLevelQueue 6 years ago
Lioncash fc8da2d5e3 common: Add basic bit manipulation utility function to Common 7 years ago