Issue an error in case of direct inclusion of internal headers.

This commit is contained in:
Rasmus Munk Larsen
2021-09-10 19:12:26 +00:00
parent 36402e281d
commit d7d0bf832d
494 changed files with 1050 additions and 52 deletions

View File

@@ -0,0 +1,3 @@
#ifndef EIGEN_CXX11_TENSOR_MODULE_H
#error "Please include unsupported/Eigen/CXX11/Tensor instead of including headers inside the src directory directly."
#endif

View File

@@ -11,6 +11,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_H
#define EIGEN_CXX11_TENSOR_TENSOR_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class Tensor

View File

@@ -11,6 +11,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_ARG_MAX_H
#define EIGEN_CXX11_TENSOR_TENSOR_ARG_MAX_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_ASSIGN_H
#define EIGEN_CXX11_TENSOR_TENSOR_ASSIGN_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorAssign

View File

@@ -12,6 +12,8 @@
// clang-format off
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorBase

View File

@@ -8,6 +8,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_BLOCK_H
#define EIGEN_CXX11_TENSOR_TENSOR_BLOCK_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_BROADCASTING_H
#define EIGEN_CXX11_TENSOR_TENSOR_BROADCASTING_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorBroadcasting

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_CHIPPING_H
#define EIGEN_CXX11_TENSOR_TENSOR_CHIPPING_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorKChippingReshaping

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONCATENATION_H
#define EIGEN_CXX11_TENSOR_TENSOR_CONCATENATION_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorConcatenationOp

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_H
#define EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorContraction

View File

@@ -11,6 +11,8 @@
#define EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_BLOCKING_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -14,6 +14,8 @@
#if defined(EIGEN_USE_GPU) && defined(EIGEN_GPUCC)
#include "./InternalHeaderCheck.h"
namespace Eigen {
template<typename Scalar, typename Index, typename LhsMapper,

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_MAPPER_H
#define EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_MAPPER_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -19,6 +19,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_SYCL_H
#define EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_SYCL_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace TensorSycl {

View File

@@ -13,6 +13,8 @@
// evaluator for thread pool device
#ifdef EIGEN_USE_THREADS
#include "./InternalHeaderCheck.h"
namespace Eigen {
template<typename Indices, typename LeftArgType, typename RightArgType, typename OutputKernelType>

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONVERSION_H
#define EIGEN_CXX11_TENSOR_TENSOR_CONVERSION_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorConversionOp

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONVOLUTION_H
#define EIGEN_CXX11_TENSOR_TENSOR_CONVOLUTION_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorConvolution

View File

@@ -15,6 +15,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONVOLUTION_SYCL_H
#define EIGEN_CXX11_TENSOR_TENSOR_CONVOLUTION_SYCL_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorConvolution

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_COST_MODEL_H
#define EIGEN_CXX11_TENSOR_TENSOR_COST_MODEL_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorEvaluator

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_CUSTOM_OP_H
#define EIGEN_CXX11_TENSOR_TENSOR_CUSTOM_OP_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorCustomUnaryOp

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_DEVICE_H
#define EIGEN_CXX11_TENSOR_TENSOR_DEVICE_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorDevice

View File

@@ -11,6 +11,8 @@
#define EIGEN_CXX11_TENSOR_TENSOR_DEVICE_DEFAULT_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
// Default device for the machine (typically a single cpu core)

View File

@@ -15,6 +15,8 @@
// A separate header (included at the end of this file) will undefine all
#include "TensorGpuHipCudaDefines.h"
#include "./InternalHeaderCheck.h"
namespace Eigen {
static const int kGpuScratchSize = 1024;

View File

@@ -16,6 +16,8 @@
#define EIGEN_CXX11_TENSOR_TENSOR_DEVICE_SYCL_H
#include <unordered_set>
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace TensorSycl {

View File

@@ -10,6 +10,8 @@
#if defined(EIGEN_USE_THREADS) && !defined(EIGEN_CXX11_TENSOR_TENSOR_DEVICE_THREAD_POOL_H)
#define EIGEN_CXX11_TENSOR_TENSOR_DEVICE_THREAD_POOL_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
// Runs an arbitrary function and then calls Notify() on the passed in

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_DIMENSION_LIST_H
#define EIGEN_CXX11_TENSOR_TENSOR_DIMENSION_LIST_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \internal

View File

@@ -11,6 +11,8 @@
#define EIGEN_CXX11_TENSOR_TENSOR_DIMENSIONS_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \internal

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_EVAL_TO_H
#define EIGEN_CXX11_TENSOR_TENSOR_EVAL_TO_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorForcedEval

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_EVALUATOR_H
#define EIGEN_CXX11_TENSOR_TENSOR_EVALUATOR_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorEvaluator

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_EXECUTOR_H
#define EIGEN_CXX11_TENSOR_TENSOR_EXECUTOR_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/**

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_EXPR_H
#define EIGEN_CXX11_TENSOR_TENSOR_EXPR_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorExpr

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_FFT_H
#define EIGEN_CXX11_TENSOR_TENSOR_FFT_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorFFT

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_FIXED_SIZE_H
#define EIGEN_CXX11_TENSOR_TENSOR_FIXED_SIZE_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorFixedSize

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_FORCED_EVAL_H
#define EIGEN_CXX11_TENSOR_TENSOR_FORCED_EVAL_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorForcedEval

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_FORWARD_DECLARATIONS_H
#define EIGEN_CXX11_TENSOR_TENSOR_FORWARD_DECLARATIONS_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
// MakePointer class is used as a container of the address space of the pointer

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_FUNCTORS_H
#define EIGEN_CXX11_TENSOR_TENSOR_FUNCTORS_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_GENERATOR_H
#define EIGEN_CXX11_TENSOR_TENSOR_GENERATOR_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorGeneratorOp

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_GLOBAL_FUNCTIONS_H
#define EIGEN_CXX11_TENSOR_TENSOR_GLOBAL_FUNCTIONS_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \cpp11 \returns an expression of the coefficient-wise betainc(\a x, \a a, \a b) to the given tensors.

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_IO_H
#define EIGEN_CXX11_TENSOR_TENSOR_IO_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_IMAGE_PATCH_H
#define EIGEN_CXX11_TENSOR_TENSOR_IMAGE_PATCH_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorImagePatch

View File

@@ -10,6 +10,7 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H
#define EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H
#include "./InternalHeaderCheck.h"
#if EIGEN_HAS_CONSTEXPR && EIGEN_HAS_VARIADIC_TEMPLATES

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_INFLATION_H
#define EIGEN_CXX11_TENSOR_TENSOR_INFLATION_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorInflation

View File

@@ -14,6 +14,8 @@
#include <initializer_list>
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorInitializer

View File

@@ -11,6 +11,8 @@
#define EIGEN_CXX11_TENSOR_TENSOR_INTDIV_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \internal

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_LAYOUT_SWAP_H
#define EIGEN_CXX11_TENSOR_TENSOR_LAYOUT_SWAP_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorLayoutSwap

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_MAP_H
#define EIGEN_CXX11_TENSOR_TENSOR_MAP_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
// FIXME use proper doxygen documentation (e.g. \tparam MakePointer_)

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_META_H
#define EIGEN_CXX11_TENSOR_TENSOR_META_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
template<bool cond> struct Cond {};

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_MORPHING_H
#define EIGEN_CXX11_TENSOR_TENSOR_MORPHING_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorReshaping

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_PADDING_H
#define EIGEN_CXX11_TENSOR_TENSOR_PADDING_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorPadding

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_PATCH_H
#define EIGEN_CXX11_TENSOR_TENSOR_PATCH_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorPatch

View File

@@ -11,6 +11,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_RANDOM_H
#define EIGEN_CXX11_TENSOR_TENSOR_RANDOM_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -22,6 +22,8 @@
#endif
#include "./InternalHeaderCheck.h"
namespace Eigen {

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_REDUCTION_GPU_H
#define EIGEN_CXX11_TENSOR_TENSOR_REDUCTION_GPU_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -27,6 +27,8 @@
#ifndef UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSOR_REDUCTION_SYCL_HPP
#define UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSOR_REDUCTION_SYCL_HPP
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace TensorSycl {
namespace internal {

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_REF_H
#define EIGEN_CXX11_TENSOR_TENSOR_REF_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_REVERSE_H
#define EIGEN_CXX11_TENSOR_TENSOR_REVERSE_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorReverse

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_SCAN_H
#define EIGEN_CXX11_TENSOR_TENSOR_SCAN_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -37,6 +37,8 @@
#ifndef UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSOR_SYCL_SYCL_HPP
#define UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSOR_SYCL_SYCL_HPP
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace TensorSycl {
namespace internal {

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_SHUFFLING_H
#define EIGEN_CXX11_TENSOR_TENSOR_SHUFFLING_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorShuffling

View File

@@ -17,6 +17,8 @@
#define EIGEN_INTERNAL_TENSOR_STORAGE_CTOR_PLUGIN
#endif
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \internal

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_STRIDING_H
#define EIGEN_CXX11_TENSOR_TENSOR_STRIDING_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorStriding

View File

@@ -11,6 +11,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_TRACE_H
#define EIGEN_CXX11_TENSOR_TENSOR_TRACE_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorTrace

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_TRAITS_H
#define EIGEN_CXX11_TENSOR_TENSOR_TRAITS_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_UINT128_H
#define EIGEN_CXX11_TENSOR_TENSOR_UINT128_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -4,6 +4,8 @@
#ifndef EIGEN_CXX11_TENSOR_TENSOR_VOLUME_PATCH_H
#define EIGEN_CXX11_TENSOR_TENSOR_VOLUME_PATCH_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
/** \class TensorVolumePatch

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSORSYMMETRY_DYNAMICSYMMETRY_H
#define EIGEN_CXX11_TENSORSYMMETRY_DYNAMICSYMMETRY_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
class DynamicSGroup

View File

@@ -0,0 +1,3 @@
#ifndef EIGEN_CXX11_TENSORSYMMETRY_MODULE_H
#error "Please include unsupported/Eigen/CXX11/TensorSymmetry instead of including headers inside the src directory directly."
#endif

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSORSYMMETRY_STATICSYMMETRY_H
#define EIGEN_CXX11_TENSORSYMMETRY_STATICSYMMETRY_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSORSYMMETRY_SYMMETRY_H
#define EIGEN_CXX11_TENSORSYMMETRY_SYMMETRY_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
enum {

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_TENSORSYMMETRY_TEMPLATEGROUPTHEORY_H
#define EIGEN_CXX11_TENSORSYMMETRY_TEMPLATEGROUPTHEORY_H
#include "../InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -13,6 +13,8 @@
#ifndef EIGEN_CXX11_THREADPOOL_BARRIER_H
#define EIGEN_CXX11_THREADPOOL_BARRIER_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
class Barrier {

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_THREADPOOL_EVENTCOUNT_H_
#define EIGEN_CXX11_THREADPOOL_EVENTCOUNT_H_
#include "./InternalHeaderCheck.h"
namespace Eigen {
// EventCount allows to wait for arbitrary predicates in non-blocking

View File

@@ -0,0 +1,3 @@
#ifndef EIGEN_CXX11_THREADPOOL_MODULE_H
#error "Please include unsupported/Eigen/CXX11/ThreadPool instead of including headers inside the src directory directly."
#endif

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_THREADPOOL_NONBLOCKING_THREAD_POOL_H
#define EIGEN_CXX11_THREADPOOL_NONBLOCKING_THREAD_POOL_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
template <typename Environment>

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_THREADPOOL_RUNQUEUE_H_
#define EIGEN_CXX11_THREADPOOL_RUNQUEUE_H_
#include "./InternalHeaderCheck.h"
namespace Eigen {
// RunQueue is a fixed-size, partially non-blocking deque or Work items.

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_THREADPOOL_THREAD_ENVIRONMENT_H
#define EIGEN_CXX11_THREADPOOL_THREAD_ENVIRONMENT_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
struct StlThreadEnvironment {

View File

@@ -62,6 +62,8 @@
#endif // EIGEN_AVOID_THREAD_LOCAL
#include "./InternalHeaderCheck.h"
namespace Eigen {
namespace internal {

View File

@@ -10,6 +10,8 @@
#ifndef EIGEN_CXX11_THREADPOOL_THREAD_POOL_INTERFACE_H
#define EIGEN_CXX11_THREADPOOL_THREAD_POOL_INTERFACE_H
#include "./InternalHeaderCheck.h"
namespace Eigen {
// This defines an interface that ThreadPoolDevice can take to use

View File

@@ -10,8 +10,6 @@
#ifndef EIGEN_EMULATE_ARRAY_H
#define EIGEN_EMULATE_ARRAY_H
// The array class is only available starting with cxx11. Emulate our own here
// if needed. Beware, msvc still doesn't advertise itself as a c++11 compiler!
// Moreover, CUDA doesn't support the STL containers, so we use our own instead.
@@ -226,6 +224,7 @@ template<class T, std::size_t N> struct array_size<const array<T,N>& > {
// The compiler supports c++11, and we're not targeting cuda: use std::array as Eigen::array
#include <array>
namespace Eigen {
template <typename T, std::size_t N> using array = std::array<T, N>;