On 1/10/2020 07:04, Matt Borland wrote:
A recurring discussion in Boost.Math has been needing a cross-platform way to query the L1D cache size of a machine. I have most of a solution in a [personal repo](https://github.com/mborland/cache). It did not make sense to us to have this in Boost.Math because it would be useful outside of that scope, but we did not know where it should go. Is there an existing library where this would fit? If necessary I can roll it into a library submission that exposes the functionality of CPUID.
C++17 already provides these [1]; this is determined at compile time based on typical values for the platform rather than the precise values for a particular machine, but since the most common usage for this information in my experience is to decide strides in data structures, that's usually when you need to know it. [1]: https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_s...