Tensor 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. // This file is part of Eigen, a lightweight C++ template library
  2. // for linear algebra.
  3. //
  4. // Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
  5. // Copyright (C) 2013 Christian Seiler <christian@iwakd.de>
  6. //
  7. // This Source Code Form is subject to the terms of the Mozilla
  8. // Public License v. 2.0. If a copy of the MPL was not distributed
  9. // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
  10. //#ifndef EIGEN_CXX11_TENSOR_MODULE
  11. //#define EIGEN_CXX11_TENSOR_MODULE
  12. #include "../../../Eigen/Core"
  13. #ifdef EIGEN_USE_SYCL
  14. #undef min
  15. #undef max
  16. #undef isnan
  17. #undef isinf
  18. #undef isfinite
  19. #include <SYCL/sycl.hpp>
  20. #include <map>
  21. #include <memory>
  22. #include <utility>
  23. #endif
  24. #include <Eigen/src/Core/util/DisableStupidWarnings.h>
  25. #include "../SpecialFunctions"
  26. #include "src/util/CXX11Meta.h"
  27. #include "src/util/MaxSizeVector.h"
  28. /** \defgroup CXX11_Tensor_Module Tensor Module
  29. *
  30. * This module provides a Tensor class for storing arbitrarily indexed
  31. * objects.
  32. *
  33. * \code
  34. * #include <Eigen/CXX11/Tensor>
  35. * \endcode
  36. *
  37. * Much of the documentation can be found \ref eigen_tensors "here".
  38. */
  39. #include <cmath>
  40. #include <cstddef>
  41. #include <cstring>
  42. #ifdef _WIN32
  43. typedef __int16 int16_t;
  44. typedef unsigned __int16 uint16_t;
  45. typedef __int32 int32_t;
  46. typedef unsigned __int32 uint32_t;
  47. typedef __int64 int64_t;
  48. typedef unsigned __int64 uint64_t;
  49. #else
  50. #include <stdint.h>
  51. #endif
  52. #if __cplusplus > 199711 || EIGEN_COMP_MSVC >= 1900
  53. #include <random>
  54. #endif
  55. #ifdef _WIN32
  56. #include <windows.h>
  57. #elif defined(__APPLE__)
  58. #include <mach/mach_time.h>
  59. #else
  60. #include <time.h>
  61. #endif
  62. #ifdef EIGEN_USE_THREADS
  63. #include "ThreadPool"
  64. #endif
  65. #ifdef EIGEN_USE_GPU
  66. #include <iostream>
  67. #include <cuda_runtime.h>
  68. #if __cplusplus >= 201103L
  69. #include <atomic>
  70. #include <unistd.h>
  71. #endif
  72. #endif
  73. #include "src/Tensor/TensorMacros.h"
  74. #include "src/Tensor/TensorForwardDeclarations.h"
  75. #include "src/Tensor/TensorMeta.h"
  76. #include "src/Tensor/TensorFunctors.h"
  77. #include "src/Tensor/TensorCostModel.h"
  78. #include "src/Tensor/TensorDeviceDefault.h"
  79. #include "src/Tensor/TensorDeviceThreadPool.h"
  80. #include "src/Tensor/TensorDeviceCuda.h"
  81. #include "src/Tensor/TensorDeviceSycl.h"
  82. #include "src/Tensor/TensorIndexList.h"
  83. #include "src/Tensor/TensorDimensionList.h"
  84. #include "src/Tensor/TensorDimensions.h"
  85. #include "src/Tensor/TensorInitializer.h"
  86. #include "src/Tensor/TensorTraits.h"
  87. #include "src/Tensor/TensorRandom.h"
  88. #include "src/Tensor/TensorUInt128.h"
  89. #include "src/Tensor/TensorIntDiv.h"
  90. #include "src/Tensor/TensorGlobalFunctions.h"
  91. #include "src/Tensor/TensorBase.h"
  92. #include "src/Tensor/TensorEvaluator.h"
  93. #include "src/Tensor/TensorExpr.h"
  94. #include "src/Tensor/TensorReduction.h"
  95. #include "src/Tensor/TensorReductionCuda.h"
  96. #include "src/Tensor/TensorArgMax.h"
  97. #include "src/Tensor/TensorConcatenation.h"
  98. #include "src/Tensor/TensorContractionMapper.h"
  99. #include "src/Tensor/TensorContractionBlocking.h"
  100. #include "src/Tensor/TensorContraction.h"
  101. #include "src/Tensor/TensorContractionThreadPool.h"
  102. #include "src/Tensor/TensorContractionCuda.h"
  103. #include "src/Tensor/TensorConversion.h"
  104. #include "src/Tensor/TensorConvolution.h"
  105. #include "src/Tensor/TensorFFT.h"
  106. #include "src/Tensor/TensorPatch.h"
  107. #include "src/Tensor/TensorImagePatch.h"
  108. #include "src/Tensor/TensorVolumePatch.h"
  109. #include "src/Tensor/TensorBroadcasting.h"
  110. #include "src/Tensor/TensorChipping.h"
  111. #include "src/Tensor/TensorInflation.h"
  112. #include "src/Tensor/TensorLayoutSwap.h"
  113. #include "src/Tensor/TensorMorphing.h"
  114. #include "src/Tensor/TensorPadding.h"
  115. #include "src/Tensor/TensorReverse.h"
  116. #include "src/Tensor/TensorShuffling.h"
  117. #include "src/Tensor/TensorStriding.h"
  118. #include "src/Tensor/TensorCustomOp.h"
  119. #include "src/Tensor/TensorEvalTo.h"
  120. #include "src/Tensor/TensorForcedEval.h"
  121. #include "src/Tensor/TensorGenerator.h"
  122. #include "src/Tensor/TensorAssign.h"
  123. #include "src/Tensor/TensorScan.h"
  124. #include "src/Tensor/TensorSycl.h"
  125. #include "src/Tensor/TensorExecutor.h"
  126. #include "src/Tensor/TensorDevice.h"
  127. #include "src/Tensor/TensorStorage.h"
  128. #include "src/Tensor/Tensor.h"
  129. #include "src/Tensor/TensorFixedSize.h"
  130. #include "src/Tensor/TensorMap.h"
  131. #include "src/Tensor/TensorRef.h"
  132. #include "src/Tensor/TensorIO.h"
  133. #include <Eigen/src/Core/util/ReenableStupidWarnings.h>
  134. //#endif // EIGEN_CXX11_TENSOR_MODULE