News for hackers. Stuff that matters.

psurge

C++17 has std::hardware_destructive_interference_size which you can use in conjunction with alignas to get this behavior, see https://en.cppreference.com/w/cpp/thread/hardware_destructiv...

I’m not sure whether a single target architecture can (either in theory or in practice) map to hardware with different line sizes. If so, another problem is that the compiler’s idea of the cache line size might not match the hardware’s.

Re:USB 4 version 2 promises 80 Gbps speeds over existing cables on Thursday September 01, 2022 @07:53PM (#32684924)
And successfully scaling different peaks requires using different kinds of safety rope. Helpfully, the different ropes all look exactly the same.
Re:DDR5 Memory Specification Released on Thursday July 16, 2020 @04:13PM (#23863339)
My understanding is that DRAM processes are sufficiently different from logic processes that they tend to get dedicated fabs. So then companies like Apple would have to buy fab timeshare from RAM manufacturers that have no incentive (as far as I can see) to let them produce DRAM for less than whatever the bulk pricing is.
Does anyone know of any EPYC 7002 servers, preferably single socket ones, that also support EDSFF E1.L SSDs?
Re:Simple Trie Implementation in C++11 on Sunday July 21, 2019 @06:05PM (#20493955)
Thanks for pointing this out! I didn't know that C++17 had relaxed this restriction.
Re:Simple Trie Implementation in C++11 on Sunday July 21, 2019 @05:21PM (#20493739)
I don't think Node can contain a std::vector<Node>, since STL containers cannot have incomplete value types. But maybe I'm misunderstanding you?

I think absl::flat_hash_map<T, std::unique_ptr<Node>> would be worth considering in this application. Keys and values are stored inline, so the memory and creation costs should be comparable to std::vector - https://abseil.io/docs/cpp/guides/container#abslflat_hash_ma...

Re:Simple Trie Implementation in C++11 on Sunday July 21, 2019 @04:47PM (#20493554)
Aren't the second and third lines of the insert/search implementations superfluous? Casting root to a boolean will never return false, since it is initialized. The insert implementation doesn't update root, so if root were nullptr, insert would be throwing away its work.
Re:Microsoft changed how it interviews software developers on Sunday December 30, 2018 @08:06PM (#18792353)
I probably screwed something up, but here's a 16 line attempt in Python, where the regex specials are limited to .?:

    def matches(pattern, s):
        if len(pattern) == 0:
            return True
        c = pattern[0]
        assert c not in ("*", "?")
        if len(pattern) > 1:
            if pattern[1] == "?":
                return (
                    len(s) > 0 and c in (".", s[0]) and matches(pattern[2:], s[1:])
                ) or matches(pattern[2:], s)
            elif pattern[1] == "*":
                for i, d in enumerate(s):
                    if c not in (".", d):
                        break
                return any(matches(pattern[2:], s[j:]) for j in range(i, -1, -1))
        return len(s) > 0 and c in (".", s[0])
OK, I just found the FE TDPs listed on the NVidia site (2080 FE: 225W).
The 2080 TDP seems to be 215W rather than 285W (source: https://www.anandtech.com/show/13249/nvidia-announces-geforc...).

Are you sure the FE TDPs are different from the reference spec? I haven't seen that mentioned anywhere else.

Re:Behind the Tech with John Carmack: 5k Immersive Video on Tuesday June 19, 2018 @01:58PM (#17348883)
The WorldWide Telescope uses this exact idea: http://www.worldwidetelescope.org/docs/worldwidetelescopepro...

There are also other interesting spherical tessellations that could be used - one is implemented in Google's S2 geometry library, the other, HEALPix, is used for astronomical datasets:

http://s2geometry.io/resources/earthcube http://iopscience.iop.org/article/10.1086/427976/pdf