chromium/third_party/eigen3/src/unsupported/Eigen/CXX11/src/Tensor/TensorArgMax.h

// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2015 Eugene Brevdo <[email protected]>
//                    Benoit Steiner <[email protected]>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef EIGEN_CXX11_TENSOR_TENSOR_ARG_MAX_H
#define EIGEN_CXX11_TENSOR_TENSOR_ARG_MAX_H

// IWYU pragma: private
#include "./InternalHeaderCheck.h"

namespace Eigen {
namespace internal {

/** \class TensorIndexPair
 * \ingroup CXX11_Tensor_Module
 *
 * \brief Tensor + Index Pair class.
 *
 *
 */
traits<TensorIndexPairOp<XprType>>;

eval<TensorIndexPairOp<XprType>, Eigen::Dense>;

nested<TensorIndexPairOp<XprType>, 1, typename eval<TensorIndexPairOp<XprType>>::type>;

}  // end namespace internal

template <typename XprType>
class TensorIndexPairOp : public TensorBase<TensorIndexPairOp<XprType>, ReadOnlyAccessors> {};

// Eval as rvalue
TensorEvaluator<const TensorIndexPairOp<ArgType>, Device>;

namespace internal {

/** \class TensorPairIndex
 * \ingroup CXX11_Tensor_Module
 *
 * \brief Converts to Tensor<Pair<Index, Scalar> > and reduces to Tensor<Index>.
 *
 */
traits<TensorPairReducerOp<ReduceOp, Dims, XprType>>;

eval<TensorPairReducerOp<ReduceOp, Dims, XprType>, Eigen::Dense>;

nested<TensorPairReducerOp<ReduceOp, Dims, XprType>, 1, typename eval<TensorPairReducerOp<ReduceOp, Dims, XprType>>::type>;

}  // end namespace internal

template <typename ReduceOp, typename Dims, typename XprType>
class TensorPairReducerOp : public TensorBase<TensorPairReducerOp<ReduceOp, Dims, XprType>, ReadOnlyAccessors> {};

// Eval as rvalue
TensorEvaluator<const TensorPairReducerOp<ReduceOp, Dims, ArgType>, Device>;

}  // end namespace Eigen

#endif  // EIGEN_CXX11_TENSOR_TENSOR_ARG_MAX_H