Skip to content
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

convertible types instead of same type #1000

Merged
merged 1 commit into from Jul 27, 2018

Conversation

JohanMabille
Copy link
Member

@JohanMabille JohanMabille commented Jul 26, 2018

Fixes #958

@wolfv
Copy link
Member

wolfv commented Jul 26, 2018

Is this also going to work e.g. for uint16_t which doesn't yet exist in xsimd?

@JohanMabille
Copy link
Member Author

yep. If uint16_tis the value_type of the LHS, the xassign_traits<E1, E2>::simd_size returns false, if it is the value_type of the RHS, xassign_traits<E1, E2>::forbid_simd will return false, preventing a simd assign.

@JohanMabille
Copy link
Member Author

OK this requires a release of xsimd to work.

@wolfv
Copy link
Member

wolfv commented Jul 26, 2018

quick other question: In this test for has_simd_apply we were using the return type to test
but with the complex types this obviously fails (for example when using imag() in the lambda)

https://github.com/QuantStack/xtensor/blob/bf7f425bd4c00d14f48d54fe73238798e5094ff4/include/xtensor/xassign.hpp#L270-L275

So we should test with the value_type of the arguments somehow ... did you do something like this somewhere else already?

@JohanMabille
Copy link
Member Author

JohanMabille commented Jul 26, 2018

Yep, see here.
I'll fix the use_strided_loop struct.

@JohanMabille JohanMabille merged commit c4f945d into xtensor-stack:master Jul 27, 2018
@JohanMabille JohanMabille deleted the assign branch July 27, 2018 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants