Fix template argument order for batch_bool loads#1181
Conversation
|
mmmh, it means that it was mostly untested, would you mind adding some tests in |
|
I'm not really sure how to test this. We need to check that the "highest" overload is called for a given architecture, but I don't know how to do that without just checking each overload and architecture individually. |
|
Hi @kalenedrael, Just my two cents, feel free to ignore if not accurate. Cheers, |
|
The test coverage for The dispatching is what I don't know how to test. In general, it seems like you more or less have to hard-code the expected overloads for each architecture, and find a way to disable the other ones so they can't be used as a fallback. This is both convoluted and the worst kind of test, because it's essentially copying the code itself. |
`batch_bool<T, A>::load_(un)aligned` dispatches to `kernel::load_(un)aligned<A>`, which requires that the architecture be the first template parameter.
5e3f2de to
8705787
Compare
|
Oh yes, that would be hard to test. My previous suggestion missed the point. I apologize. Then I guess the only way to make this impossible is to either use static_asserts i.e |
21d9634
into
xtensor-stack:master
batch_bool<T, A>::load_(un)aligneddispatches tokernel::load_(un)aligned<A>, which requires that the architecture be the first template parameter.