diff options
author | Eugene Zhulenev <ezhulenev@google.com> | 2019-10-02 12:44:06 -0700 |
---|---|---|
committer | Eugene Zhulenev <ezhulenev@google.com> | 2019-10-02 12:44:06 -0700 |
commit | 60ae24ee1a6c16114de456d77fcfba6f5a1160ca (patch) | |
tree | 7b9d5463018055571a5050ca31a8d3df12a3e6fc /unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h | |
parent | 6e40454a6e6cc57c07c7340148657c985ca6c928 (diff) |
Add block evaluation to TensorReshaping/TensorCasting/TensorPadding/TensorSelect
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h b/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h index be8f3a734..2a3398d67 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h @@ -324,6 +324,17 @@ struct IndexList : internal::IndexTuple<FirstType, OtherTypes...> { } }; +template <typename FirstType, typename... OtherTypes> +std::ostream& operator<<(std::ostream& os, + const IndexList<FirstType, OtherTypes...>& dims) { + os << "["; + for (size_t i = 0; i < 1 + sizeof...(OtherTypes); ++i) { + if (i > 0) os << ", "; + os << dims[i]; + } + os << "]"; + return os; +} template<typename FirstType, typename... OtherTypes> constexpr IndexList<FirstType, OtherTypes...> make_index_list(FirstType val1, OtherTypes... other_vals) { |