Skip to content

sapozhnikovv/CacheLine.CPU.SCU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Cross-platform lib to get CPU cache line size

Cross-platform library:
✅ Windows
✅ Linux
✅ Mac

Example ConsoleApp with docker file

Nuget

NuGet
multi-target package:
✅ .net7.0
✅ .net8.0
✅ .net9.0

https://www.nuget.org/packages/CacheLine.CPU.SCU

dotnet add package CacheLine.CPU.SCU

or

NuGet\Install-Package CacheLine.CPU.SCU

Example of using

namespace CacheLine.CPU.SCU;

var lineSize = CacheLine.GetSize(false);//or CacheLine.Size - it is failsafe method
Console.WriteLine($"Line size = {lineSize} bytes");

License

Free MIT license (https://github.com/sapozhnikovv/CacheLine.CPU.SCU/blob/main/LICENSE)