FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix various compiler warnings by aroffringa · Pull Request #2801 · xtensor-stack/xtensor · GitHub

Repository navigation

Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .hpp  (3) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
3 changes: 3 additions & 0 deletions include/xtensor/xassign.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,8 @@ namespace xt
constexpr bool simd_strided_assign = traits::simd_strided_assign();
if (linear_assign)
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wduplicated-branches"
if (simd_linear_assign || traits::simd_linear_assign(de1, de2))
{
// Do not use linear_assigner<true> here since it will make the compiler
Expand All @@ -469,6 +471,7 @@ namespace xt
{
linear_assigner<false>::run(de1, de2);
}
#pragma GCC diagnostic pop
}
else if (simd_strided_assign)
{
Expand Down
2 changes: 1 addition & 1 deletion include/xtensor/xfixed.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ namespace xt
(L == layout_type::row_major) || (L == layout_type::column_major),
"Layout not supported for fixed array"
);
#if (_MSC_VER >= 1910)
#if (defined(_MSC_VER_) && _MSC_VER >= 1910)
using temp_type = std::index_sequence<X...>;
return R({workaround::get_computed_strides<L, I, temp_type>(shape[I] == 1)...});
#else
Expand Down
2 changes: 0 additions & 2 deletions include/xtensor/xsort.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,6 @@ namespace xt
template <layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class E>
inline auto argmin(const xexpression<E>& e)
{
using value_type = typename E::value_type;
auto&& ed = eval(e.derived_cast());
auto begin = ed.template begin<L>();
auto end = ed.template end<L>();
Expand Down Expand Up @@ -1272,7 +1271,6 @@ namespace xt
template <layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class E>
inline auto argmax(const xexpression<E>& e)
{
using value_type = typename E::value_type;
auto&& ed = eval(e.derived_cast());
auto begin = ed.template begin<L>();
auto end = ed.template end<L>();
Expand Down

Back | FazBrowse Home | New Git URL