summaryrefslogtreecommitdiffstats
path: root/src/common/alignment.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-07-19alignment: explicitly include <new> after 723edb4c0659Jan Beich1-0/+1
In file included from src/core/hle/kernel/memory/page_table.cpp:5: src/./common/alignment.h:67:68: error: no member named 'align_val_t' in namespace 'std' return static_cast<T*>(::operator new (n * sizeof(T), std::align_val_t{Align})); ~~~~~^ src/./common/alignment.h:71:51: error: no member named 'align_val_t' in namespace 'std' ::operator delete (p, n * sizeof(T), std::align_val_t{Align}); ~~~~~^
2020-07-17alignment: Simplify AlignmentAllocator implementationLioncash1-43/+4
With C++20, much of the allocator interface has been simplified, so we can make the same adjustments.
2020-07-12common/alignment: Fix compilation errors (#4303)Tobias1-1/+3
2020-07-12Revert "Port citra-emu/citra#5441: "Common: remove a mod from AlignUp""bunnei1-3/+1
2020-07-11Common: remove a mod from AlignUp (#5441)Marshall Mohror1-1/+3
In cases where the size is not a known constant when inlining, AlignUp<std::size_t> currently generates two 64-bit div instructions. This generates one div and a cmov which is significantly cheaper.
2020-04-17common: alignment: Add a helper function for generic alignment checking.bunnei1-0/+7
2019-10-07alignment: Resolve allocator construction issues on debugLioncash1-0/+5
This was related to the source allocator being passed into the constructor potentially having a different type than allocator being constructed. We simply need to provide a constructor to handle this case. This resolves issues related to the allocator causing debug builds on MSVC to fail.
2019-10-07alignment: Specify trait definitions within the allocatorLioncash1-0/+5
Allows containers and other data structures to consider optimizations based off of them. We satisfy all of these requirements anyways.
2019-07-20Common/Alignment: Add noexcept where required.Fernando Sahmkow1-5/+5
2019-07-19Kernel: Address FeedbackFernando Sahmkow1-3/+2
2019-07-19Common: Correct alignment allocator to work on C++14 or higher.Fernando Sahmkow1-37/+19
2019-07-19VM_Manager: Align allocated memory to 256bytesFernando Sahmkow1-0/+79
This commit ensures that all backing memory allocated for the Guest CPU is aligned to 256 bytes. This due to how gpu memory works and the heavy constraints it has in the alignment of physical memory.
2019-06-24common/alignment: Address feedbackReinUsesLisp1-2/+3
2019-06-21video_core: Use un-shifted block sizes to avoid integer divisionsReinUsesLisp1-0/+5
Instead of storing all block width, height and depths in their shifted form: block_width = 1U << block_shift; Store them like they are provided by the emulated hardware (their block_shift form). This way we can avoid doing the costly Common::AlignUp operation to align texture sizes and drop CPU integer divisions with bitwise logic (defined in Common::AlignBits).
2018-10-18common: Add function for checking word alignment to alignment.hLioncash1-0/+6
This will be used in a following change to svcArbitrateLock() and svcArbitrateUnlock()
2018-10-18common: Move Is4KBAligned() to alignment.hLioncash1-0/+6
Aligning on 4KB pages isn't a Switch-specific thing, so this can be moved to common so it can be used with other things as well.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-2/+2
2018-08-08common: Convert type traits templates over to variable template versions where applicableLioncash1-2/+2
Uses the C++17 inline variable variants
2016-03-13PICA: Align vertex attributesJannik Vogel1-0/+22