| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9af2790 commit 01c23d9
16 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -286,8 +286,8 @@ namespace xt | |||
| 286 | 286 | // scope of these data members (since they are odr-used). | |
| 287 | 287 | static constexpr bool contiguous_layout() { return E1::contiguous_layout && E2::contiguous_layout; } | |
| 288 | 288 | static constexpr bool convertible_types() { return std::is_convertible<typename E2::value_type, typename E1::value_type>::value; } | |
| 289 | - static constexpr bool lhs_simd_size() { return xsimd::simd_traits<typename E1::value_type>::size > 1; } | ||
| 290 | - static constexpr bool rhs_simd_size() { return xsimd::simd_traits<typename E2::value_type>::size > 1; } | ||
| 289 | + static constexpr bool lhs_simd_size() { return xt_simd::simd_traits<typename E1::value_type>::size > 1; } | ||
| 290 | + static constexpr bool rhs_simd_size() { return xt_simd::simd_traits<typename E2::value_type>::size > 1; } | ||
| 291 | 291 | static constexpr bool simd_size() { return lhs_simd_size() && rhs_simd_size(); } | |
| 292 | 292 | static constexpr bool forbid_simd() { return !has_simd_interface<E2>::value; } | |
| 293 | 293 | static constexpr bool simd_assign() { return contiguous_layout() && convertible_types() && simd_size() && has_simd_interface<E2>::value; } | |
@@ -511,16 +511,16 @@ namespace xt | |||
| 511 | 511 | template <class E1, class E2> | |
| 512 | 512 | inline void linear_assigner<simd_assign>::run(E1& e1, const E2& e2) | |
| 513 | 513 | { | |
| 514 | - using lhs_align_mode = xsimd::container_alignment_t<E1>; | ||
| 514 | + using lhs_align_mode = xt_simd::container_alignment_t<E1>; | ||
| 515 | 515 | constexpr bool is_aligned = std::is_same<lhs_align_mode, aligned_mode>::value; | |
| 516 | 516 | using rhs_align_mode = std::conditional_t<is_aligned, inner_aligned_mode, unaligned_mode>; | |
| 517 | 517 | using value_type = std::common_type_t<typename E1::value_type, typename E2::value_type>; | |
| 518 | - using simd_type = xsimd::simd_type<value_type>; | ||
| 518 | + using simd_type = xt_simd::simd_type<value_type>; | ||
| 519 | 519 | using size_type = typename E1::size_type; | |
| 520 | 520 | size_type size = e1.size(); | |
| 521 | 521 | constexpr size_type simd_size = simd_type::size; | |
| 522 | 522 | ||
| 523 | - size_type align_begin = is_aligned ? 0 : xsimd::get_alignment_offset(e1.data(), size, simd_size); | ||
| 523 | + size_type align_begin = is_aligned ? 0 : xt_simd::get_alignment_offset(e1.data(), size, simd_size); | ||
| 524 | 524 | size_type align_end = align_begin + ((size - align_begin) & ~(simd_size - 1)); | |
| 525 | 525 | ||
| 526 | 526 | for (size_type i = 0; i < align_begin; ++i) | |
@@ -791,7 +791,7 @@ namespace xt | |||
| 791 | 791 | // add this when we have std::array index! | |
| 792 | 792 | // std::fill(idx.begin(), idx.end(), 0); | |
| 793 | 793 | using value_type = std::common_type_t<typename E1::value_type, typename E2::value_type>; | |
| 794 | - using simd_type = xsimd::simd_type<value_type>; | ||
| 794 | + using simd_type = xt_simd::simd_type<value_type>; | ||
| 795 | 795 | ||
| 796 | 796 | std::size_t simd_size = inner_loop_size / simd_type::size; | |
| 797 | 797 | std::size_t simd_rest = inner_loop_size % simd_type::size; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -84,7 +84,7 @@ namespace xt | |||
| 84 | 84 | using const_pointer = typename storage_type::const_pointer; | |
| 85 | 85 | using size_type = typename inner_types::size_type; | |
| 86 | 86 | using difference_type = typename storage_type::difference_type; | |
| 87 | - using simd_value_type = xsimd::simd_type<value_type>; | ||
| 87 | + using simd_value_type = xt_simd::simd_type<value_type>; | ||
| 88 | 88 | ||
| 89 | 89 | using shape_type = typename inner_types::shape_type; | |
| 90 | 90 | using strides_type = typename inner_types::strides_type; | |
@@ -102,8 +102,8 @@ namespace xt | |||
| 102 | 102 | ||
| 103 | 103 | static constexpr layout_type static_layout = inner_types::layout; | |
| 104 | 104 | static constexpr bool contiguous_layout = static_layout != layout_type::dynamic; | |
| 105 | - using data_alignment = xsimd::container_alignment_t<storage_type>; | ||
| 106 | - using simd_type = xsimd::simd_type<value_type>; | ||
| 105 | + using data_alignment = xt_simd::container_alignment_t<storage_type>; | ||
| 106 | + using simd_type = xt_simd::simd_type<value_type>; | ||
| 107 | 107 | ||
| 108 | 108 | using storage_iterator = typename iterable_base::storage_iterator; | |
| 109 | 109 | using const_storage_iterator = typename iterable_base::const_storage_iterator; | |
@@ -172,12 +172,12 @@ namespace xt | |||
| 172 | 172 | const_reference data_element(size_type i) const; | |
| 173 | 173 | ||
| 174 | 174 | template <class requested_type> | |
| 175 | - using simd_return_type = xsimd::simd_return_type<value_type, requested_type>; | ||
| 175 | + using simd_return_type = xt_simd::simd_return_type<value_type, requested_type>; | ||
| 176 | 176 | ||
| 177 | 177 | template <class align, class simd> | |
| 178 | 178 | void store_simd(size_type i, const simd& e); | |
| 179 | 179 | template <class align, class requested_type = value_type, | |
| 180 | - std::size_t N = xsimd::simd_traits<requested_type>::size> | ||
| 180 | + std::size_t N = xt_simd::simd_traits<requested_type>::size> | ||
| 181 | 181 | simd_return_type<requested_type> load_simd(size_type i) const; | |
| 182 | 182 | ||
| 183 | 183 | storage_iterator storage_begin() noexcept; | |
@@ -706,7 +706,7 @@ namespace xt | |||
| 706 | 706 | inline void xcontainer<D>::store_simd(size_type i, const simd& e) | |
| 707 | 707 | { | |
| 708 | 708 | using align_mode = driven_align_mode_t<alignment, data_alignment>; | |
| 709 | - xsimd::store_simd<value_type, typename simd::value_type>(&(storage()[i]), e, align_mode()); | ||
| 709 | + xt_simd::store_simd<value_type, typename simd::value_type>(&(storage()[i]), e, align_mode()); | ||
| 710 | 710 | } | |
| 711 | 711 | ||
| 712 | 712 | template <class D> | |
@@ -715,7 +715,7 @@ namespace xt | |||
| 715 | 715 | -> simd_return_type<requested_type> | |
| 716 | 716 | { | |
| 717 | 717 | using align_mode = driven_align_mode_t<alignment, data_alignment>; | |
| 718 | - return xsimd::load_simd<value_type, requested_type>(&(storage()[i]), align_mode()); | ||
| 718 | + return xt_simd::load_simd<value_type, requested_type>(&(storage()[i]), align_mode()); | ||
| 719 | 719 | } | |
| 720 | 720 | ||
| 721 | 721 | template <class D> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -137,7 +137,7 @@ namespace xt | |||
| 137 | 137 | using temporary_type = typename xcontainer_inner_types<self_type>::temporary_type; | |
| 138 | 138 | using base_index_type = xindex_type_t<shape_type>; | |
| 139 | 139 | ||
| 140 | - using simd_value_type = xsimd::simd_type<value_type>; | ||
| 140 | + using simd_value_type = xt_simd::simd_type<value_type>; | ||
| 141 | 141 | using strides_vt = typename strides_type::value_type; | |
| 142 | 142 | using slice_type = xtl::variant<detail::xfake_slice<strides_vt>, xkeep_slice<strides_vt>, xdrop_slice<strides_vt>>; | |
| 143 | 143 | using slice_vector_type = std::vector<slice_type>; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -93,7 +93,7 @@ namespace xt | |||
| 93 | 93 | ||
| 94 | 94 | template <class V> | |
| 95 | 95 | struct has_simd_type | |
| 96 | - : std::integral_constant<bool, !std::is_same<V, xsimd::simd_type<V>>::value> | ||
| 96 | + : std::integral_constant<bool, !std::is_same<V, xt_simd::simd_type<V>>::value> | ||
| 97 | 97 | { | |
| 98 | 98 | }; | |
| 99 | 99 | ||
@@ -109,7 +109,7 @@ namespace xt | |||
| 109 | 109 | has_simd_type<xvalue_type_t<std::decay_t<CT>>>...>; | |
| 110 | 110 | // if yes, insert correct type here | |
| 111 | 111 | using simd_value_type = xtl::mpl::eval_if_t<simd_arguments_exist, | |
| 112 | - meta_identity<xsimd::simd_type<scalar_result_type>>, | ||
| 112 | + meta_identity<xt_simd::simd_type<scalar_result_type>>, | ||
| 113 | 113 | make_invalid_type<>>; | |
| 114 | 114 | // if all types are supported, check that the functor has a working | |
| 115 | 115 | // simd_apply and all arguments have the simd interface | |
@@ -221,7 +221,7 @@ namespace xt | |||
| 221 | 221 | using simd_argument_type = simd_value_type; | |
| 222 | 222 | ||
| 223 | 223 | template <class requested_type> | |
| 224 | - using simd_return_type = xsimd::simd_return_type<value_type, requested_type>; | ||
| 224 | + using simd_return_type = xt_simd::simd_return_type<value_type, requested_type>; | ||
| 225 | 225 | ||
| 226 | 226 | using iterable_base = xconst_iterable<xfunction<F, CT...>>; | |
| 227 | 227 | using inner_shape_type = typename iterable_base::inner_shape_type; | |
@@ -327,7 +327,7 @@ namespace xt | |||
| 327 | 327 | operator value_type() const; | |
| 328 | 328 | ||
| 329 | 329 | template <class align, class requested_type = value_type, | |
| 330 | - std::size_t N = xsimd::simd_traits<requested_type>::size> | ||
| 330 | + std::size_t N = xt_simd::simd_traits<requested_type>::size> | ||
| 331 | 331 | simd_return_type<requested_type> load_simd(size_type i) const; | |
| 332 | 332 | ||
| 333 | 333 | const tuple_type& arguments() const noexcept; | |
@@ -801,9 +801,9 @@ namespace xt | |||
| 801 | 801 | struct get_simd_type | |
| 802 | 802 | { | |
| 803 | 803 | using simd_value_type = typename std::decay_t<T>::simd_value_type; | |
| 804 | - static constexpr bool is_arg_bool = ::xsimd::is_batch_bool<simd_value_type>::value; | ||
| 805 | - static constexpr bool is_res_bool = ::xsimd::is_batch_bool<simd>::value; | ||
| 806 | - static constexpr bool is_arg_cplx = ::xsimd::is_batch_complex<simd_value_type>::value; | ||
| 804 | + static constexpr bool is_arg_bool = ::xt_simd::is_batch_bool<simd_value_type>::value; | ||
| 805 | + static constexpr bool is_res_bool = ::xt_simd::is_batch_bool<simd>::value; | ||
| 806 | + static constexpr bool is_arg_cplx = ::xt_simd::is_batch_complex<simd_value_type>::value; | ||
| 807 | 807 | using type = std::conditional_t<is_res_bool, | |
| 808 | 808 | common_simd, | |
| 809 | 809 | std::conditional_t<is_arg_bool || is_arg_cplx, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -202,7 +202,7 @@ namespace xt | |||
| 202 | 202 | // The following functions are defined inline because otherwise signatures | |
| 203 | 203 | // don't match on GCC. | |
| 204 | 204 | template <class align, class requested_type = typename xexpression_type::value_type, | |
| 205 | - std::size_t N = xsimd::simd_traits<requested_type>::size, class FCT = functor_type> | ||
| 205 | + std::size_t N = xt_simd::simd_traits<requested_type>::size, class FCT = functor_type> | ||
| 206 | 206 | auto load_simd(size_type i) const | |
| 207 | 207 | -> decltype(std::declval<FCT>().template proxy_simd_load<align, requested_type, N>(std::declval<undecay_expression>(), i)) | |
| 208 | 208 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -111,7 +111,7 @@ namespace xt | |||
| 111 | 111 | using difference_type = typename subiterator_traits::difference_type; | |
| 112 | 112 | using size_type = typename storage_type::size_type; | |
| 113 | 113 | using shape_type = typename storage_type::shape_type; | |
| 114 | - using simd_type = xsimd::simd_type<value_type>; | ||
| 114 | + using simd_type = xt_simd::simd_type<value_type>; | ||
| 115 | 115 | ||
| 116 | 116 | xstepper() = default; | |
| 117 | 117 | xstepper(storage_type* c, subiterator_type it, size_type offset) noexcept; | |
@@ -523,7 +523,7 @@ namespace xt | |||
| 523 | 523 | { | |
| 524 | 524 | R reg; | |
| 525 | 525 | reg.load_unaligned(&(*m_it)); | |
| 526 | - m_it += xsimd::revert_simd_traits<R>::size; | ||
| 526 | + m_it += xt_simd::revert_simd_traits<R>::size; | ||
| 527 | 527 | return reg; | |
| 528 | 528 | } | |
| 529 | 529 | ||
@@ -532,7 +532,7 @@ namespace xt | |||
| 532 | 532 | inline void xstepper<C>::store_simd(const R& vec) | |
| 533 | 533 | { | |
| 534 | 534 | vec.store_unaligned(&(*m_it)); | |
| 535 | - m_it += xsimd::revert_simd_traits<R>::size;; | ||
| 535 | + m_it += xt_simd::revert_simd_traits<R>::size;; | ||
| 536 | 536 | } | |
| 537 | 537 | ||
| 538 | 538 | template <class C> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -537,7 +537,7 @@ XTENSOR_INT_SPECIALIZATION_IMPL(FUNC_NAME, RETURN_VAL, unsigned long long); | |||
| 537 | 537 | template <class A1, class A2> | |
| 538 | 538 | constexpr auto simd_apply(const A1& t1, const A2& t2) const noexcept | |
| 539 | 539 | { | |
| 540 | - return xsimd::select(t1 < t2, t1, t2); | ||
| 540 | + return xt_simd::select(t1 < t2, t1, t2); | ||
| 541 | 541 | } | |
| 542 | 542 | }; | |
| 543 | 543 | ||
@@ -553,7 +553,7 @@ XTENSOR_INT_SPECIALIZATION_IMPL(FUNC_NAME, RETURN_VAL, unsigned long long); | |||
| 553 | 553 | template <class A1, class A2> | |
| 554 | 554 | constexpr auto simd_apply(const A1& t1, const A2& t2) const noexcept | |
| 555 | 555 | { | |
| 556 | - return xsimd::select(t1 > t2, t1, t2); | ||
| 556 | + return xt_simd::select(t1 > t2, t1, t2); | ||
| 557 | 557 | } | |
| 558 | 558 | }; | |
| 559 | 559 | ||
@@ -570,7 +570,7 @@ XTENSOR_INT_SPECIALIZATION_IMPL(FUNC_NAME, RETURN_VAL, unsigned long long); | |||
| 570 | 570 | const A2& lo, | |
| 571 | 571 | const A3& hi) const | |
| 572 | 572 | { | |
| 573 | - return xsimd::select(v < lo, lo, xsimd::select(hi < v, hi, v)); | ||
| 573 | + return xt_simd::select(v < lo, lo, xt_simd::select(hi < v, hi, v)); | ||
| 574 | 574 | } | |
| 575 | 575 | }; | |
| 576 | 576 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,7 @@ namespace xt | |||
| 29 | 29 | using proxy = xtl::xproxy_wrapper<M>; | |
| 30 | 30 | ||
| 31 | 31 | template <class value_type, class requested_type> | |
| 32 | - using simd_return_type = xsimd::simd_return_type<value_type, requested_type>; | ||
| 32 | + using simd_return_type = xt_simd::simd_return_type<value_type, requested_type>; | ||
| 33 | 33 | ||
| 34 | 34 | template <class T> | |
| 35 | 35 | decltype(auto) operator()(T&& t) const | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -93,7 +93,7 @@ namespace xt | |||
| 93 | 93 | struct conditional_ternary | |
| 94 | 94 | { | |
| 95 | 95 | template <class B> | |
| 96 | - using get_batch_bool = typename xsimd::simd_traits<typename xsimd::revert_simd_traits<B>::type>::bool_type; | ||
| 96 | + using get_batch_bool = typename xt_simd::simd_traits<typename xt_simd::revert_simd_traits<B>::type>::bool_type; | ||
| 97 | 97 | ||
| 98 | 98 | template <class B, class A1, class A2> | |
| 99 | 99 | constexpr auto operator()(const B& cond, const A1& v1, const A2& v2) const noexcept | |
@@ -106,7 +106,7 @@ namespace xt | |||
| 106 | 106 | const B& t2, | |
| 107 | 107 | const B& t3) const noexcept | |
| 108 | 108 | { | |
| 109 | - return xsimd::select(t1, t2, t3); | ||
| 109 | + return xt_simd::select(t1, t2, t3); | ||
| 110 | 110 | } | |
| 111 | 111 | }; | |
| 112 | 112 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -62,7 +62,7 @@ namespace xt | |||
| 62 | 62 | using const_pointer = typename storage_type::const_pointer; | |
| 63 | 63 | using size_type = typename raw_value_expression::size_type; | |
| 64 | 64 | using difference_type = typename raw_value_expression::difference_type; | |
| 65 | - using simd_value_type = xsimd::simd_type<value_type>; | ||
| 65 | + using simd_value_type = xt_simd::simd_type<value_type>; | ||
| 66 | 66 | ||
| 67 | 67 | using shape_type = typename raw_value_expression::shape_type; | |
| 68 | 68 | using strides_type = typename raw_value_expression::strides_type; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments