3 ms·
My main experience is on clang primarily for arm64 systems, where it works just fine (give or take some terrible codegen at times if using llvm's extended vecto
by owlbite 5y ago
My main experience is on clang primarily for arm64 systems, where it works just fine (give or take some terrible codegen at times if using llvm's extended vector support).
Intel support is a bit more dubious, especially if you're stuck on older LLVM versions, but __fp16 works for most purposes if all you want is storage. You just have to pass any fp16 function parameters as pointers/references to work around the aforementioned ABI issue. Architecturally intel has supported fp16 conversions necessary for __fp16 for quite a while now, so no reason for it not to work (whereas full fp16 arithmetic is restricted to some less common variants of avx512 iirc, so the distinction between __fp16 and _Float16 isn't much on most intel systems).
It should be fairly straightforward to write a quick test program and see what your local compilers can cope with.