Skip to content

feat: Allow different RawData types#526

Open
toseko wants to merge 9 commits intomasterfrom
feat/tkozak-allow-different-rawdata-types
Open

feat: Allow different RawData types#526
toseko wants to merge 9 commits intomasterfrom
feat/tkozak-allow-different-rawdata-types

Conversation

@toseko
Copy link
Copy Markdown
Contributor

@toseko toseko commented Oct 13, 2025

No description provided.

@toseko toseko requested a review from killenb October 13, 2025 07:11
Comment thread backends/LogicalNameMapping/src/LNMBitRangeAccessPlugin.cc Outdated
Comment thread src/FixedPointConverter.cc Outdated
Comment thread include/FixedPointConverter.h Outdated
Comment thread include/FixedPointConverter.h Outdated
Comment thread include/FixedPointConverter.h Outdated
Comment thread include/FixedPointConverter.h Outdated
Comment thread include/FixedPointConverter.h Outdated
Comment thread include/FixedPointConverter.h Outdated
Comment thread include/FixedPointConverter.h Outdated
Comment thread include/FixedPointConverter.h Outdated
Copy link
Copy Markdown
Member

@killenb killenb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should make a static assert for the moment that the FixedPointConverter is only instantiated with int32_t?

Apart from that I think we are ready to merge to the master. I would do a full final review af the remaining issues are fixed (only did the delta of the comments and the commit, and lost the overview)

Comment thread backends/LogicalNameMapping/src/LNMBitRangeAccessPlugin.cc Outdated
Comment thread backends/LogicalNameMapping/src/LNMBitRangeAccessPlugin.cc Outdated
Comment thread include/FixedPointConverter.h Outdated
Comment thread include/FixedPointConverter.h Outdated
Comment thread include/FixedPointConverter.h
Comment thread include/FixedPointConverter.h Outdated
Comment thread include/FixedPointConverter.h Outdated
Comment thread include/FixedPointConverter.h Outdated
@toseko toseko force-pushed the feat/tkozak-allow-different-rawdata-types branch from a6c8cbf to c566c84 Compare November 6, 2025 16:30
Comment thread include/FixedPointConverter.h
Comment thread include/FixedPointConverter.h
Comment on lines +316 to +319
return numericToUserType<UserType>(f * *(std::bit_cast<uint32_t*>(&rawValue)));
}
else if constexpr(sizeof(RawType) == 8) {
return numericToUserType<UserType>(f * *(std::bit_cast<uint64_t*>(&rawValue)));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These will start giving trouble if we have 64 bit values with more than 48 significant bits and negative fractional bits > -(64-nSignificant). I guess it's not a realistic scenario, but you would want 64 bit integer user type, which can hold the full resolution, but it is converted through double, which can only hold 48 significant bits.\

#define SIGNED_HEX_TO_DOUBLE(INPUT) static_cast<double>(static_cast<int32_t>(INPUT))
#define SIGNED_HEX_TO_INT64(INPUT) static_cast<int64_t>(static_cast<int32_t>(INPUT))

#define SIGNED_HEX16_TO_DOUBLE(INPUT) static_cast<double>(static_cast<int16_t>(INPUT))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about SIGNED_HEX64_TOxxx ?

Comment thread tests/executables_src/testFixedPointConverter.cpp
@killenb killenb force-pushed the feat/tkozak-allow-different-rawdata-types branch from 5932365 to 846c302 Compare February 2, 2026 15:46
@killenb killenb force-pushed the feat/tkozak-allow-different-rawdata-types branch from 846c302 to ba74da6 Compare February 2, 2026 17:08
mhier and others added 6 commits February 19, 2026 17:06
This is not allowed according to the TransferElement specification.
Seems to be unused anyway.
When the provided initial values were not yet consistent, but a data
update coming in turned them into a consistent set, the data made
available to the user was corrupt, due to unnecessary buffer switch happening
@toseko toseko force-pushed the feat/tkozak-allow-different-rawdata-types branch from e193493 to 197b95a Compare February 19, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants