Added tests for tensors of const values and tensors of stringswwq::

This commit is contained in:
Benoit Steiner
2014-10-01 20:21:42 -07:00
parent 10a79ca3a3
commit 1c236f4c9a
4 changed files with 250 additions and 1 deletions

View File

@@ -301,7 +301,7 @@ struct TensorEvaluator<const TensorSlicingOp<StartIndices, Sizes, ArgType>, Devi
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(Scalar* data) {
m_impl.evalSubExprsIfNeeded(NULL);
if (data && m_impl.data()) {
if (internal::is_arithmetic<Scalar>::value && data && m_impl.data()) {
Index contiguous_values = 1;
for (int i = 0; i < NumDims; ++i) {
contiguous_values *= dimensions()[i];