Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This code generated a CPU table specifically designed for my 13th gen Intel CPU. While I cannot guarantee its compatibility with other setups I believe that the underlying principles and overall concept should work on different systems as well. Hope this helps/gives ideas!
Output for my 13700k:
:: Affinity table for 13th Gen Intel(R) Core(TM) i7-13700K with Hyperthreading
:: Thread # = Value = BitMask
:: P-Core 0 = 1 = 00000001
:: P-Core 1 = 2 = 00000010
:: P-Core 2 = 4 = 00000100
:: P-Core 3 = 8 = 00001000
:: P-Core 4 = 16 = 00010000
:: P-Core 5 = 32 = 00100000
:: P-Core 6 = 64 = 01000000
:: P-Core 7 = 128 = 10000000
:: P-Core 8T = 256 = 1 00000000
:: P-Core 9T = 512 = 10 00000000
:: P-Core 10T = 1024 = 100 00000000
:: P-Core 11T = 2048 = 1000 00000000
:: P-Core 12T = 4096 = 10000 00000000
:: P-Core 13T = 8192 = 100000 00000000
:: P-Core 14T = 16384 = 1000000 00000000
:: P-Core 15T = 32768 = 10000000 00000000
:: E-Core 16 = 65536 = 100000000 00000000
:: E-Core 17 = 131072 = 1000000000 00000000
:: E-Core 18 = 262144 = 10000000000 00000000
:: E-Core 19 = 524288 = 100000000000 00000000
:: E-Core 20 = 1048576 = 1000000000000 00000000
:: E-Core 21 = 2097152 = 10000000000000 00000000
:: E-Core 22 = 4194304 = 100000000000000 00000000
:: E-Core 23 = 8388608 = 1000000000000000 00000000