kokkos / stdBLAS

Reference Implementation for stdBLAS
Other
128 stars 22 forks source link

Make the implementation enforce basic_mdspan-ness #67

Closed mhoemmen closed 3 years ago

mhoemmen commented 3 years ago

P1673's template parameter names like in_vector_t come with constraints (e.g., must be a rank-1 basic_mdspan). The implementation needs to enforce that, by only overloading for basic_mdspan types instead of just templating on e.g., in_vector_t.
For examples, see vector_norm2 and matrix_inf_norm.

amklinv-nnl commented 3 years ago

On it.

amklinv-nnl commented 3 years ago

What do we want to do about

template<class in_vector_t,
         class out_vector_t>
void swap_rank_1(in_vector_t x,
                 out_vector_t y)

I assume only certain type combinations make sense.

mhoemmen commented 3 years ago

swap_rank_1 doesn't exist any more. swap_elements takes inout_object_{1,2}_t and further constrains the two types to have the same rank. We might need to go function by function to include all the constraints (that means "will not participate in overload resolution unless," not static_assert (Mandates)).

amklinv-nnl commented 3 years ago

My bad; they're totally in an anonymous namespace.

mhoemmen commented 3 years ago

We probably should still use the right names there, though -- inout_vector_{1,2}_t would be more appropriate for the rank 1 case.

amklinv-nnl commented 3 years ago

This comment is to track the progress on various files.