Skip to content

Conversation

@JohanMabille
Copy link
Member

@serge-sans-paille these are the last APIs missing in xsimd and that we need in xtensor.

Once this is merged, we can release ;)

template <class To, class A=default_arch, class From>
void store_batch(To* dst, batch<From, A> const& src, aligned_mode) {
kernel::store_aligned(dst, src, A{});
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the use of such aliases, We already provide xsimd::store that does exactly the same. If that's for backward compatibility, then I'd suggest using the __attribute__((deprecated(reason)) attribute.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is for symmetry with load_batch, which is slightly different form the load methods.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another solution would be to replace the current load_xxx with the new implementation, andmake the current store implementation symmetric. And I discard the load_batch / store_batch methods. What do you think @serge-sans-paille ?

@JohanMabille JohanMabille force-pushed the api branch 5 times, most recently from 67628bf to f318db9 Compare October 14, 2021 07:40
@JohanMabille JohanMabille marked this pull request as ready for review October 14, 2021 07:53
* @return a new batch instance
*/
template <class To, class A=default_arch, class From>
simd_return_type<From, To> broadcast_as(From v) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should static_assert that From and To are different and redirect to the right function otherwise?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, because as a user you don't want to have to check whether the types are equivalent or not, and invoke a function or another one depending on that. The user can do it, but we should not impose it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. Looks good otherwise, feel free to merge.

@JohanMabille JohanMabille merged commit ea5cfaf into xtensor-stack:master Oct 14, 2021
@JohanMabille JohanMabille deleted the api branch October 14, 2021 08:25
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.

2 participants