[Bug libstdc++/88466] [C++17] Support std::hardware_destructive_interference_size and std:: hardware_constructive_interference_size

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 12 17:26:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88466

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Duarte from comment #2)
> One option could be to just use whatever values linux uses :)

The linux kernel allows the cache line sizes to be set at boot (for some h/w)
which doesn't really map well to a constexpr variable with a fixed value.

So far the state of the art seems to be "just set them both to 64" which is a
bit pointless. We don't need two incredibly verbose ways to spell the constant
64.

We probably want a target hook, so that different target backends can customise
the value for different hardware revisions (potentially with target-specific
command-line flags to override it). Or we just set them both to 64.


More information about the Gcc-bugs mailing list