This patch implements the extended version (see P0820) of P0214
concat() and split().
If compiled with Clang, sometimes they are implemented in terms of
__builtin_shufflevector to avoid relying on auto-vectorization.
Paths
| Differential D41412
[libcxx] implement <experimental/simd> concat() and split() Needs ReviewPublic Authored by timshen on Dec 19 2017, 1:21 PM.
Details
Summary This patch implements the extended version (see P0820) of P0214 If compiled with Clang, sometimes they are implemented in terms of
Diff Detail
Event Timelinetimshen added a child revision: D41415: [libcxx] implement <experimental/simd> casts..Dec 19 2017, 2:48 PM
Comment Actions A note on test cases: I only used simds ints to test split() and concat(), as both functions don't specialize on the element type, unlike the constructors.
Comment Actions Hi @timshen, I am very interested in these patches. Any chance you can take up the upstreaming process again? Best, Comment Actions
I'm glad to spend time upstreaming these patches. Now we just need a libc++ maintainer to take on the reviews. I'll try to contact mclow, but I'm not sure how exactly to reach Marshall. Comment Actions It seems this patch went through at least one review and the only open comment is the discussion if __builtin_shuffle should be placed in the configuration. From my perspective, both solutions are technically feasible. While it seems unlikely that gcc will gain this specific builtin, I can see @mclow.lists preferring to be consistent in keeping compiler-specific stuff in one file rather than having to evaluate for each extension the likeliness of this extension being adopted over time. If you don't feel strongly about this change, I guess moving it to _config would address this last point and would require then only an ok, but no further discussions. If you cannot reach @mclow.lists I am happy to either reach out or check for other reviewers. Eric Fiselier seems very active at the moment. Comment Actions Tobias, I spoke to @EricWF who is willing to take a look at all these patches. However, I don't know when exactly will the review starts. Comment Actions
Amazing. I am super interested in seeing this moving but am happy to give you some time to get started. ;-) Thanks a lot for picking this up! Comment Actions @EricWF thanks again for offering your help here. We are not in a rush here, but I wonder if you happen to have a rough estimate when you might have the time to look into these patches? Comment Actions @EricWF and @timshen, @maxf and I are indeed very interested in seeing this library upstreamed soon. Over the last weeks, we developed a software prototype based on these bindings and already started to tune performance on clang/LLVM. As part of this, we looked into efficient vector code generation, started to implement where expressions, ... Currently, everything is very much prototype quality, but we would very much prefer to get things integrated into libcxx. For this, it's important to have a working and committed implementation, such that we can start submitting patches ourselves and can obtain feedback on these patches early on. Otherwise, we might take directions that won't really be compatible with libcxx. How can we best help with getting these patches upstream?
Revision Contents
Diff 158092 libcxx/include/experimental/simd
libcxx/test/std/experimental/simd/simd.horizontal/concat.pass.cpp
libcxx/test/std/experimental/simd/simd.horizontal/split.pass.cpp
|
P0820 has been adopted, no need for this comment any more.