summaryrefslogtreecommitdiffstats
path: root/src/common/bit_util.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bit_util: Add `bit` utility functionWunkolo2022-03-091-0/+7
| | | | Extracts a singular bit, as a bool, from the specified compile-time index.
* common: bit_util: Add IsPow2 helper functionMorph2022-01-111-0/+6
| | | | Makes use of std::has_single_bit() to check whether the value is a power of 2.
* TextureCache: Refactor and fix linux compiling.Fernando Sahmkow2021-11-201-0/+7
|
* common: Add missing include to bit_util.hbunnei2021-01-221-0/+1
|
* bit_util: Unify implementations of MostSignificantBit32/MostSignificantBit64Lioncash2021-01-211-35/+13
| | | | | | 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.
* common/bit_util: Replace CLZ/CTZ operations with standardized onesLioncash2021-01-151-76/+0
| | | | Makes for less code that we need to maintain.
* common: Make use of [[nodiscard]] where applicableLioncash2020-08-151-17/+17
| | | | | | 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.
* texture_cache: Optimize GetMipBlockHeight and GetMipBlockDepthFernando Sahmkow2019-06-211-0/+44
|
* common/bit_util: Make CountLeading/CountTrailing functions have the same return typesLioncash2019-04-051-8/+8
| | | | | | 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.
* Fixes and corrections on formatting.Fernando Sahmkow2019-03-271-1/+0
|
* Implement intrinsics CountTrailingZeroes and test it.Fernando Sahmkow2019-03-271-12/+33
|
* Implement a MultiLevelQueueFernando Sahmkow2019-03-271-0/+19
|
* common: Add basic bit manipulation utility function to CommonLioncash2018-12-211-0/+61