Conversation
Comment on lines
618
to
+622
| template<class T> | ||
| using make_signed = std::make_signed<T>; | ||
| struct make_signed : std::make_signed<T> {}; | ||
|
|
||
| template<class T> | ||
| using make_unsigned = std::make_unsigned<T>; | ||
| struct make_unsigned : std::make_unsigned<T> {}; |
There was a problem hiding this comment.
thats fine just annotate why its struct and not using
|
|
||
| template<> | ||
| struct NBL_ADD_STD make_signed<nbl::hlsl::emulated_int64_t> : type_identity<nbl::hlsl::emulated_int64_t> {}; | ||
|
|
There was a problem hiding this comment.
yes this is fine
Comment on lines
+262
to
+266
| const int32_t msbSigned = _static_cast<int32_t>(operand.__getMSB()); | ||
| const int32_t shiftSigned = _static_cast<int32_t>(shift); | ||
| const int32_t bitsSigned = _static_cast<int32_t>(bits); | ||
| const type_t shifted = type_t::create(bigShift ? vector<uint32_t, 2>(_static_cast<uint32_t>(msbSigned >> shiftSigned), msbSigned < 0 ? ~uint32_t(0) : uint32_t(0)) | ||
| : vector<uint32_t, 2>((operand.__getMSB() << shift) | (operand.__getLSB() >> bits), _static_cast<uint32_t>(msbSigned >> bitsSigned))); |
There was a problem hiding this comment.
@Przemog1 review that it does the same thing
Comment on lines
+101
to
+102
| // Integer conversions use the same round-toward-zero mode as arithmetic. | ||
| mantissa = val >> _static_cast<uint64_t>(-shiftCnt); |
There was a problem hiding this comment.
no need to cast to uint64, or does compiler complain about you not using a shift operand of the same type ?
Everything should really be int16_t from findMSB onwards
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.
Description
Testing
TODO list: