Page MenuHomePhabricator

[libcxx: experimental::simd] Support binary operations
AbandonedPublic

Authored by grosser on Jul 14 2019, 1:04 AM.

Details

Summary

This adds support for the following binary operations

simd operator+(simd, simd);
simd operator-(simd, simd);
simd operator*(simd, simd);
simd operator/(simd, simd);
simd operator%(simd, simd);
simd operator&(simd, simd);
simd operator|(simd, simd);
simd operator^(simd, simd);
simd operator<<(simd, simd);
simd operator>>(simd, simd);
simd operator<<(simd, int);
simd operator>>(simd, int);

In case the _VecExt storage type is used native vector operations are
directly used.

[This patch likely needs some more work to make it compile in case no vector
extensions are available. Before I work out all these things by myself, I
wanted to check if a) tim has already a similar patch in his pipeline,
b) there are certain conventions I should pay attention to]

Event Timeline

grosser created this revision.Jul 14 2019, 1:04 AM
Herald added a project: Restricted Project. · View Herald Transcript
maxf added a subscriber: maxf.Jul 14 2019, 4:20 AM

a) tim has already a similar patch in his pipeline

Yes, I had a full stack of patches (using the dependency feature of Phab), starting with D41412, that implements the whole proposal up to some version (and it's not the latest version), but the patches got into both mclow's and my back-burners sooner than expected.

b) there are certain conventions I should pay attention to

No as of my memory. The review of my stack of patches didn't go that far.

a) tim has already a similar patch in his pipeline

Yes, I had a full stack of patches (using the dependency feature of Phab), starting with D41412, that implements the whole proposal up to some version (and it's not the latest version), but the patches got into both mclow's and my back-burners sooner than expected.

Nice. I looked through your patches and they seem to be very well engineered. We are currently developing code which would very much benefit from std::experimental::simd (and an optimized variant based on LLVM vector types).

b) there are certain conventions I should pay attention to

No as of my memory. The review of my stack of patches didn't go that far.

Any chance I can motivate you to get the patch review process going again. I would be very interested in using (and potentially further optimizing) ex::simd.

grosser abandoned this revision.Jul 15 2019, 11:01 PM

Tim's patches look a lot more polished and are better in line with the initial ::simd code he contributed. I feel development should be continued on Tim's patches.