[libcxx-commits] [libcxx] [libc++] <experimental/simd> Reduce compilation time of reference assignment test (PR #72632)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 23 14:50:18 PST 2023
================
@@ -29,11 +29,9 @@ struct CheckSimdReferenceAssignmentHelper {
void operator()() const {
if constexpr (std::is_assignable_v<T&, U&&>) {
ex::simd<T, SimdAbi> origin_simd([](T i) { return i; });
- for (size_t i = 0; i < origin_simd.size(); ++i) {
- static_assert(noexcept(origin_simd[i] = static_cast<U>(i + 1)));
- origin_simd[i] = static_cast<U>(i + 1);
- assert(origin_simd[i] == static_cast<T>(std::forward<U>(i + 1)));
- }
+ static_assert(noexcept(origin_simd[0] = static_cast<U>(5)));
----------------
ldionne wrote:
I don't think this actually reduces the compilation time since there's no additional instantiations being performed here. This is just code running at runtime, and the runtime of the test is not the issue. Did I miss something?
https://github.com/llvm/llvm-project/pull/72632
More information about the libcxx-commits
mailing list