chromium/third_party/eigen3/src/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.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_FUNCTORS_H
#define EIGEN_CXX11_TENSOR_TENSOR_FUNCTORS_H

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

namespace Eigen {
namespace internal {

/** \internal
 * \brief Template functor to compute the modulo between an array and a scalar.
 */
template <typename Scalar>
struct scalar_mod_op {};
functor_traits<scalar_mod_op<Scalar>>;

/** \internal
 * \brief Template functor to compute the modulo between 2 arrays.
 */
template <typename Scalar>
struct scalar_mod2_op {};
functor_traits<scalar_mod2_op<Scalar>>;

template <typename Scalar>
struct scalar_fmod_op {};
functor_traits<scalar_fmod_op<Scalar>>;

template <typename Reducer, typename Device>
struct reducer_traits {};

// Standard reduction functors
template <typename T>
struct SumReducer {};

reducer_traits<SumReducer<T>, Device>;

template <typename T>
struct MeanReducer {};

reducer_traits<MeanReducer<T>, Device>;

template <typename T, bool IsMax = true, bool IsInteger = true>
struct MinMaxBottomValue {};
MinMaxBottomValue<T, true, false>;
MinMaxBottomValue<T, false, true>;
MinMaxBottomValue<T, false, false>;

template <typename T, int NaNPropagation = PropagateFast>
struct MaxReducer {};

reducer_traits<MaxReducer<T, NaNPropagation>, Device>;

template <typename T, int NaNPropagation = PropagateFast>
struct MinReducer {};

reducer_traits<MinReducer<T, NaNPropagation>, Device>;

template <typename T>
struct ProdReducer {};

reducer_traits<ProdReducer<T>, Device>;

struct AndReducer {};

reducer_traits<AndReducer, Device>;

struct OrReducer {};

reducer_traits<OrReducer, Device>;

// Argmin/Argmax reducers.  Returns the first occurrence if multiple locations
// contain the same min/max value.
template <typename T>
struct ArgMaxPairReducer {};

reducer_traits<ArgMaxPairReducer<T>, Device>;

template <typename T>
struct ArgMinPairReducer {};

reducer_traits<ArgMinPairReducer<T>, Device>;

template <typename T, typename Index, size_t NumDims>
class GaussianGenerator {};

functor_traits<GaussianGenerator<T, Index, NumDims>>;

template <typename Scalar>
struct scalar_clamp_op {};
functor_traits<scalar_clamp_op<Scalar>>;

}  // end namespace internal
}  // end namespace Eigen

#endif  // EIGEN_CXX11_TENSOR_TENSOR_FUNCTORS_H