[libcxx-commits] [libcxx] [libc++] <experimental/simd> Add copy functions for class simd/simd_mask (PR #78935)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jan 28 22:52:40 PST 2024
joy2myself wrote:
> Do you know why the test is taking so long?
@philnik777 Louis has mentioned that the main impact on compile time is the instantiation of classes.
In previous tests, we generally traversed all **vectorizable data types** and all **simd ABIs** to instantiate various `simd`/`simd_mask` classes for testing. In this case, there would be a total of **20 (data types) x 21 (ABIs)** times instantiation of a class. However, some interfaces are template functions (such as the copy function in the current PR), which require additional traversal of the types of the template parameter `U`, that is, a total of **20 (T types) x 20 (U types) x 21 (ABIs)** instantiations. In addition, there are 3 different **alignment flags** involved in the copy function, so this test has a total of **20 (T types) x 20 (U types) x 21 (ABIs) x 3 (alignment flags)** instantiations.
Subsequent patches such as SIMD binary operators involve a total of about 10 operators, and the number of instantiations will also be mutiplied.
How should we simplify this?
https://github.com/llvm/llvm-project/pull/78935
More information about the libcxx-commits
mailing list