feat(cpp): add float16 to c++#3487
Open
UninspiredCarrot wants to merge 19 commits intoapache:mainfrom
Open
Conversation
…at16_t and float
…sentation for float16_t
0e2da14 to
7f948b9
Compare
9df42fe to
56592b2
Compare
…loads for float16_t
5ec9883 to
a884193
Compare
c31812d to
65d35fb
Compare
…et via if constexpr
65d35fb to
cf3a068
Compare
7c116a6 to
ad46532
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
Implement float16_t (IEEE 754 binary16 / half-precision) as a primitive type in the C++ runtime, as required by issue #3208. No C++ standard type represents float16, so the framework needs its own strong type with correct IEEE 754 semantics and serialiser integration.
What does this PR do?
cpp/fory/util/float16.h / float16.cc — new fory::float16_t strong type:
cpp/fory/serialization/struct_serializer.h — serializer integration:
cpp/fory/util/float16_test.cc — exhaustive tests (1300+ lines, 61 test cases):
Related issues
AI Contribution Checklist
yesyes, I included a completed AI Contribution Checklist in this PR description and the requiredAI Usage Disclosure.AI Usage Disclosure
Does this PR introduce any user-facing change?