Added sanity check

This commit is contained in:
Benoit Steiner 2015-11-13 09:07:27 -08:00
parent 1e1755352d
commit f1fbd74db9

View File

@ -119,6 +119,9 @@ struct TensorEvaluator<const TensorReverseOp<ReverseDimensions, ArgType>, Device
const Device& device) const Device& device)
: m_impl(op.expression(), device), m_reverse(op.reverse()) : m_impl(op.expression(), device), m_reverse(op.reverse())
{ {
// Reversing a scalar isn't supported yet. It would be a no-op anyway.
EIGEN_STATIC_ASSERT(NumDims > 0, YOU_MADE_A_PROGRAMMING_MISTAKE);
// Compute strides // Compute strides
m_dimensions = m_impl.dimensions(); m_dimensions = m_impl.dimensions();
if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) { if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {