#portability
2 posts tagged #portability.
CUDA lock-in is real, and it is not in the C++
The usual account says CUDA's warp primitives and template layers weld your code to Nvidia hardware. Compile the same kernel through a third-party toolchain for an AMD GPU and the warp shuffle comes out as native cross-lane instructions with the addition fused in. What binds you is the toolchain and the licence, not the language.
Ship the C++20 feature and its fallback in one file
The code review that started this series ended with a portability question: use std::osyncstream where it exists, fall back to a mutex where it does not. The feature-test macro __cpp_lib_syncbuf and <version> are the tool for exactly that. One file, the best available tool on each compiler. Episode 6 of the concurrent I/O series.