chromium/third_party/eigen3/src/unsupported/Eigen/CXX11/src/Tensor/TensorIO.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_IO_H
#define EIGEN_CXX11_TENSOR_TENSOR_IO_H

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

namespace Eigen {

struct TensorIOFormat;

namespace internal {
template <typename Tensor, std::size_t rank, typename Format, typename EnableIf = void>
struct TensorPrinter;
}

template <typename Derived_>
struct TensorIOFormatBase {};

struct TensorIOFormatNumpy : public TensorIOFormatBase<TensorIOFormatNumpy> {};

struct TensorIOFormatNative : public TensorIOFormatBase<TensorIOFormatNative> {};

struct TensorIOFormatPlain : public TensorIOFormatBase<TensorIOFormatPlain> {};

struct TensorIOFormatLegacy : public TensorIOFormatBase<TensorIOFormatLegacy> {};

struct TensorIOFormat : public TensorIOFormatBase<TensorIOFormat> {};

template <typename T, int Layout, int rank, typename Format>
class TensorWithFormat;
// specialize for Layout=ColMajor, Layout=RowMajor and rank=0.
TensorWithFormat<T, RowMajor, rank, Format>;

TensorWithFormat<T, ColMajor, rank, Format>;

TensorWithFormat<T, ColMajor, 0, Format>;

namespace internal {

// Default scalar printer.
template <typename Scalar, typename Format, typename EnableIf = void>
struct ScalarPrinter {};

ScalarPrinter<Scalar, TensorIOFormatNumpy, std::enable_if_t<NumTraits<Scalar>::IsComplex>>;

ScalarPrinter<Scalar, TensorIOFormatNative, std::enable_if_t<NumTraits<Scalar>::IsComplex>>;

template <typename Tensor, std::size_t rank, typename Format, typename EnableIf>
struct TensorPrinter {};

TensorPrinter<Tensor, rank, TensorIOFormatLegacy, std::enable_if_t<rank != 0>>;

TensorPrinter<Tensor, 0, Format>;

}  // end namespace internal
template <typename T>
std::ostream& operator<<(std::ostream& s, const TensorBase<T, ReadOnlyAccessors>& t) {}
}  // end namespace Eigen

#endif  // EIGEN_CXX11_TENSOR_TENSOR_IO_H