-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolve test failures and generalize implementation, removing code duplication #20
Merged
Conversation
This file contains 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
Recognize std::ranges::zip_view as range argument: If it's made up of simd_execution_ranges, simdize from the original ranges, skipping the std::ranges::zip mechanism. To test the std::ranges::zip_view, compile in C++23 mode (if possible). ChangeLog: * Makefile: Determine -std=... flag using latest_std_flag.sh and use it instead of gnu++2a. * latest_std_flag.sh: New file. * testsuite/tests/transform.cc: Ensure no overflow/wrapping on sizeof(T) == 1 element types. Try harder to actually hit the prologue code. Add zip test case. * vir/detail.h: Use constexpr_wrapper instead of integral_constant. (unroll2): New. * vir/simd_execution.h (detail::prologue): Compute max_misalignment and pass it to prologue callback (to avoid mismatched calculations). (detail::simdized_load_and_invoke), (detail::simdized_load_flag1_and_invoke): New. (detail::simd_transform_prologue): Rewrite for pack of input ranges, using simdized_load_and_invoke. Assert correct size argument. (detail::simd_transform_epilogue): Rewrite for pack of input ranges, using simdized_load_and_invoke. (detail::transform): Generalized for pack of input ranges from two-input vir::transform. Fix prologue call to start with size 1. (detail::simd_transform_reduce_prologue), (detail::simd_transform_reduce_epilogue): Replace std::apply call with simdized_load_flag1_and_invoke. (detail::transform_reduce): Replace std::apply call with simdized_load_and_invoke/simdized_load_flag1_and_invoke. (vir::transform): Implement using detail::transform. Add overload for zip_view input range. (std::transform): Implement using vir::detail::transform. * vir/simdize.h (vir::resize_simdize_t): New.
ChangeLog: * vir/simd_permute.h: Remove unused v8sf alias.
ChangeLog: * vir/simd.h: #include <algorithm>.
ChangeLog: * vir/simd_execution.h (detail::memory_alignment): Adapted from original memory_alignment_v constexpr-if implementation. (detail::memory_alignment_v): Implement using memory_alignment.
ChangeLog: * vir/detail.h: Make definition of unroll and unroll2 conditional on VIR_HAVE_CONSTEXPR_WRAPPER.
GCC 11 doesn't like static constexpr automatic variables. ChangeLog: * vir/simd_execution.h: Remove static on constexpr_wrapper variables and pass the variable explicitly by value into lambda captures or capture as constexpr int by reference and use vir::cw explicitly when necessary.
ChangeLog: * testsuite/tests/bits/verify.h (test::_S_fuzzyness): Explicitly initialize to 0 for non-floating-point T to avoid -Wliteral-conversion warning.
This should be more efficient at compile time, too. ChangeLog: * vir/constexpr_wrapper.h (detail::cw_parse): Parse literal without calling from_chars (not constexpr in older stdlibs).
ChangeLog: * vir/simd_bit.h (simd_bit_cast): If src and dst are trivially copyable, use detail::bit_cast. Otherwise, if libstdc++ 12 or later is available, call stdx::__proposed::simd_bit_cast.
When compiling with emscripten em++ FE_INEXACT and __STDC_IEC_559__ are not defined. ChangeLog: * testsuite/tests/math_1arg.cc: Without FE_INEXACT float exceptions are not test anyway. Just #ifdef the code. * testsuite/tests/operators.cc: If neither __GCC_IEC_559 nor __STDC_IEC_559__ are defined assume no IEC60559 compliance.
ChangeLog: * testsuite/tests/operator_cvt.cc: Disable a few tests involving long when native == fixed_size, these tests are handled already, conditional on sizeof(long).
mattkretz
force-pushed
the
std-transform-reduce
branch
from
October 27, 2023 13:15
f50b2fc
to
dffe1eb
Compare
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.
No description provided.