Boost logo

Boost :

Subject: Re: [boost] cache size runtime detection
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-08-17 10:41:55


On 17.08.2015 17:28, Joel FALCOU wrote:
> We have a bunch of cross-platform CPU cache size and cache line size
> detection that we want to offload into boost in preparation for the
> first reviewable version of Boost.SIMD.
>
> It's rather smallish in term of API but the code is non-trivial. I think
> it's a bit broad to be in utility/core, doesn't really fit in align and
> IIRC there is no "general memory related" library in Boost.
>
> Questions:
>
> 1/ would there be interest to have such utility in Boost ?

Yes. At least, that would be interesting for me.

> 2/ here should we put it ? Is Boost.Memory a viable solution or could it
> be hosted somewhere non-trivial ?

It should definitely be a dedicated library. What I was thinking of for
quite some time is a bit broader. My idea is a system capabilities
library (Boost.SystemCaps) which would offer a generic interface for
querying the current system properties such as:

- Number of CPU cores/threads.
- Current CPU core capabilities (vendor string, instruction set
extensions, cache properties, etc.). Probably, this would need to
support heterogenous systems as well.
- System RAM size.
- OS version string.

There may be many more properties to query for in the future, but at
least those would be a good start, IMHO.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk