aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Core
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2014-10-03 10:16:59 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2014-10-03 10:16:59 -0700
commit12693928228922ecf8fa3fcf14341d195e376a11 (patch)
treeea8a577b9164d70c58be5bd75224033497a18ecd /unsupported/Eigen/CXX11/src/Core
parentb7271dffb5b1ceeee4c8bd99402ff89dcce58d74 (diff)
Created the IndexPair type to store pair of tensor indices. CUDA doesn't support std::pair so we can't use them when targeting GPUs.
Improved the performance on tensor contractions
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Core')
-rw-r--r--unsupported/Eigen/CXX11/src/Core/util/CXX11Workarounds.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Core/util/CXX11Workarounds.h b/unsupported/Eigen/CXX11/src/Core/util/CXX11Workarounds.h
index 3812ecd1f..227522ecb 100644
--- a/unsupported/Eigen/CXX11/src/Core/util/CXX11Workarounds.h
+++ b/unsupported/Eigen/CXX11/src/Core/util/CXX11Workarounds.h
@@ -69,11 +69,13 @@ template<std::size_t I, class T, std::size_t N> constexpr inline T const& array_
#undef STD_GET_ARR_HACK
template <typename T> struct array_size;
+template<class T, std::size_t N> struct array_size<std::array<T,N> > {
+ static const size_t value = N;
+};
template<class T, std::size_t N> struct array_size<const std::array<T,N> > {
static const size_t value = N;
};
-
/* Suppose you have a template of the form
* template<typename T> struct X;
* And you want to specialize it in such a way: