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

// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2014 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_CUSTOM_OP_H
#define EIGEN_CXX11_TENSOR_TENSOR_CUSTOM_OP_H

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

namespace Eigen {

/** \class TensorCustomUnaryOp
 * \ingroup CXX11_Tensor_Module
 *
 * \brief Tensor custom class.
 *
 *
 */
namespace internal {
traits<TensorCustomUnaryOp<CustomUnaryFunc, XprType>>;

eval<TensorCustomUnaryOp<CustomUnaryFunc, XprType>, Eigen::Dense>;

nested<TensorCustomUnaryOp<CustomUnaryFunc, XprType>>;

}  // end namespace internal

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

// Eval as rvalue
TensorEvaluator<const TensorCustomUnaryOp<CustomUnaryFunc, XprType>, Device>;

/** \class TensorCustomBinaryOp
 * \ingroup CXX11_Tensor_Module
 *
 * \brief Tensor custom class.
 *
 *
 */
namespace internal {
traits<TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType>>;

eval<TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType>, Eigen::Dense>;

nested<TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType>>;

}  // end namespace internal

template <typename CustomBinaryFunc, typename LhsXprType, typename RhsXprType>
class TensorCustomBinaryOp
    : public TensorBase<TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType>, ReadOnlyAccessors> {};

// Eval as rvalue
TensorEvaluator<const TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType>, Device>;

}  // end namespace Eigen

#endif  // EIGEN_CXX11_TENSOR_TENSOR_CUSTOM_OP_H