diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-02-10 06:48:28 -0800 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-02-10 06:48:28 -0800 |
commit | 72ab7879f77260b6fa29d29a05ab476412529222 (patch) | |
tree | 9d538b08b3e14e0613f4b34fad5d46b03ee52330 /unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h | |
parent | e88535634d1ed2af38a01e712d4d0157d8b8f30e (diff) |
Fixed clang comilation warnings
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h b/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h index ed933b6ac..0e89033c4 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h @@ -85,6 +85,13 @@ class TensorStorage<T, DSizes<IndexType, NumIndices_>, Options_> : m_data(internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(size)), m_dimensions(dimensions) { EIGEN_INTERNAL_TENSOR_STORAGE_CTOR_PLUGIN } +#ifdef EIGEN_HAS_VARIADIC_TEMPLATES + template <typename... DenseIndex> + EIGEN_DEVICE_FUNC TensorStorage(DenseIndex... indices) : m_dimensions(indices...) { + m_data = internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(internal::array_prod(m_dimensions)); + } +#endif + EIGEN_DEVICE_FUNC TensorStorage(const Self& other) : m_data(internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(internal::array_prod(other.m_dimensions))) , m_dimensions(other.m_dimensions) |