aboutsummaryrefslogtreecommitdiff
path: root/src/common/ring_buffer.h
Commit message (Collapse)AuthorAgeFilesLines
* [common] rework BitField and BitUtil, use concepts whenever possible (#4076)lizzie2026-07-091-4/+2
| | | | | | | | | | test no regressions especially on Liiinux Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4076 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [cmake] enable clang-cl and WoA builds (#348)lizzie2025-09-091-6/+6
| | | | | | | | | | | | | | Compilation and CMake fixes for both Windows on ARM and clang-cl, meaning Windows can now be built on both MSVC and clang on both amd64 and aarch64. Compiling on clang is *dramatically* faster so this should be useful for CI. Co-authored-by: crueter <crueter@eden-emu.dev> Co-authored-by: crueter <crueter@crueter.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/348 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [cmake] fix nx_tzdb msvc link error (tmp) (#356)crueter2025-08-301-0/+1
| | | | | | | | | | | | | This is an incredibly stupid and nonsensical bug that I have no way of possibly explaining. This is a temporary workaround until I can reproduce it and figure it out. Otherwise MSVC linker crashes during final link phase. thanks microsoft Signed-off-by: crueter <crueter@crueter.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/356 Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: crueter <crueter@crueter.xyz> Co-committed-by: crueter <crueter@crueter.xyz>
* [audio] fix ringbuffer datarace (#205)lizzie2025-08-281-25/+17
| | | | | | | | Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/205 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* common/ring_buffer: Include <limits> headerwheremyfoodat2024-02-241-0/+1
|
* ring_buffer: Use feature macroFearlessTobi2023-12-251-1/+1
| | | | Co-Authored-By: GPUCode <47210458+GPUCode@users.noreply.github.com>
* ring_buffer: Fix const usage on std::spanMorph2023-06-301-1/+1
|
* Remove memory allocations in some hot pathsKelebek12023-06-221-1/+2
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-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.
* common: Reduce unused includesameerj2022-03-191-1/+0
|
* ring_buffer: Remove granularity template argumentMerryMage2021-02-061-11/+10
| | | | | | Non-obvious bug in RingBuffer::Push(std::vector<T>&) when granularity != 1 Just remove it altogether because we do not have a use for granularity != 1
* common: Make use of [[nodiscard]] where applicableLioncash2020-08-151-2/+2
| | | | | | 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.
* ring_buffer: Use std::atomic_size_t in a static assertLioncash2018-09-181-1/+1
| | | | Avoids the need to repeat "std::" twice
* ring_buffer: Use std::hardware_destructive_interference_size to determine ↵Lioncash2018-09-181-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | alignment size for avoiding false sharing MSVC 19.11 (A.K.A. VS 15.3)'s C++ standard library implements P0154R1 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0154r1.html) which defines two new constants within the <new> header, std::hardware_destructive_interference_size and std::hardware_constructive_interference_size. std::hardware_destructive_interference_size defines the minimum recommended offset between two concurrently-accessed objects to avoid performance degradation due to contention introduced by the implementation (with the lower-bound being at least alignof(max_align_t)). In other words, the minimum offset between objects necessary to avoid false-sharing. std::hardware_constructive_interference_size on the other hand defines the maximum recommended size of contiguous memory occupied by two objects accessed wth temporal locality by concurrent threads (also defined to be at least alignof(max_align_t)). In other words the maximum size to promote true-sharing. So we can simply use this facility to determine the ideal alignment size. Unfortunately, only MSVC supports this right now, so we need to enclose it within an ifdef for the time being.
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-25/+25
|
* common: Implement a ring bufferMerryMage2018-09-081-0/+111