emscripten-core / emscripten-core/emscripten

Is `_Float16` supported by Emscripten?

Open
#23,943 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I tried to compile code from my simulation that uses `_Float16` under the latest version of Emscripten, but I got this compiler error:

```
Particles.cpp:495:9: error: _Float16 is not supported on this target
495 | _Float16 f16test = 100.f16;
| ^
Particles.cpp:495:31: error: invalid suffix 'f16' on floating constant
495 | _Float16 f16test = 100.f16;
| ^
```

I can compile the same code under Windows x64 and Linux x64 with both GCC and Clang. Is `_Float16` not supported at all by Emscripten, or is there a flag to enable support? (hardware support, ideally)

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.