summaryrefslogtreecommitdiff
path: root/src/common/bit_util.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-01-29Move to Clang Format 15Gravatar Levi Behunin1-3/+3
Depends on https://github.com/yuzu-emu/build-environments/pull/69 clang-15 primary run
2022-04-23general: Convert source file copyright comments over to SPDXGravatar Morph1-3/+2
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-03-09bit_util: Add `bit` utility functionGravatar Wunkolo1-0/+7
Extracts a singular bit, as a bool, from the specified compile-time index.
2022-01-11common: bit_util: Add IsPow2 helper functionGravatar Morph1-0/+6
Makes use of std::has_single_bit() to check whether the value is a power of 2.
2021-11-20TextureCache: Refactor and fix linux compiling.Gravatar Fernando Sahmkow1-0/+7
2021-05-05fixup! common: bit_util: Add BIT macro.Gravatar bunnei1-2/+0
2021-05-05common: bit_util: Add BIT macro.Gravatar bunnei1-0/+2
2021-01-21common: Add missing include to bit_util.hGravatar bunnei1-0/+1
2021-01-21bit_util: Unify implementations of MostSignificantBit32/MostSignificantBit64Gravatar Lioncash1-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.
2021-01-15common/bit_util: Replace CLZ/CTZ operations with standardized onesGravatar Lioncash1-76/+0
Makes for less code that we need to maintain.
2020-08-15common: Make use of [[nodiscard]] where applicableGravatar Lioncash1-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.
2019-06-20texture_cache: Optimize GetMipBlockHeight and GetMipBlockDepthGravatar Fernando Sahmkow1-0/+44
2019-04-05common/bit_util: Make CountLeading/CountTrailing functions have the same ↵Gravatar Lioncash1-8/+8
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.
2019-03-27Fixes and corrections on formatting.Gravatar Fernando Sahmkow1-1/+0
2019-03-27Implement intrinsics CountTrailingZeroes and test it.Gravatar Fernando Sahmkow1-12/+33
2019-03-27Implement a MultiLevelQueueGravatar Fernando Sahmkow1-0/+19
2018-12-21common: Add basic bit manipulation utility function to CommonGravatar Lioncash1-0/+61