tomoto 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (420) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +3 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +123 -0
  5. data/ext/tomoto/ext.cpp +245 -0
  6. data/ext/tomoto/extconf.rb +28 -0
  7. data/lib/tomoto.rb +12 -0
  8. data/lib/tomoto/ct.rb +11 -0
  9. data/lib/tomoto/hdp.rb +11 -0
  10. data/lib/tomoto/lda.rb +67 -0
  11. data/lib/tomoto/version.rb +3 -0
  12. data/vendor/EigenRand/EigenRand/Core.h +1139 -0
  13. data/vendor/EigenRand/EigenRand/Dists/Basic.h +111 -0
  14. data/vendor/EigenRand/EigenRand/Dists/Discrete.h +877 -0
  15. data/vendor/EigenRand/EigenRand/Dists/GammaPoisson.h +108 -0
  16. data/vendor/EigenRand/EigenRand/Dists/NormalExp.h +626 -0
  17. data/vendor/EigenRand/EigenRand/EigenRand +19 -0
  18. data/vendor/EigenRand/EigenRand/Macro.h +24 -0
  19. data/vendor/EigenRand/EigenRand/MorePacketMath.h +978 -0
  20. data/vendor/EigenRand/EigenRand/PacketFilter.h +286 -0
  21. data/vendor/EigenRand/EigenRand/PacketRandomEngine.h +624 -0
  22. data/vendor/EigenRand/EigenRand/RandUtils.h +413 -0
  23. data/vendor/EigenRand/EigenRand/doc.h +220 -0
  24. data/vendor/EigenRand/LICENSE +21 -0
  25. data/vendor/EigenRand/README.md +288 -0
  26. data/vendor/eigen/COPYING.BSD +26 -0
  27. data/vendor/eigen/COPYING.GPL +674 -0
  28. data/vendor/eigen/COPYING.LGPL +502 -0
  29. data/vendor/eigen/COPYING.MINPACK +52 -0
  30. data/vendor/eigen/COPYING.MPL2 +373 -0
  31. data/vendor/eigen/COPYING.README +18 -0
  32. data/vendor/eigen/Eigen/CMakeLists.txt +19 -0
  33. data/vendor/eigen/Eigen/Cholesky +46 -0
  34. data/vendor/eigen/Eigen/CholmodSupport +48 -0
  35. data/vendor/eigen/Eigen/Core +537 -0
  36. data/vendor/eigen/Eigen/Dense +7 -0
  37. data/vendor/eigen/Eigen/Eigen +2 -0
  38. data/vendor/eigen/Eigen/Eigenvalues +61 -0
  39. data/vendor/eigen/Eigen/Geometry +62 -0
  40. data/vendor/eigen/Eigen/Householder +30 -0
  41. data/vendor/eigen/Eigen/IterativeLinearSolvers +48 -0
  42. data/vendor/eigen/Eigen/Jacobi +33 -0
  43. data/vendor/eigen/Eigen/LU +50 -0
  44. data/vendor/eigen/Eigen/MetisSupport +35 -0
  45. data/vendor/eigen/Eigen/OrderingMethods +73 -0
  46. data/vendor/eigen/Eigen/PaStiXSupport +48 -0
  47. data/vendor/eigen/Eigen/PardisoSupport +35 -0
  48. data/vendor/eigen/Eigen/QR +51 -0
  49. data/vendor/eigen/Eigen/QtAlignedMalloc +40 -0
  50. data/vendor/eigen/Eigen/SPQRSupport +34 -0
  51. data/vendor/eigen/Eigen/SVD +51 -0
  52. data/vendor/eigen/Eigen/Sparse +36 -0
  53. data/vendor/eigen/Eigen/SparseCholesky +45 -0
  54. data/vendor/eigen/Eigen/SparseCore +69 -0
  55. data/vendor/eigen/Eigen/SparseLU +46 -0
  56. data/vendor/eigen/Eigen/SparseQR +37 -0
  57. data/vendor/eigen/Eigen/StdDeque +27 -0
  58. data/vendor/eigen/Eigen/StdList +26 -0
  59. data/vendor/eigen/Eigen/StdVector +27 -0
  60. data/vendor/eigen/Eigen/SuperLUSupport +64 -0
  61. data/vendor/eigen/Eigen/UmfPackSupport +40 -0
  62. data/vendor/eigen/Eigen/src/Cholesky/LDLT.h +673 -0
  63. data/vendor/eigen/Eigen/src/Cholesky/LLT.h +542 -0
  64. data/vendor/eigen/Eigen/src/Cholesky/LLT_LAPACKE.h +99 -0
  65. data/vendor/eigen/Eigen/src/CholmodSupport/CholmodSupport.h +639 -0
  66. data/vendor/eigen/Eigen/src/Core/Array.h +329 -0
  67. data/vendor/eigen/Eigen/src/Core/ArrayBase.h +226 -0
  68. data/vendor/eigen/Eigen/src/Core/ArrayWrapper.h +209 -0
  69. data/vendor/eigen/Eigen/src/Core/Assign.h +90 -0
  70. data/vendor/eigen/Eigen/src/Core/AssignEvaluator.h +935 -0
  71. data/vendor/eigen/Eigen/src/Core/Assign_MKL.h +178 -0
  72. data/vendor/eigen/Eigen/src/Core/BandMatrix.h +353 -0
  73. data/vendor/eigen/Eigen/src/Core/Block.h +452 -0
  74. data/vendor/eigen/Eigen/src/Core/BooleanRedux.h +164 -0
  75. data/vendor/eigen/Eigen/src/Core/CommaInitializer.h +160 -0
  76. data/vendor/eigen/Eigen/src/Core/ConditionEstimator.h +175 -0
  77. data/vendor/eigen/Eigen/src/Core/CoreEvaluators.h +1688 -0
  78. data/vendor/eigen/Eigen/src/Core/CoreIterators.h +127 -0
  79. data/vendor/eigen/Eigen/src/Core/CwiseBinaryOp.h +184 -0
  80. data/vendor/eigen/Eigen/src/Core/CwiseNullaryOp.h +866 -0
  81. data/vendor/eigen/Eigen/src/Core/CwiseTernaryOp.h +197 -0
  82. data/vendor/eigen/Eigen/src/Core/CwiseUnaryOp.h +103 -0
  83. data/vendor/eigen/Eigen/src/Core/CwiseUnaryView.h +128 -0
  84. data/vendor/eigen/Eigen/src/Core/DenseBase.h +611 -0
  85. data/vendor/eigen/Eigen/src/Core/DenseCoeffsBase.h +681 -0
  86. data/vendor/eigen/Eigen/src/Core/DenseStorage.h +570 -0
  87. data/vendor/eigen/Eigen/src/Core/Diagonal.h +260 -0
  88. data/vendor/eigen/Eigen/src/Core/DiagonalMatrix.h +343 -0
  89. data/vendor/eigen/Eigen/src/Core/DiagonalProduct.h +28 -0
  90. data/vendor/eigen/Eigen/src/Core/Dot.h +318 -0
  91. data/vendor/eigen/Eigen/src/Core/EigenBase.h +159 -0
  92. data/vendor/eigen/Eigen/src/Core/ForceAlignedAccess.h +146 -0
  93. data/vendor/eigen/Eigen/src/Core/Fuzzy.h +155 -0
  94. data/vendor/eigen/Eigen/src/Core/GeneralProduct.h +455 -0
  95. data/vendor/eigen/Eigen/src/Core/GenericPacketMath.h +593 -0
  96. data/vendor/eigen/Eigen/src/Core/GlobalFunctions.h +187 -0
  97. data/vendor/eigen/Eigen/src/Core/IO.h +225 -0
  98. data/vendor/eigen/Eigen/src/Core/Inverse.h +118 -0
  99. data/vendor/eigen/Eigen/src/Core/Map.h +171 -0
  100. data/vendor/eigen/Eigen/src/Core/MapBase.h +303 -0
  101. data/vendor/eigen/Eigen/src/Core/MathFunctions.h +1415 -0
  102. data/vendor/eigen/Eigen/src/Core/MathFunctionsImpl.h +101 -0
  103. data/vendor/eigen/Eigen/src/Core/Matrix.h +459 -0
  104. data/vendor/eigen/Eigen/src/Core/MatrixBase.h +529 -0
  105. data/vendor/eigen/Eigen/src/Core/NestByValue.h +110 -0
  106. data/vendor/eigen/Eigen/src/Core/NoAlias.h +108 -0
  107. data/vendor/eigen/Eigen/src/Core/NumTraits.h +248 -0
  108. data/vendor/eigen/Eigen/src/Core/PermutationMatrix.h +633 -0
  109. data/vendor/eigen/Eigen/src/Core/PlainObjectBase.h +1035 -0
  110. data/vendor/eigen/Eigen/src/Core/Product.h +186 -0
  111. data/vendor/eigen/Eigen/src/Core/ProductEvaluators.h +1112 -0
  112. data/vendor/eigen/Eigen/src/Core/Random.h +182 -0
  113. data/vendor/eigen/Eigen/src/Core/Redux.h +505 -0
  114. data/vendor/eigen/Eigen/src/Core/Ref.h +283 -0
  115. data/vendor/eigen/Eigen/src/Core/Replicate.h +142 -0
  116. data/vendor/eigen/Eigen/src/Core/ReturnByValue.h +117 -0
  117. data/vendor/eigen/Eigen/src/Core/Reverse.h +211 -0
  118. data/vendor/eigen/Eigen/src/Core/Select.h +162 -0
  119. data/vendor/eigen/Eigen/src/Core/SelfAdjointView.h +352 -0
  120. data/vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h +47 -0
  121. data/vendor/eigen/Eigen/src/Core/Solve.h +188 -0
  122. data/vendor/eigen/Eigen/src/Core/SolveTriangular.h +235 -0
  123. data/vendor/eigen/Eigen/src/Core/SolverBase.h +130 -0
  124. data/vendor/eigen/Eigen/src/Core/StableNorm.h +221 -0
  125. data/vendor/eigen/Eigen/src/Core/Stride.h +111 -0
  126. data/vendor/eigen/Eigen/src/Core/Swap.h +67 -0
  127. data/vendor/eigen/Eigen/src/Core/Transpose.h +403 -0
  128. data/vendor/eigen/Eigen/src/Core/Transpositions.h +407 -0
  129. data/vendor/eigen/Eigen/src/Core/TriangularMatrix.h +983 -0
  130. data/vendor/eigen/Eigen/src/Core/VectorBlock.h +96 -0
  131. data/vendor/eigen/Eigen/src/Core/VectorwiseOp.h +695 -0
  132. data/vendor/eigen/Eigen/src/Core/Visitor.h +273 -0
  133. data/vendor/eigen/Eigen/src/Core/arch/AVX/Complex.h +451 -0
  134. data/vendor/eigen/Eigen/src/Core/arch/AVX/MathFunctions.h +439 -0
  135. data/vendor/eigen/Eigen/src/Core/arch/AVX/PacketMath.h +637 -0
  136. data/vendor/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h +51 -0
  137. data/vendor/eigen/Eigen/src/Core/arch/AVX512/MathFunctions.h +391 -0
  138. data/vendor/eigen/Eigen/src/Core/arch/AVX512/PacketMath.h +1316 -0
  139. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/Complex.h +430 -0
  140. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h +322 -0
  141. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h +1061 -0
  142. data/vendor/eigen/Eigen/src/Core/arch/CUDA/Complex.h +103 -0
  143. data/vendor/eigen/Eigen/src/Core/arch/CUDA/Half.h +674 -0
  144. data/vendor/eigen/Eigen/src/Core/arch/CUDA/MathFunctions.h +91 -0
  145. data/vendor/eigen/Eigen/src/Core/arch/CUDA/PacketMath.h +333 -0
  146. data/vendor/eigen/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +1124 -0
  147. data/vendor/eigen/Eigen/src/Core/arch/CUDA/TypeCasting.h +212 -0
  148. data/vendor/eigen/Eigen/src/Core/arch/Default/ConjHelper.h +29 -0
  149. data/vendor/eigen/Eigen/src/Core/arch/Default/Settings.h +49 -0
  150. data/vendor/eigen/Eigen/src/Core/arch/NEON/Complex.h +490 -0
  151. data/vendor/eigen/Eigen/src/Core/arch/NEON/MathFunctions.h +91 -0
  152. data/vendor/eigen/Eigen/src/Core/arch/NEON/PacketMath.h +760 -0
  153. data/vendor/eigen/Eigen/src/Core/arch/SSE/Complex.h +471 -0
  154. data/vendor/eigen/Eigen/src/Core/arch/SSE/MathFunctions.h +562 -0
  155. data/vendor/eigen/Eigen/src/Core/arch/SSE/PacketMath.h +895 -0
  156. data/vendor/eigen/Eigen/src/Core/arch/SSE/TypeCasting.h +77 -0
  157. data/vendor/eigen/Eigen/src/Core/arch/ZVector/Complex.h +397 -0
  158. data/vendor/eigen/Eigen/src/Core/arch/ZVector/MathFunctions.h +137 -0
  159. data/vendor/eigen/Eigen/src/Core/arch/ZVector/PacketMath.h +945 -0
  160. data/vendor/eigen/Eigen/src/Core/functors/AssignmentFunctors.h +168 -0
  161. data/vendor/eigen/Eigen/src/Core/functors/BinaryFunctors.h +475 -0
  162. data/vendor/eigen/Eigen/src/Core/functors/NullaryFunctors.h +188 -0
  163. data/vendor/eigen/Eigen/src/Core/functors/StlFunctors.h +136 -0
  164. data/vendor/eigen/Eigen/src/Core/functors/TernaryFunctors.h +25 -0
  165. data/vendor/eigen/Eigen/src/Core/functors/UnaryFunctors.h +792 -0
  166. data/vendor/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h +2156 -0
  167. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix.h +492 -0
  168. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +311 -0
  169. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +145 -0
  170. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +122 -0
  171. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixVector.h +619 -0
  172. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +136 -0
  173. data/vendor/eigen/Eigen/src/Core/products/Parallelizer.h +163 -0
  174. data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +521 -0
  175. data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +287 -0
  176. data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +260 -0
  177. data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +118 -0
  178. data/vendor/eigen/Eigen/src/Core/products/SelfadjointProduct.h +133 -0
  179. data/vendor/eigen/Eigen/src/Core/products/SelfadjointRank2Update.h +93 -0
  180. data/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix.h +466 -0
  181. data/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +315 -0
  182. data/vendor/eigen/Eigen/src/Core/products/TriangularMatrixVector.h +350 -0
  183. data/vendor/eigen/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +255 -0
  184. data/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h +335 -0
  185. data/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +163 -0
  186. data/vendor/eigen/Eigen/src/Core/products/TriangularSolverVector.h +145 -0
  187. data/vendor/eigen/Eigen/src/Core/util/BlasUtil.h +398 -0
  188. data/vendor/eigen/Eigen/src/Core/util/Constants.h +547 -0
  189. data/vendor/eigen/Eigen/src/Core/util/DisableStupidWarnings.h +83 -0
  190. data/vendor/eigen/Eigen/src/Core/util/ForwardDeclarations.h +302 -0
  191. data/vendor/eigen/Eigen/src/Core/util/MKL_support.h +130 -0
  192. data/vendor/eigen/Eigen/src/Core/util/Macros.h +1001 -0
  193. data/vendor/eigen/Eigen/src/Core/util/Memory.h +993 -0
  194. data/vendor/eigen/Eigen/src/Core/util/Meta.h +534 -0
  195. data/vendor/eigen/Eigen/src/Core/util/NonMPL2.h +3 -0
  196. data/vendor/eigen/Eigen/src/Core/util/ReenableStupidWarnings.h +27 -0
  197. data/vendor/eigen/Eigen/src/Core/util/StaticAssert.h +218 -0
  198. data/vendor/eigen/Eigen/src/Core/util/XprHelper.h +821 -0
  199. data/vendor/eigen/Eigen/src/Eigenvalues/ComplexEigenSolver.h +346 -0
  200. data/vendor/eigen/Eigen/src/Eigenvalues/ComplexSchur.h +459 -0
  201. data/vendor/eigen/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +91 -0
  202. data/vendor/eigen/Eigen/src/Eigenvalues/EigenSolver.h +622 -0
  203. data/vendor/eigen/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +418 -0
  204. data/vendor/eigen/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +226 -0
  205. data/vendor/eigen/Eigen/src/Eigenvalues/HessenbergDecomposition.h +374 -0
  206. data/vendor/eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +158 -0
  207. data/vendor/eigen/Eigen/src/Eigenvalues/RealQZ.h +654 -0
  208. data/vendor/eigen/Eigen/src/Eigenvalues/RealSchur.h +546 -0
  209. data/vendor/eigen/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +77 -0
  210. data/vendor/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +870 -0
  211. data/vendor/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +87 -0
  212. data/vendor/eigen/Eigen/src/Eigenvalues/Tridiagonalization.h +556 -0
  213. data/vendor/eigen/Eigen/src/Geometry/AlignedBox.h +392 -0
  214. data/vendor/eigen/Eigen/src/Geometry/AngleAxis.h +247 -0
  215. data/vendor/eigen/Eigen/src/Geometry/EulerAngles.h +114 -0
  216. data/vendor/eigen/Eigen/src/Geometry/Homogeneous.h +497 -0
  217. data/vendor/eigen/Eigen/src/Geometry/Hyperplane.h +282 -0
  218. data/vendor/eigen/Eigen/src/Geometry/OrthoMethods.h +234 -0
  219. data/vendor/eigen/Eigen/src/Geometry/ParametrizedLine.h +195 -0
  220. data/vendor/eigen/Eigen/src/Geometry/Quaternion.h +814 -0
  221. data/vendor/eigen/Eigen/src/Geometry/Rotation2D.h +199 -0
  222. data/vendor/eigen/Eigen/src/Geometry/RotationBase.h +206 -0
  223. data/vendor/eigen/Eigen/src/Geometry/Scaling.h +170 -0
  224. data/vendor/eigen/Eigen/src/Geometry/Transform.h +1542 -0
  225. data/vendor/eigen/Eigen/src/Geometry/Translation.h +208 -0
  226. data/vendor/eigen/Eigen/src/Geometry/Umeyama.h +166 -0
  227. data/vendor/eigen/Eigen/src/Geometry/arch/Geometry_SSE.h +161 -0
  228. data/vendor/eigen/Eigen/src/Householder/BlockHouseholder.h +103 -0
  229. data/vendor/eigen/Eigen/src/Householder/Householder.h +172 -0
  230. data/vendor/eigen/Eigen/src/Householder/HouseholderSequence.h +470 -0
  231. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +226 -0
  232. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +228 -0
  233. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +246 -0
  234. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +400 -0
  235. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +462 -0
  236. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +394 -0
  237. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +216 -0
  238. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +115 -0
  239. data/vendor/eigen/Eigen/src/Jacobi/Jacobi.h +462 -0
  240. data/vendor/eigen/Eigen/src/LU/Determinant.h +101 -0
  241. data/vendor/eigen/Eigen/src/LU/FullPivLU.h +891 -0
  242. data/vendor/eigen/Eigen/src/LU/InverseImpl.h +415 -0
  243. data/vendor/eigen/Eigen/src/LU/PartialPivLU.h +611 -0
  244. data/vendor/eigen/Eigen/src/LU/PartialPivLU_LAPACKE.h +83 -0
  245. data/vendor/eigen/Eigen/src/LU/arch/Inverse_SSE.h +338 -0
  246. data/vendor/eigen/Eigen/src/MetisSupport/MetisSupport.h +137 -0
  247. data/vendor/eigen/Eigen/src/OrderingMethods/Amd.h +445 -0
  248. data/vendor/eigen/Eigen/src/OrderingMethods/Eigen_Colamd.h +1843 -0
  249. data/vendor/eigen/Eigen/src/OrderingMethods/Ordering.h +157 -0
  250. data/vendor/eigen/Eigen/src/PaStiXSupport/PaStiXSupport.h +678 -0
  251. data/vendor/eigen/Eigen/src/PardisoSupport/PardisoSupport.h +543 -0
  252. data/vendor/eigen/Eigen/src/QR/ColPivHouseholderQR.h +653 -0
  253. data/vendor/eigen/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +97 -0
  254. data/vendor/eigen/Eigen/src/QR/CompleteOrthogonalDecomposition.h +562 -0
  255. data/vendor/eigen/Eigen/src/QR/FullPivHouseholderQR.h +676 -0
  256. data/vendor/eigen/Eigen/src/QR/HouseholderQR.h +409 -0
  257. data/vendor/eigen/Eigen/src/QR/HouseholderQR_LAPACKE.h +68 -0
  258. data/vendor/eigen/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +313 -0
  259. data/vendor/eigen/Eigen/src/SVD/BDCSVD.h +1246 -0
  260. data/vendor/eigen/Eigen/src/SVD/JacobiSVD.h +804 -0
  261. data/vendor/eigen/Eigen/src/SVD/JacobiSVD_LAPACKE.h +91 -0
  262. data/vendor/eigen/Eigen/src/SVD/SVDBase.h +315 -0
  263. data/vendor/eigen/Eigen/src/SVD/UpperBidiagonalization.h +414 -0
  264. data/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h +689 -0
  265. data/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +199 -0
  266. data/vendor/eigen/Eigen/src/SparseCore/AmbiVector.h +377 -0
  267. data/vendor/eigen/Eigen/src/SparseCore/CompressedStorage.h +258 -0
  268. data/vendor/eigen/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +352 -0
  269. data/vendor/eigen/Eigen/src/SparseCore/MappedSparseMatrix.h +67 -0
  270. data/vendor/eigen/Eigen/src/SparseCore/SparseAssign.h +216 -0
  271. data/vendor/eigen/Eigen/src/SparseCore/SparseBlock.h +603 -0
  272. data/vendor/eigen/Eigen/src/SparseCore/SparseColEtree.h +206 -0
  273. data/vendor/eigen/Eigen/src/SparseCore/SparseCompressedBase.h +341 -0
  274. data/vendor/eigen/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +726 -0
  275. data/vendor/eigen/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +148 -0
  276. data/vendor/eigen/Eigen/src/SparseCore/SparseDenseProduct.h +320 -0
  277. data/vendor/eigen/Eigen/src/SparseCore/SparseDiagonalProduct.h +138 -0
  278. data/vendor/eigen/Eigen/src/SparseCore/SparseDot.h +98 -0
  279. data/vendor/eigen/Eigen/src/SparseCore/SparseFuzzy.h +29 -0
  280. data/vendor/eigen/Eigen/src/SparseCore/SparseMap.h +305 -0
  281. data/vendor/eigen/Eigen/src/SparseCore/SparseMatrix.h +1403 -0
  282. data/vendor/eigen/Eigen/src/SparseCore/SparseMatrixBase.h +405 -0
  283. data/vendor/eigen/Eigen/src/SparseCore/SparsePermutation.h +178 -0
  284. data/vendor/eigen/Eigen/src/SparseCore/SparseProduct.h +169 -0
  285. data/vendor/eigen/Eigen/src/SparseCore/SparseRedux.h +49 -0
  286. data/vendor/eigen/Eigen/src/SparseCore/SparseRef.h +397 -0
  287. data/vendor/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h +656 -0
  288. data/vendor/eigen/Eigen/src/SparseCore/SparseSolverBase.h +124 -0
  289. data/vendor/eigen/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +198 -0
  290. data/vendor/eigen/Eigen/src/SparseCore/SparseTranspose.h +92 -0
  291. data/vendor/eigen/Eigen/src/SparseCore/SparseTriangularView.h +189 -0
  292. data/vendor/eigen/Eigen/src/SparseCore/SparseUtil.h +178 -0
  293. data/vendor/eigen/Eigen/src/SparseCore/SparseVector.h +478 -0
  294. data/vendor/eigen/Eigen/src/SparseCore/SparseView.h +253 -0
  295. data/vendor/eigen/Eigen/src/SparseCore/TriangularSolver.h +315 -0
  296. data/vendor/eigen/Eigen/src/SparseLU/SparseLU.h +773 -0
  297. data/vendor/eigen/Eigen/src/SparseLU/SparseLUImpl.h +66 -0
  298. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_Memory.h +226 -0
  299. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_Structs.h +110 -0
  300. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +301 -0
  301. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_Utils.h +80 -0
  302. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_column_bmod.h +181 -0
  303. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_column_dfs.h +179 -0
  304. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +107 -0
  305. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +280 -0
  306. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +126 -0
  307. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +130 -0
  308. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_panel_bmod.h +223 -0
  309. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_panel_dfs.h +258 -0
  310. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_pivotL.h +137 -0
  311. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_pruneL.h +136 -0
  312. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_relax_snode.h +83 -0
  313. data/vendor/eigen/Eigen/src/SparseQR/SparseQR.h +745 -0
  314. data/vendor/eigen/Eigen/src/StlSupport/StdDeque.h +126 -0
  315. data/vendor/eigen/Eigen/src/StlSupport/StdList.h +106 -0
  316. data/vendor/eigen/Eigen/src/StlSupport/StdVector.h +131 -0
  317. data/vendor/eigen/Eigen/src/StlSupport/details.h +84 -0
  318. data/vendor/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h +1027 -0
  319. data/vendor/eigen/Eigen/src/UmfPackSupport/UmfPackSupport.h +506 -0
  320. data/vendor/eigen/Eigen/src/misc/Image.h +82 -0
  321. data/vendor/eigen/Eigen/src/misc/Kernel.h +79 -0
  322. data/vendor/eigen/Eigen/src/misc/RealSvd2x2.h +55 -0
  323. data/vendor/eigen/Eigen/src/misc/blas.h +440 -0
  324. data/vendor/eigen/Eigen/src/misc/lapack.h +152 -0
  325. data/vendor/eigen/Eigen/src/misc/lapacke.h +16291 -0
  326. data/vendor/eigen/Eigen/src/misc/lapacke_mangling.h +17 -0
  327. data/vendor/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.h +332 -0
  328. data/vendor/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.h +552 -0
  329. data/vendor/eigen/Eigen/src/plugins/BlockMethods.h +1058 -0
  330. data/vendor/eigen/Eigen/src/plugins/CommonCwiseBinaryOps.h +115 -0
  331. data/vendor/eigen/Eigen/src/plugins/CommonCwiseUnaryOps.h +163 -0
  332. data/vendor/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.h +152 -0
  333. data/vendor/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.h +85 -0
  334. data/vendor/eigen/README.md +3 -0
  335. data/vendor/eigen/bench/README.txt +55 -0
  336. data/vendor/eigen/bench/btl/COPYING +340 -0
  337. data/vendor/eigen/bench/btl/README +154 -0
  338. data/vendor/eigen/bench/tensors/README +21 -0
  339. data/vendor/eigen/blas/README.txt +6 -0
  340. data/vendor/eigen/demos/mandelbrot/README +10 -0
  341. data/vendor/eigen/demos/mix_eigen_and_c/README +9 -0
  342. data/vendor/eigen/demos/opengl/README +13 -0
  343. data/vendor/eigen/unsupported/Eigen/CXX11/src/Tensor/README.md +1760 -0
  344. data/vendor/eigen/unsupported/README.txt +50 -0
  345. data/vendor/tomotopy/LICENSE +21 -0
  346. data/vendor/tomotopy/README.kr.rst +375 -0
  347. data/vendor/tomotopy/README.rst +382 -0
  348. data/vendor/tomotopy/src/Labeling/FoRelevance.cpp +362 -0
  349. data/vendor/tomotopy/src/Labeling/FoRelevance.h +88 -0
  350. data/vendor/tomotopy/src/Labeling/Labeler.h +50 -0
  351. data/vendor/tomotopy/src/TopicModel/CT.h +37 -0
  352. data/vendor/tomotopy/src/TopicModel/CTModel.cpp +13 -0
  353. data/vendor/tomotopy/src/TopicModel/CTModel.hpp +293 -0
  354. data/vendor/tomotopy/src/TopicModel/DMR.h +51 -0
  355. data/vendor/tomotopy/src/TopicModel/DMRModel.cpp +13 -0
  356. data/vendor/tomotopy/src/TopicModel/DMRModel.hpp +374 -0
  357. data/vendor/tomotopy/src/TopicModel/DT.h +65 -0
  358. data/vendor/tomotopy/src/TopicModel/DTM.h +22 -0
  359. data/vendor/tomotopy/src/TopicModel/DTModel.cpp +15 -0
  360. data/vendor/tomotopy/src/TopicModel/DTModel.hpp +572 -0
  361. data/vendor/tomotopy/src/TopicModel/GDMR.h +37 -0
  362. data/vendor/tomotopy/src/TopicModel/GDMRModel.cpp +14 -0
  363. data/vendor/tomotopy/src/TopicModel/GDMRModel.hpp +485 -0
  364. data/vendor/tomotopy/src/TopicModel/HDP.h +74 -0
  365. data/vendor/tomotopy/src/TopicModel/HDPModel.cpp +13 -0
  366. data/vendor/tomotopy/src/TopicModel/HDPModel.hpp +592 -0
  367. data/vendor/tomotopy/src/TopicModel/HLDA.h +40 -0
  368. data/vendor/tomotopy/src/TopicModel/HLDAModel.cpp +13 -0
  369. data/vendor/tomotopy/src/TopicModel/HLDAModel.hpp +681 -0
  370. data/vendor/tomotopy/src/TopicModel/HPA.h +27 -0
  371. data/vendor/tomotopy/src/TopicModel/HPAModel.cpp +21 -0
  372. data/vendor/tomotopy/src/TopicModel/HPAModel.hpp +588 -0
  373. data/vendor/tomotopy/src/TopicModel/LDA.h +144 -0
  374. data/vendor/tomotopy/src/TopicModel/LDACVB0Model.hpp +442 -0
  375. data/vendor/tomotopy/src/TopicModel/LDAModel.cpp +13 -0
  376. data/vendor/tomotopy/src/TopicModel/LDAModel.hpp +1058 -0
  377. data/vendor/tomotopy/src/TopicModel/LLDA.h +45 -0
  378. data/vendor/tomotopy/src/TopicModel/LLDAModel.cpp +13 -0
  379. data/vendor/tomotopy/src/TopicModel/LLDAModel.hpp +203 -0
  380. data/vendor/tomotopy/src/TopicModel/MGLDA.h +63 -0
  381. data/vendor/tomotopy/src/TopicModel/MGLDAModel.cpp +17 -0
  382. data/vendor/tomotopy/src/TopicModel/MGLDAModel.hpp +558 -0
  383. data/vendor/tomotopy/src/TopicModel/PA.h +43 -0
  384. data/vendor/tomotopy/src/TopicModel/PAModel.cpp +13 -0
  385. data/vendor/tomotopy/src/TopicModel/PAModel.hpp +467 -0
  386. data/vendor/tomotopy/src/TopicModel/PLDA.h +17 -0
  387. data/vendor/tomotopy/src/TopicModel/PLDAModel.cpp +13 -0
  388. data/vendor/tomotopy/src/TopicModel/PLDAModel.hpp +214 -0
  389. data/vendor/tomotopy/src/TopicModel/SLDA.h +54 -0
  390. data/vendor/tomotopy/src/TopicModel/SLDAModel.cpp +17 -0
  391. data/vendor/tomotopy/src/TopicModel/SLDAModel.hpp +456 -0
  392. data/vendor/tomotopy/src/TopicModel/TopicModel.hpp +692 -0
  393. data/vendor/tomotopy/src/Utils/AliasMethod.hpp +169 -0
  394. data/vendor/tomotopy/src/Utils/Dictionary.h +80 -0
  395. data/vendor/tomotopy/src/Utils/EigenAddonOps.hpp +181 -0
  396. data/vendor/tomotopy/src/Utils/LBFGS.h +202 -0
  397. data/vendor/tomotopy/src/Utils/LBFGS/LineSearchBacktracking.h +120 -0
  398. data/vendor/tomotopy/src/Utils/LBFGS/LineSearchBracketing.h +122 -0
  399. data/vendor/tomotopy/src/Utils/LBFGS/Param.h +213 -0
  400. data/vendor/tomotopy/src/Utils/LUT.hpp +82 -0
  401. data/vendor/tomotopy/src/Utils/MultiNormalDistribution.hpp +69 -0
  402. data/vendor/tomotopy/src/Utils/PolyaGamma.hpp +200 -0
  403. data/vendor/tomotopy/src/Utils/PolyaGammaHybrid.hpp +672 -0
  404. data/vendor/tomotopy/src/Utils/ThreadPool.hpp +150 -0
  405. data/vendor/tomotopy/src/Utils/Trie.hpp +220 -0
  406. data/vendor/tomotopy/src/Utils/TruncMultiNormal.hpp +94 -0
  407. data/vendor/tomotopy/src/Utils/Utils.hpp +337 -0
  408. data/vendor/tomotopy/src/Utils/avx_gamma.h +46 -0
  409. data/vendor/tomotopy/src/Utils/avx_mathfun.h +736 -0
  410. data/vendor/tomotopy/src/Utils/exception.h +28 -0
  411. data/vendor/tomotopy/src/Utils/math.h +281 -0
  412. data/vendor/tomotopy/src/Utils/rtnorm.hpp +2690 -0
  413. data/vendor/tomotopy/src/Utils/sample.hpp +192 -0
  414. data/vendor/tomotopy/src/Utils/serializer.hpp +695 -0
  415. data/vendor/tomotopy/src/Utils/slp.hpp +131 -0
  416. data/vendor/tomotopy/src/Utils/sse_gamma.h +48 -0
  417. data/vendor/tomotopy/src/Utils/sse_mathfun.h +710 -0
  418. data/vendor/tomotopy/src/Utils/text.hpp +49 -0
  419. data/vendor/tomotopy/src/Utils/tvector.hpp +543 -0
  420. metadata +531 -0
@@ -0,0 +1,1001 @@
1
+ // This file is part of Eigen, a lightweight C++ template library
2
+ // for linear algebra.
3
+ //
4
+ // Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>
5
+ // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
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
+
11
+ #ifndef EIGEN_MACROS_H
12
+ #define EIGEN_MACROS_H
13
+
14
+ #define EIGEN_WORLD_VERSION 3
15
+ #define EIGEN_MAJOR_VERSION 3
16
+ #define EIGEN_MINOR_VERSION 7
17
+
18
+ #define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x && \
19
+ (EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y && \
20
+ EIGEN_MINOR_VERSION>=z))))
21
+
22
+ // Compiler identification, EIGEN_COMP_*
23
+
24
+ /// \internal EIGEN_COMP_GNUC set to 1 for all compilers compatible with GCC
25
+ #ifdef __GNUC__
26
+ #define EIGEN_COMP_GNUC 1
27
+ #else
28
+ #define EIGEN_COMP_GNUC 0
29
+ #endif
30
+
31
+ /// \internal EIGEN_COMP_CLANG set to major+minor version (e.g., 307 for clang 3.7) if the compiler is clang
32
+ #if defined(__clang__)
33
+ #define EIGEN_COMP_CLANG (__clang_major__*100+__clang_minor__)
34
+ #else
35
+ #define EIGEN_COMP_CLANG 0
36
+ #endif
37
+
38
+
39
+ /// \internal EIGEN_COMP_LLVM set to 1 if the compiler backend is llvm
40
+ #if defined(__llvm__)
41
+ #define EIGEN_COMP_LLVM 1
42
+ #else
43
+ #define EIGEN_COMP_LLVM 0
44
+ #endif
45
+
46
+ /// \internal EIGEN_COMP_ICC set to __INTEL_COMPILER if the compiler is Intel compiler, 0 otherwise
47
+ #if defined(__INTEL_COMPILER)
48
+ #define EIGEN_COMP_ICC __INTEL_COMPILER
49
+ #else
50
+ #define EIGEN_COMP_ICC 0
51
+ #endif
52
+
53
+ /// \internal EIGEN_COMP_MINGW set to 1 if the compiler is mingw
54
+ #if defined(__MINGW32__)
55
+ #define EIGEN_COMP_MINGW 1
56
+ #else
57
+ #define EIGEN_COMP_MINGW 0
58
+ #endif
59
+
60
+ /// \internal EIGEN_COMP_SUNCC set to 1 if the compiler is Solaris Studio
61
+ #if defined(__SUNPRO_CC)
62
+ #define EIGEN_COMP_SUNCC 1
63
+ #else
64
+ #define EIGEN_COMP_SUNCC 0
65
+ #endif
66
+
67
+ /// \internal EIGEN_COMP_MSVC set to _MSC_VER if the compiler is Microsoft Visual C++, 0 otherwise.
68
+ #if defined(_MSC_VER)
69
+ #define EIGEN_COMP_MSVC _MSC_VER
70
+ #else
71
+ #define EIGEN_COMP_MSVC 0
72
+ #endif
73
+
74
+ // For the record, here is a table summarizing the possible values for EIGEN_COMP_MSVC:
75
+ // name ver MSC_VER
76
+ // 2008 9 1500
77
+ // 2010 10 1600
78
+ // 2012 11 1700
79
+ // 2013 12 1800
80
+ // 2015 14 1900
81
+ // "15" 15 1900
82
+
83
+ /// \internal EIGEN_COMP_MSVC_STRICT set to 1 if the compiler is really Microsoft Visual C++ and not ,e.g., ICC or clang-cl
84
+ #if EIGEN_COMP_MSVC && !(EIGEN_COMP_ICC || EIGEN_COMP_LLVM || EIGEN_COMP_CLANG)
85
+ #define EIGEN_COMP_MSVC_STRICT _MSC_VER
86
+ #else
87
+ #define EIGEN_COMP_MSVC_STRICT 0
88
+ #endif
89
+
90
+ /// \internal EIGEN_COMP_IBM set to 1 if the compiler is IBM XL C++
91
+ #if defined(__IBMCPP__) || defined(__xlc__)
92
+ #define EIGEN_COMP_IBM 1
93
+ #else
94
+ #define EIGEN_COMP_IBM 0
95
+ #endif
96
+
97
+ /// \internal EIGEN_COMP_PGI set to 1 if the compiler is Portland Group Compiler
98
+ #if defined(__PGI)
99
+ #define EIGEN_COMP_PGI 1
100
+ #else
101
+ #define EIGEN_COMP_PGI 0
102
+ #endif
103
+
104
+ /// \internal EIGEN_COMP_ARM set to 1 if the compiler is ARM Compiler
105
+ #if defined(__CC_ARM) || defined(__ARMCC_VERSION)
106
+ #define EIGEN_COMP_ARM 1
107
+ #else
108
+ #define EIGEN_COMP_ARM 0
109
+ #endif
110
+
111
+ /// \internal EIGEN_COMP_ARM set to 1 if the compiler is ARM Compiler
112
+ #if defined(__EMSCRIPTEN__)
113
+ #define EIGEN_COMP_EMSCRIPTEN 1
114
+ #else
115
+ #define EIGEN_COMP_EMSCRIPTEN 0
116
+ #endif
117
+
118
+
119
+ /// \internal EIGEN_GNUC_STRICT set to 1 if the compiler is really GCC and not a compatible compiler (e.g., ICC, clang, mingw, etc.)
120
+ #if EIGEN_COMP_GNUC && !(EIGEN_COMP_CLANG || EIGEN_COMP_ICC || EIGEN_COMP_MINGW || EIGEN_COMP_PGI || EIGEN_COMP_IBM || EIGEN_COMP_ARM || EIGEN_COMP_EMSCRIPTEN)
121
+ #define EIGEN_COMP_GNUC_STRICT 1
122
+ #else
123
+ #define EIGEN_COMP_GNUC_STRICT 0
124
+ #endif
125
+
126
+
127
+ #if EIGEN_COMP_GNUC
128
+ #define EIGEN_GNUC_AT_LEAST(x,y) ((__GNUC__==x && __GNUC_MINOR__>=y) || __GNUC__>x)
129
+ #define EIGEN_GNUC_AT_MOST(x,y) ((__GNUC__==x && __GNUC_MINOR__<=y) || __GNUC__<x)
130
+ #define EIGEN_GNUC_AT(x,y) ( __GNUC__==x && __GNUC_MINOR__==y )
131
+ #else
132
+ #define EIGEN_GNUC_AT_LEAST(x,y) 0
133
+ #define EIGEN_GNUC_AT_MOST(x,y) 0
134
+ #define EIGEN_GNUC_AT(x,y) 0
135
+ #endif
136
+
137
+ // FIXME: could probably be removed as we do not support gcc 3.x anymore
138
+ #if EIGEN_COMP_GNUC && (__GNUC__ <= 3)
139
+ #define EIGEN_GCC3_OR_OLDER 1
140
+ #else
141
+ #define EIGEN_GCC3_OR_OLDER 0
142
+ #endif
143
+
144
+
145
+ // Architecture identification, EIGEN_ARCH_*
146
+
147
+ #if defined(__x86_64__) || defined(_M_X64) || defined(__amd64)
148
+ #define EIGEN_ARCH_x86_64 1
149
+ #else
150
+ #define EIGEN_ARCH_x86_64 0
151
+ #endif
152
+
153
+ #if defined(__i386__) || defined(_M_IX86) || defined(_X86_) || defined(__i386)
154
+ #define EIGEN_ARCH_i386 1
155
+ #else
156
+ #define EIGEN_ARCH_i386 0
157
+ #endif
158
+
159
+ #if EIGEN_ARCH_x86_64 || EIGEN_ARCH_i386
160
+ #define EIGEN_ARCH_i386_OR_x86_64 1
161
+ #else
162
+ #define EIGEN_ARCH_i386_OR_x86_64 0
163
+ #endif
164
+
165
+ /// \internal EIGEN_ARCH_ARM set to 1 if the architecture is ARM
166
+ #if defined(__arm__)
167
+ #define EIGEN_ARCH_ARM 1
168
+ #else
169
+ #define EIGEN_ARCH_ARM 0
170
+ #endif
171
+
172
+ /// \internal EIGEN_ARCH_ARM64 set to 1 if the architecture is ARM64
173
+ #if defined(__aarch64__)
174
+ #define EIGEN_ARCH_ARM64 1
175
+ #else
176
+ #define EIGEN_ARCH_ARM64 0
177
+ #endif
178
+
179
+ #if EIGEN_ARCH_ARM || EIGEN_ARCH_ARM64
180
+ #define EIGEN_ARCH_ARM_OR_ARM64 1
181
+ #else
182
+ #define EIGEN_ARCH_ARM_OR_ARM64 0
183
+ #endif
184
+
185
+ /// \internal EIGEN_ARCH_MIPS set to 1 if the architecture is MIPS
186
+ #if defined(__mips__) || defined(__mips)
187
+ #define EIGEN_ARCH_MIPS 1
188
+ #else
189
+ #define EIGEN_ARCH_MIPS 0
190
+ #endif
191
+
192
+ /// \internal EIGEN_ARCH_SPARC set to 1 if the architecture is SPARC
193
+ #if defined(__sparc__) || defined(__sparc)
194
+ #define EIGEN_ARCH_SPARC 1
195
+ #else
196
+ #define EIGEN_ARCH_SPARC 0
197
+ #endif
198
+
199
+ /// \internal EIGEN_ARCH_IA64 set to 1 if the architecture is Intel Itanium
200
+ #if defined(__ia64__)
201
+ #define EIGEN_ARCH_IA64 1
202
+ #else
203
+ #define EIGEN_ARCH_IA64 0
204
+ #endif
205
+
206
+ /// \internal EIGEN_ARCH_PPC set to 1 if the architecture is PowerPC
207
+ #if defined(__powerpc__) || defined(__ppc__) || defined(_M_PPC)
208
+ #define EIGEN_ARCH_PPC 1
209
+ #else
210
+ #define EIGEN_ARCH_PPC 0
211
+ #endif
212
+
213
+
214
+
215
+ // Operating system identification, EIGEN_OS_*
216
+
217
+ /// \internal EIGEN_OS_UNIX set to 1 if the OS is a unix variant
218
+ #if defined(__unix__) || defined(__unix)
219
+ #define EIGEN_OS_UNIX 1
220
+ #else
221
+ #define EIGEN_OS_UNIX 0
222
+ #endif
223
+
224
+ /// \internal EIGEN_OS_LINUX set to 1 if the OS is based on Linux kernel
225
+ #if defined(__linux__)
226
+ #define EIGEN_OS_LINUX 1
227
+ #else
228
+ #define EIGEN_OS_LINUX 0
229
+ #endif
230
+
231
+ /// \internal EIGEN_OS_ANDROID set to 1 if the OS is Android
232
+ // note: ANDROID is defined when using ndk_build, __ANDROID__ is defined when using a standalone toolchain.
233
+ #if defined(__ANDROID__) || defined(ANDROID)
234
+ #define EIGEN_OS_ANDROID 1
235
+ #else
236
+ #define EIGEN_OS_ANDROID 0
237
+ #endif
238
+
239
+ /// \internal EIGEN_OS_GNULINUX set to 1 if the OS is GNU Linux and not Linux-based OS (e.g., not android)
240
+ #if defined(__gnu_linux__) && !(EIGEN_OS_ANDROID)
241
+ #define EIGEN_OS_GNULINUX 1
242
+ #else
243
+ #define EIGEN_OS_GNULINUX 0
244
+ #endif
245
+
246
+ /// \internal EIGEN_OS_BSD set to 1 if the OS is a BSD variant
247
+ #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__)
248
+ #define EIGEN_OS_BSD 1
249
+ #else
250
+ #define EIGEN_OS_BSD 0
251
+ #endif
252
+
253
+ /// \internal EIGEN_OS_MAC set to 1 if the OS is MacOS
254
+ #if defined(__APPLE__)
255
+ #define EIGEN_OS_MAC 1
256
+ #else
257
+ #define EIGEN_OS_MAC 0
258
+ #endif
259
+
260
+ /// \internal EIGEN_OS_QNX set to 1 if the OS is QNX
261
+ #if defined(__QNX__)
262
+ #define EIGEN_OS_QNX 1
263
+ #else
264
+ #define EIGEN_OS_QNX 0
265
+ #endif
266
+
267
+ /// \internal EIGEN_OS_WIN set to 1 if the OS is Windows based
268
+ #if defined(_WIN32)
269
+ #define EIGEN_OS_WIN 1
270
+ #else
271
+ #define EIGEN_OS_WIN 0
272
+ #endif
273
+
274
+ /// \internal EIGEN_OS_WIN64 set to 1 if the OS is Windows 64bits
275
+ #if defined(_WIN64)
276
+ #define EIGEN_OS_WIN64 1
277
+ #else
278
+ #define EIGEN_OS_WIN64 0
279
+ #endif
280
+
281
+ /// \internal EIGEN_OS_WINCE set to 1 if the OS is Windows CE
282
+ #if defined(_WIN32_WCE)
283
+ #define EIGEN_OS_WINCE 1
284
+ #else
285
+ #define EIGEN_OS_WINCE 0
286
+ #endif
287
+
288
+ /// \internal EIGEN_OS_CYGWIN set to 1 if the OS is Windows/Cygwin
289
+ #if defined(__CYGWIN__)
290
+ #define EIGEN_OS_CYGWIN 1
291
+ #else
292
+ #define EIGEN_OS_CYGWIN 0
293
+ #endif
294
+
295
+ /// \internal EIGEN_OS_WIN_STRICT set to 1 if the OS is really Windows and not some variants
296
+ #if EIGEN_OS_WIN && !( EIGEN_OS_WINCE || EIGEN_OS_CYGWIN )
297
+ #define EIGEN_OS_WIN_STRICT 1
298
+ #else
299
+ #define EIGEN_OS_WIN_STRICT 0
300
+ #endif
301
+
302
+ /// \internal EIGEN_OS_SUN set to 1 if the OS is SUN
303
+ #if (defined(sun) || defined(__sun)) && !(defined(__SVR4) || defined(__svr4__))
304
+ #define EIGEN_OS_SUN 1
305
+ #else
306
+ #define EIGEN_OS_SUN 0
307
+ #endif
308
+
309
+ /// \internal EIGEN_OS_SOLARIS set to 1 if the OS is Solaris
310
+ #if (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))
311
+ #define EIGEN_OS_SOLARIS 1
312
+ #else
313
+ #define EIGEN_OS_SOLARIS 0
314
+ #endif
315
+
316
+
317
+
318
+ #if EIGEN_GNUC_AT_MOST(4,3) && !EIGEN_COMP_CLANG
319
+ // see bug 89
320
+ #define EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO 0
321
+ #else
322
+ #define EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO 1
323
+ #endif
324
+
325
+ // This macro can be used to prevent from macro expansion, e.g.:
326
+ // std::max EIGEN_NOT_A_MACRO(a,b)
327
+ #define EIGEN_NOT_A_MACRO
328
+
329
+ #ifdef EIGEN_DEFAULT_TO_ROW_MAJOR
330
+ #define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION Eigen::RowMajor
331
+ #else
332
+ #define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION Eigen::ColMajor
333
+ #endif
334
+
335
+ #ifndef EIGEN_DEFAULT_DENSE_INDEX_TYPE
336
+ #define EIGEN_DEFAULT_DENSE_INDEX_TYPE std::ptrdiff_t
337
+ #endif
338
+
339
+ // Cross compiler wrapper around LLVM's __has_builtin
340
+ #ifdef __has_builtin
341
+ # define EIGEN_HAS_BUILTIN(x) __has_builtin(x)
342
+ #else
343
+ # define EIGEN_HAS_BUILTIN(x) 0
344
+ #endif
345
+
346
+ // A Clang feature extension to determine compiler features.
347
+ // We use it to determine 'cxx_rvalue_references'
348
+ #ifndef __has_feature
349
+ # define __has_feature(x) 0
350
+ #endif
351
+
352
+ // Upperbound on the C++ version to use.
353
+ // Expected values are 03, 11, 14, 17, etc.
354
+ // By default, let's use an arbitrarily large C++ version.
355
+ #ifndef EIGEN_MAX_CPP_VER
356
+ #define EIGEN_MAX_CPP_VER 99
357
+ #endif
358
+
359
+ #if EIGEN_MAX_CPP_VER>=11 && (defined(__cplusplus) && (__cplusplus >= 201103L) || EIGEN_COMP_MSVC >= 1900)
360
+ #define EIGEN_HAS_CXX11 1
361
+ #else
362
+ #define EIGEN_HAS_CXX11 0
363
+ #endif
364
+
365
+
366
+ // Do we support r-value references?
367
+ #ifndef EIGEN_HAS_RVALUE_REFERENCES
368
+ #if EIGEN_MAX_CPP_VER>=11 && \
369
+ (__has_feature(cxx_rvalue_references) || \
370
+ (defined(__cplusplus) && __cplusplus >= 201103L) || \
371
+ (EIGEN_COMP_MSVC >= 1600))
372
+ #define EIGEN_HAS_RVALUE_REFERENCES 1
373
+ #else
374
+ #define EIGEN_HAS_RVALUE_REFERENCES 0
375
+ #endif
376
+ #endif
377
+
378
+ // Does the compiler support C99?
379
+ #ifndef EIGEN_HAS_C99_MATH
380
+ #if EIGEN_MAX_CPP_VER>=11 && \
381
+ ((defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)) \
382
+ || (defined(__GNUC__) && defined(_GLIBCXX_USE_C99)) \
383
+ || (defined(_LIBCPP_VERSION) && !defined(_MSC_VER)))
384
+ #define EIGEN_HAS_C99_MATH 1
385
+ #else
386
+ #define EIGEN_HAS_C99_MATH 0
387
+ #endif
388
+ #endif
389
+
390
+ // Does the compiler support result_of?
391
+ #ifndef EIGEN_HAS_STD_RESULT_OF
392
+ #if EIGEN_MAX_CPP_VER>=11 && ((__has_feature(cxx_lambdas) || (defined(__cplusplus) && __cplusplus >= 201103L)))
393
+ #define EIGEN_HAS_STD_RESULT_OF 1
394
+ #else
395
+ #define EIGEN_HAS_STD_RESULT_OF 0
396
+ #endif
397
+ #endif
398
+
399
+ // Does the compiler support variadic templates?
400
+ #ifndef EIGEN_HAS_VARIADIC_TEMPLATES
401
+ #if EIGEN_MAX_CPP_VER>=11 && (__cplusplus > 199711L || EIGEN_COMP_MSVC >= 1900) \
402
+ && (!defined(__NVCC__) || !EIGEN_ARCH_ARM_OR_ARM64 || (EIGEN_CUDACC_VER >= 80000) )
403
+ // ^^ Disable the use of variadic templates when compiling with versions of nvcc older than 8.0 on ARM devices:
404
+ // this prevents nvcc from crashing when compiling Eigen on Tegra X1
405
+ #define EIGEN_HAS_VARIADIC_TEMPLATES 1
406
+ #else
407
+ #define EIGEN_HAS_VARIADIC_TEMPLATES 0
408
+ #endif
409
+ #endif
410
+
411
+ // Does the compiler fully support const expressions? (as in c++14)
412
+ #ifndef EIGEN_HAS_CONSTEXPR
413
+
414
+ #ifdef __CUDACC__
415
+ // Const expressions are supported provided that c++11 is enabled and we're using either clang or nvcc 7.5 or above
416
+ #if EIGEN_MAX_CPP_VER>=14 && (__cplusplus > 199711L && (EIGEN_COMP_CLANG || EIGEN_CUDACC_VER >= 70500))
417
+ #define EIGEN_HAS_CONSTEXPR 1
418
+ #endif
419
+ #elif EIGEN_MAX_CPP_VER>=14 && (__has_feature(cxx_relaxed_constexpr) || (defined(__cplusplus) && __cplusplus >= 201402L) || \
420
+ (EIGEN_GNUC_AT_LEAST(4,8) && (__cplusplus > 199711L)))
421
+ #define EIGEN_HAS_CONSTEXPR 1
422
+ #endif
423
+
424
+ #ifndef EIGEN_HAS_CONSTEXPR
425
+ #define EIGEN_HAS_CONSTEXPR 0
426
+ #endif
427
+
428
+ #endif
429
+
430
+ // Does the compiler support C++11 math?
431
+ // Let's be conservative and enable the default C++11 implementation only if we are sure it exists
432
+ #ifndef EIGEN_HAS_CXX11_MATH
433
+ #if EIGEN_MAX_CPP_VER>=11 && ((__cplusplus > 201103L) || (__cplusplus >= 201103L) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_CLANG || EIGEN_COMP_MSVC || EIGEN_COMP_ICC) \
434
+ && (EIGEN_ARCH_i386_OR_x86_64) && (EIGEN_OS_GNULINUX || EIGEN_OS_WIN_STRICT || EIGEN_OS_MAC))
435
+ #define EIGEN_HAS_CXX11_MATH 1
436
+ #else
437
+ #define EIGEN_HAS_CXX11_MATH 0
438
+ #endif
439
+ #endif
440
+
441
+ // Does the compiler support proper C++11 containers?
442
+ #ifndef EIGEN_HAS_CXX11_CONTAINERS
443
+ #if EIGEN_MAX_CPP_VER>=11 && \
444
+ ((__cplusplus > 201103L) \
445
+ || ((__cplusplus >= 201103L) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_CLANG || EIGEN_COMP_ICC>=1400)) \
446
+ || EIGEN_COMP_MSVC >= 1900)
447
+ #define EIGEN_HAS_CXX11_CONTAINERS 1
448
+ #else
449
+ #define EIGEN_HAS_CXX11_CONTAINERS 0
450
+ #endif
451
+ #endif
452
+
453
+ // Does the compiler support C++11 noexcept?
454
+ #ifndef EIGEN_HAS_CXX11_NOEXCEPT
455
+ #if EIGEN_MAX_CPP_VER>=11 && \
456
+ (__has_feature(cxx_noexcept) \
457
+ || (__cplusplus > 201103L) \
458
+ || ((__cplusplus >= 201103L) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_CLANG || EIGEN_COMP_ICC>=1400)) \
459
+ || EIGEN_COMP_MSVC >= 1900)
460
+ #define EIGEN_HAS_CXX11_NOEXCEPT 1
461
+ #else
462
+ #define EIGEN_HAS_CXX11_NOEXCEPT 0
463
+ #endif
464
+ #endif
465
+
466
+ /** Allows to disable some optimizations which might affect the accuracy of the result.
467
+ * Such optimization are enabled by default, and set EIGEN_FAST_MATH to 0 to disable them.
468
+ * They currently include:
469
+ * - single precision ArrayBase::sin() and ArrayBase::cos() for SSE and AVX vectorization.
470
+ */
471
+ #ifndef EIGEN_FAST_MATH
472
+ #define EIGEN_FAST_MATH 1
473
+ #endif
474
+
475
+ #define EIGEN_DEBUG_VAR(x) std::cerr << #x << " = " << x << std::endl;
476
+
477
+ // concatenate two tokens
478
+ #define EIGEN_CAT2(a,b) a ## b
479
+ #define EIGEN_CAT(a,b) EIGEN_CAT2(a,b)
480
+
481
+ #define EIGEN_COMMA ,
482
+
483
+ // convert a token to a string
484
+ #define EIGEN_MAKESTRING2(a) #a
485
+ #define EIGEN_MAKESTRING(a) EIGEN_MAKESTRING2(a)
486
+
487
+ // EIGEN_STRONG_INLINE is a stronger version of the inline, using __forceinline on MSVC,
488
+ // but it still doesn't use GCC's always_inline. This is useful in (common) situations where MSVC needs forceinline
489
+ // but GCC is still doing fine with just inline.
490
+ #ifndef EIGEN_STRONG_INLINE
491
+ #if EIGEN_COMP_MSVC || EIGEN_COMP_ICC
492
+ #define EIGEN_STRONG_INLINE __forceinline
493
+ #else
494
+ #define EIGEN_STRONG_INLINE inline
495
+ #endif
496
+ #endif
497
+
498
+ // EIGEN_ALWAYS_INLINE is the stronget, it has the effect of making the function inline and adding every possible
499
+ // attribute to maximize inlining. This should only be used when really necessary: in particular,
500
+ // it uses __attribute__((always_inline)) on GCC, which most of the time is useless and can severely harm compile times.
501
+ // FIXME with the always_inline attribute,
502
+ // gcc 3.4.x and 4.1 reports the following compilation error:
503
+ // Eval.h:91: sorry, unimplemented: inlining failed in call to 'const Eigen::Eval<Derived> Eigen::MatrixBase<Scalar, Derived>::eval() const'
504
+ // : function body not available
505
+ // See also bug 1367
506
+ #if EIGEN_GNUC_AT_LEAST(4,2)
507
+ #define EIGEN_ALWAYS_INLINE __attribute__((always_inline)) inline
508
+ #else
509
+ #define EIGEN_ALWAYS_INLINE EIGEN_STRONG_INLINE
510
+ #endif
511
+
512
+ #if EIGEN_COMP_GNUC
513
+ #define EIGEN_DONT_INLINE __attribute__((noinline))
514
+ #elif EIGEN_COMP_MSVC
515
+ #define EIGEN_DONT_INLINE __declspec(noinline)
516
+ #else
517
+ #define EIGEN_DONT_INLINE
518
+ #endif
519
+
520
+ #if EIGEN_COMP_GNUC
521
+ #define EIGEN_PERMISSIVE_EXPR __extension__
522
+ #else
523
+ #define EIGEN_PERMISSIVE_EXPR
524
+ #endif
525
+
526
+ // this macro allows to get rid of linking errors about multiply defined functions.
527
+ // - static is not very good because it prevents definitions from different object files to be merged.
528
+ // So static causes the resulting linked executable to be bloated with multiple copies of the same function.
529
+ // - inline is not perfect either as it unwantedly hints the compiler toward inlining the function.
530
+ #define EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
531
+ #define EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS inline
532
+
533
+ #ifdef NDEBUG
534
+ # ifndef EIGEN_NO_DEBUG
535
+ # define EIGEN_NO_DEBUG
536
+ # endif
537
+ #endif
538
+
539
+ // eigen_plain_assert is where we implement the workaround for the assert() bug in GCC <= 4.3, see bug 89
540
+ #ifdef EIGEN_NO_DEBUG
541
+ #define eigen_plain_assert(x)
542
+ #else
543
+ #if EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO
544
+ namespace Eigen {
545
+ namespace internal {
546
+ inline bool copy_bool(bool b) { return b; }
547
+ }
548
+ }
549
+ #define eigen_plain_assert(x) assert(x)
550
+ #else
551
+ // work around bug 89
552
+ #include <cstdlib> // for abort
553
+ #include <iostream> // for std::cerr
554
+
555
+ namespace Eigen {
556
+ namespace internal {
557
+ // trivial function copying a bool. Must be EIGEN_DONT_INLINE, so we implement it after including Eigen headers.
558
+ // see bug 89.
559
+ namespace {
560
+ EIGEN_DONT_INLINE bool copy_bool(bool b) { return b; }
561
+ }
562
+ inline void assert_fail(const char *condition, const char *function, const char *file, int line)
563
+ {
564
+ std::cerr << "assertion failed: " << condition << " in function " << function << " at " << file << ":" << line << std::endl;
565
+ abort();
566
+ }
567
+ }
568
+ }
569
+ #define eigen_plain_assert(x) \
570
+ do { \
571
+ if(!Eigen::internal::copy_bool(x)) \
572
+ Eigen::internal::assert_fail(EIGEN_MAKESTRING(x), __PRETTY_FUNCTION__, __FILE__, __LINE__); \
573
+ } while(false)
574
+ #endif
575
+ #endif
576
+
577
+ // eigen_assert can be overridden
578
+ #ifndef eigen_assert
579
+ #define eigen_assert(x) eigen_plain_assert(x)
580
+ #endif
581
+
582
+ #ifdef EIGEN_INTERNAL_DEBUGGING
583
+ #define eigen_internal_assert(x) eigen_assert(x)
584
+ #else
585
+ #define eigen_internal_assert(x)
586
+ #endif
587
+
588
+ #ifdef EIGEN_NO_DEBUG
589
+ #define EIGEN_ONLY_USED_FOR_DEBUG(x) EIGEN_UNUSED_VARIABLE(x)
590
+ #else
591
+ #define EIGEN_ONLY_USED_FOR_DEBUG(x)
592
+ #endif
593
+
594
+ #ifndef EIGEN_NO_DEPRECATED_WARNING
595
+ #if EIGEN_COMP_GNUC
596
+ #define EIGEN_DEPRECATED __attribute__((deprecated))
597
+ #elif EIGEN_COMP_MSVC
598
+ #define EIGEN_DEPRECATED __declspec(deprecated)
599
+ #else
600
+ #define EIGEN_DEPRECATED
601
+ #endif
602
+ #else
603
+ #define EIGEN_DEPRECATED
604
+ #endif
605
+
606
+ #if EIGEN_COMP_GNUC
607
+ #define EIGEN_UNUSED __attribute__((unused))
608
+ #else
609
+ #define EIGEN_UNUSED
610
+ #endif
611
+
612
+ // Suppresses 'unused variable' warnings.
613
+ namespace Eigen {
614
+ namespace internal {
615
+ template<typename T> EIGEN_DEVICE_FUNC void ignore_unused_variable(const T&) {}
616
+ }
617
+ }
618
+ #define EIGEN_UNUSED_VARIABLE(var) Eigen::internal::ignore_unused_variable(var);
619
+
620
+ #if !defined(EIGEN_ASM_COMMENT)
621
+ #if EIGEN_COMP_GNUC && (EIGEN_ARCH_i386_OR_x86_64 || EIGEN_ARCH_ARM_OR_ARM64)
622
+ #define EIGEN_ASM_COMMENT(X) __asm__("#" X)
623
+ #else
624
+ #define EIGEN_ASM_COMMENT(X)
625
+ #endif
626
+ #endif
627
+
628
+
629
+ //------------------------------------------------------------------------------------------
630
+ // Static and dynamic alignment control
631
+ //
632
+ // The main purpose of this section is to define EIGEN_MAX_ALIGN_BYTES and EIGEN_MAX_STATIC_ALIGN_BYTES
633
+ // as the maximal boundary in bytes on which dynamically and statically allocated data may be alignment respectively.
634
+ // The values of EIGEN_MAX_ALIGN_BYTES and EIGEN_MAX_STATIC_ALIGN_BYTES can be specified by the user. If not,
635
+ // a default value is automatically computed based on architecture, compiler, and OS.
636
+ //
637
+ // This section also defines macros EIGEN_ALIGN_TO_BOUNDARY(N) and the shortcuts EIGEN_ALIGN{8,16,32,_MAX}
638
+ // to be used to declare statically aligned buffers.
639
+ //------------------------------------------------------------------------------------------
640
+
641
+
642
+ /* EIGEN_ALIGN_TO_BOUNDARY(n) forces data to be n-byte aligned. This is used to satisfy SIMD requirements.
643
+ * However, we do that EVEN if vectorization (EIGEN_VECTORIZE) is disabled,
644
+ * so that vectorization doesn't affect binary compatibility.
645
+ *
646
+ * If we made alignment depend on whether or not EIGEN_VECTORIZE is defined, it would be impossible to link
647
+ * vectorized and non-vectorized code.
648
+ */
649
+ #if (defined __CUDACC__)
650
+ #define EIGEN_ALIGN_TO_BOUNDARY(n) __align__(n)
651
+ #elif EIGEN_COMP_GNUC || EIGEN_COMP_PGI || EIGEN_COMP_IBM || EIGEN_COMP_ARM
652
+ #define EIGEN_ALIGN_TO_BOUNDARY(n) __attribute__((aligned(n)))
653
+ #elif EIGEN_COMP_MSVC
654
+ #define EIGEN_ALIGN_TO_BOUNDARY(n) __declspec(align(n))
655
+ #elif EIGEN_COMP_SUNCC
656
+ // FIXME not sure about this one:
657
+ #define EIGEN_ALIGN_TO_BOUNDARY(n) __attribute__((aligned(n)))
658
+ #else
659
+ #error Please tell me what is the equivalent of __attribute__((aligned(n))) for your compiler
660
+ #endif
661
+
662
+ // If the user explicitly disable vectorization, then we also disable alignment
663
+ #if defined(EIGEN_DONT_VECTORIZE)
664
+ #define EIGEN_IDEAL_MAX_ALIGN_BYTES 0
665
+ #elif defined(EIGEN_VECTORIZE_AVX512)
666
+ // 64 bytes static alignmeent is preferred only if really required
667
+ #define EIGEN_IDEAL_MAX_ALIGN_BYTES 64
668
+ #elif defined(__AVX__)
669
+ // 32 bytes static alignmeent is preferred only if really required
670
+ #define EIGEN_IDEAL_MAX_ALIGN_BYTES 32
671
+ #else
672
+ #define EIGEN_IDEAL_MAX_ALIGN_BYTES 16
673
+ #endif
674
+
675
+
676
+ // EIGEN_MIN_ALIGN_BYTES defines the minimal value for which the notion of explicit alignment makes sense
677
+ #define EIGEN_MIN_ALIGN_BYTES 16
678
+
679
+ // Defined the boundary (in bytes) on which the data needs to be aligned. Note
680
+ // that unless EIGEN_ALIGN is defined and not equal to 0, the data may not be
681
+ // aligned at all regardless of the value of this #define.
682
+
683
+ #if (defined(EIGEN_DONT_ALIGN_STATICALLY) || defined(EIGEN_DONT_ALIGN)) && defined(EIGEN_MAX_STATIC_ALIGN_BYTES) && EIGEN_MAX_STATIC_ALIGN_BYTES>0
684
+ #error EIGEN_MAX_STATIC_ALIGN_BYTES and EIGEN_DONT_ALIGN[_STATICALLY] are both defined with EIGEN_MAX_STATIC_ALIGN_BYTES!=0. Use EIGEN_MAX_STATIC_ALIGN_BYTES=0 as a synonym of EIGEN_DONT_ALIGN_STATICALLY.
685
+ #endif
686
+
687
+ // EIGEN_DONT_ALIGN_STATICALLY and EIGEN_DONT_ALIGN are deprectated
688
+ // They imply EIGEN_MAX_STATIC_ALIGN_BYTES=0
689
+ #if defined(EIGEN_DONT_ALIGN_STATICALLY) || defined(EIGEN_DONT_ALIGN)
690
+ #ifdef EIGEN_MAX_STATIC_ALIGN_BYTES
691
+ #undef EIGEN_MAX_STATIC_ALIGN_BYTES
692
+ #endif
693
+ #define EIGEN_MAX_STATIC_ALIGN_BYTES 0
694
+ #endif
695
+
696
+ #ifndef EIGEN_MAX_STATIC_ALIGN_BYTES
697
+
698
+ // Try to automatically guess what is the best default value for EIGEN_MAX_STATIC_ALIGN_BYTES
699
+
700
+ // 16 byte alignment is only useful for vectorization. Since it affects the ABI, we need to enable
701
+ // 16 byte alignment on all platforms where vectorization might be enabled. In theory we could always
702
+ // enable alignment, but it can be a cause of problems on some platforms, so we just disable it in
703
+ // certain common platform (compiler+architecture combinations) to avoid these problems.
704
+ // Only static alignment is really problematic (relies on nonstandard compiler extensions),
705
+ // try to keep heap alignment even when we have to disable static alignment.
706
+ #if EIGEN_COMP_GNUC && !(EIGEN_ARCH_i386_OR_x86_64 || EIGEN_ARCH_ARM_OR_ARM64 || EIGEN_ARCH_PPC || EIGEN_ARCH_IA64)
707
+ #define EIGEN_GCC_AND_ARCH_DOESNT_WANT_STACK_ALIGNMENT 1
708
+ #elif EIGEN_ARCH_ARM_OR_ARM64 && EIGEN_COMP_GNUC_STRICT && EIGEN_GNUC_AT_MOST(4, 6)
709
+ // Old versions of GCC on ARM, at least 4.4, were once seen to have buggy static alignment support.
710
+ // Not sure which version fixed it, hopefully it doesn't affect 4.7, which is still somewhat in use.
711
+ // 4.8 and newer seem definitely unaffected.
712
+ #define EIGEN_GCC_AND_ARCH_DOESNT_WANT_STACK_ALIGNMENT 1
713
+ #else
714
+ #define EIGEN_GCC_AND_ARCH_DOESNT_WANT_STACK_ALIGNMENT 0
715
+ #endif
716
+
717
+ // static alignment is completely disabled with GCC 3, Sun Studio, and QCC/QNX
718
+ #if !EIGEN_GCC_AND_ARCH_DOESNT_WANT_STACK_ALIGNMENT \
719
+ && !EIGEN_GCC3_OR_OLDER \
720
+ && !EIGEN_COMP_SUNCC \
721
+ && !EIGEN_OS_QNX
722
+ #define EIGEN_ARCH_WANTS_STACK_ALIGNMENT 1
723
+ #else
724
+ #define EIGEN_ARCH_WANTS_STACK_ALIGNMENT 0
725
+ #endif
726
+
727
+ #if EIGEN_ARCH_WANTS_STACK_ALIGNMENT
728
+ #define EIGEN_MAX_STATIC_ALIGN_BYTES EIGEN_IDEAL_MAX_ALIGN_BYTES
729
+ #else
730
+ #define EIGEN_MAX_STATIC_ALIGN_BYTES 0
731
+ #endif
732
+
733
+ #endif
734
+
735
+ // If EIGEN_MAX_ALIGN_BYTES is defined, then it is considered as an upper bound for EIGEN_MAX_ALIGN_BYTES
736
+ #if defined(EIGEN_MAX_ALIGN_BYTES) && EIGEN_MAX_ALIGN_BYTES<EIGEN_MAX_STATIC_ALIGN_BYTES
737
+ #undef EIGEN_MAX_STATIC_ALIGN_BYTES
738
+ #define EIGEN_MAX_STATIC_ALIGN_BYTES EIGEN_MAX_ALIGN_BYTES
739
+ #endif
740
+
741
+ #if EIGEN_MAX_STATIC_ALIGN_BYTES==0 && !defined(EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT)
742
+ #define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT
743
+ #endif
744
+
745
+ // At this stage, EIGEN_MAX_STATIC_ALIGN_BYTES>0 is the true test whether we want to align arrays on the stack or not.
746
+ // It takes into account both the user choice to explicitly enable/disable alignment (by settting EIGEN_MAX_STATIC_ALIGN_BYTES)
747
+ // and the architecture config (EIGEN_ARCH_WANTS_STACK_ALIGNMENT).
748
+ // Henceforth, only EIGEN_MAX_STATIC_ALIGN_BYTES should be used.
749
+
750
+
751
+ // Shortcuts to EIGEN_ALIGN_TO_BOUNDARY
752
+ #define EIGEN_ALIGN8 EIGEN_ALIGN_TO_BOUNDARY(8)
753
+ #define EIGEN_ALIGN16 EIGEN_ALIGN_TO_BOUNDARY(16)
754
+ #define EIGEN_ALIGN32 EIGEN_ALIGN_TO_BOUNDARY(32)
755
+ #define EIGEN_ALIGN64 EIGEN_ALIGN_TO_BOUNDARY(64)
756
+ #if EIGEN_MAX_STATIC_ALIGN_BYTES>0
757
+ #define EIGEN_ALIGN_MAX EIGEN_ALIGN_TO_BOUNDARY(EIGEN_MAX_STATIC_ALIGN_BYTES)
758
+ #else
759
+ #define EIGEN_ALIGN_MAX
760
+ #endif
761
+
762
+
763
+ // Dynamic alignment control
764
+
765
+ #if defined(EIGEN_DONT_ALIGN) && defined(EIGEN_MAX_ALIGN_BYTES) && EIGEN_MAX_ALIGN_BYTES>0
766
+ #error EIGEN_MAX_ALIGN_BYTES and EIGEN_DONT_ALIGN are both defined with EIGEN_MAX_ALIGN_BYTES!=0. Use EIGEN_MAX_ALIGN_BYTES=0 as a synonym of EIGEN_DONT_ALIGN.
767
+ #endif
768
+
769
+ #ifdef EIGEN_DONT_ALIGN
770
+ #ifdef EIGEN_MAX_ALIGN_BYTES
771
+ #undef EIGEN_MAX_ALIGN_BYTES
772
+ #endif
773
+ #define EIGEN_MAX_ALIGN_BYTES 0
774
+ #elif !defined(EIGEN_MAX_ALIGN_BYTES)
775
+ #define EIGEN_MAX_ALIGN_BYTES EIGEN_IDEAL_MAX_ALIGN_BYTES
776
+ #endif
777
+
778
+ #if EIGEN_IDEAL_MAX_ALIGN_BYTES > EIGEN_MAX_ALIGN_BYTES
779
+ #define EIGEN_DEFAULT_ALIGN_BYTES EIGEN_IDEAL_MAX_ALIGN_BYTES
780
+ #else
781
+ #define EIGEN_DEFAULT_ALIGN_BYTES EIGEN_MAX_ALIGN_BYTES
782
+ #endif
783
+
784
+
785
+ #ifndef EIGEN_UNALIGNED_VECTORIZE
786
+ #define EIGEN_UNALIGNED_VECTORIZE 1
787
+ #endif
788
+
789
+ //----------------------------------------------------------------------
790
+
791
+
792
+ #ifdef EIGEN_DONT_USE_RESTRICT_KEYWORD
793
+ #define EIGEN_RESTRICT
794
+ #endif
795
+ #ifndef EIGEN_RESTRICT
796
+ #define EIGEN_RESTRICT __restrict
797
+ #endif
798
+
799
+ #ifndef EIGEN_STACK_ALLOCATION_LIMIT
800
+ // 131072 == 128 KB
801
+ #define EIGEN_STACK_ALLOCATION_LIMIT 131072
802
+ #endif
803
+
804
+ #ifndef EIGEN_DEFAULT_IO_FORMAT
805
+ #ifdef EIGEN_MAKING_DOCS
806
+ // format used in Eigen's documentation
807
+ // needed to define it here as escaping characters in CMake add_definition's argument seems very problematic.
808
+ #define EIGEN_DEFAULT_IO_FORMAT Eigen::IOFormat(3, 0, " ", "\n", "", "")
809
+ #else
810
+ #define EIGEN_DEFAULT_IO_FORMAT Eigen::IOFormat()
811
+ #endif
812
+ #endif
813
+
814
+ // just an empty macro !
815
+ #define EIGEN_EMPTY
816
+
817
+ #if EIGEN_COMP_MSVC_STRICT && (EIGEN_COMP_MSVC < 1900 || EIGEN_CUDACC_VER>0)
818
+ // for older MSVC versions, as well as 1900 && CUDA 8, using the base operator is sufficient (cf Bugs 1000, 1324)
819
+ #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
820
+ using Base::operator =;
821
+ #elif EIGEN_COMP_CLANG // workaround clang bug (see http://forum.kde.org/viewtopic.php?f=74&t=102653)
822
+ #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
823
+ using Base::operator =; \
824
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) { Base::operator=(other); return *this; } \
825
+ template <typename OtherDerived> \
826
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }
827
+ #else
828
+ #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
829
+ using Base::operator =; \
830
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) \
831
+ { \
832
+ Base::operator=(other); \
833
+ return *this; \
834
+ }
835
+ #endif
836
+
837
+
838
+ /** \internal
839
+ * \brief Macro to manually inherit assignment operators.
840
+ * This is necessary, because the implicitly defined assignment operator gets deleted when a custom operator= is defined.
841
+ */
842
+ #define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)
843
+
844
+ /**
845
+ * Just a side note. Commenting within defines works only by documenting
846
+ * behind the object (via '!<'). Comments cannot be multi-line and thus
847
+ * we have these extra long lines. What is confusing doxygen over here is
848
+ * that we use '\' and basically have a bunch of typedefs with their
849
+ * documentation in a single line.
850
+ **/
851
+
852
+ #define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) \
853
+ typedef typename Eigen::internal::traits<Derived>::Scalar Scalar; /*!< \brief Numeric type, e.g. float, double, int or std::complex<float>. */ \
854
+ typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; /*!< \brief The underlying numeric type for composed scalar types. \details In cases where Scalar is e.g. std::complex<T>, T were corresponding to RealScalar. */ \
855
+ typedef typename Base::CoeffReturnType CoeffReturnType; /*!< \brief The return type for coefficient access. \details Depending on whether the object allows direct coefficient access (e.g. for a MatrixXd), this type is either 'const Scalar&' or simply 'Scalar' for objects that do not allow direct coefficient access. */ \
856
+ typedef typename Eigen::internal::ref_selector<Derived>::type Nested; \
857
+ typedef typename Eigen::internal::traits<Derived>::StorageKind StorageKind; \
858
+ typedef typename Eigen::internal::traits<Derived>::StorageIndex StorageIndex; \
859
+ enum { RowsAtCompileTime = Eigen::internal::traits<Derived>::RowsAtCompileTime, \
860
+ ColsAtCompileTime = Eigen::internal::traits<Derived>::ColsAtCompileTime, \
861
+ Flags = Eigen::internal::traits<Derived>::Flags, \
862
+ SizeAtCompileTime = Base::SizeAtCompileTime, \
863
+ MaxSizeAtCompileTime = Base::MaxSizeAtCompileTime, \
864
+ IsVectorAtCompileTime = Base::IsVectorAtCompileTime }; \
865
+ using Base::derived; \
866
+ using Base::const_cast_derived;
867
+
868
+
869
+ // FIXME Maybe the EIGEN_DENSE_PUBLIC_INTERFACE could be removed as importing PacketScalar is rarely needed
870
+ #define EIGEN_DENSE_PUBLIC_INTERFACE(Derived) \
871
+ EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) \
872
+ typedef typename Base::PacketScalar PacketScalar;
873
+
874
+
875
+ #define EIGEN_PLAIN_ENUM_MIN(a,b) (((int)a <= (int)b) ? (int)a : (int)b)
876
+ #define EIGEN_PLAIN_ENUM_MAX(a,b) (((int)a >= (int)b) ? (int)a : (int)b)
877
+
878
+ // EIGEN_SIZE_MIN_PREFER_DYNAMIC gives the min between compile-time sizes. 0 has absolute priority, followed by 1,
879
+ // followed by Dynamic, followed by other finite values. The reason for giving Dynamic the priority over
880
+ // finite values is that min(3, Dynamic) should be Dynamic, since that could be anything between 0 and 3.
881
+ #define EIGEN_SIZE_MIN_PREFER_DYNAMIC(a,b) (((int)a == 0 || (int)b == 0) ? 0 \
882
+ : ((int)a == 1 || (int)b == 1) ? 1 \
883
+ : ((int)a == Dynamic || (int)b == Dynamic) ? Dynamic \
884
+ : ((int)a <= (int)b) ? (int)a : (int)b)
885
+
886
+ // EIGEN_SIZE_MIN_PREFER_FIXED is a variant of EIGEN_SIZE_MIN_PREFER_DYNAMIC comparing MaxSizes. The difference is that finite values
887
+ // now have priority over Dynamic, so that min(3, Dynamic) gives 3. Indeed, whatever the actual value is
888
+ // (between 0 and 3), it is not more than 3.
889
+ #define EIGEN_SIZE_MIN_PREFER_FIXED(a,b) (((int)a == 0 || (int)b == 0) ? 0 \
890
+ : ((int)a == 1 || (int)b == 1) ? 1 \
891
+ : ((int)a == Dynamic && (int)b == Dynamic) ? Dynamic \
892
+ : ((int)a == Dynamic) ? (int)b \
893
+ : ((int)b == Dynamic) ? (int)a \
894
+ : ((int)a <= (int)b) ? (int)a : (int)b)
895
+
896
+ // see EIGEN_SIZE_MIN_PREFER_DYNAMIC. No need for a separate variant for MaxSizes here.
897
+ #define EIGEN_SIZE_MAX(a,b) (((int)a == Dynamic || (int)b == Dynamic) ? Dynamic \
898
+ : ((int)a >= (int)b) ? (int)a : (int)b)
899
+
900
+ #define EIGEN_LOGICAL_XOR(a,b) (((a) || (b)) && !((a) && (b)))
901
+
902
+ #define EIGEN_IMPLIES(a,b) (!(a) || (b))
903
+
904
+ // the expression type of a standard coefficient wise binary operation
905
+ #define EIGEN_CWISE_BINARY_RETURN_TYPE(LHS,RHS,OPNAME) \
906
+ CwiseBinaryOp< \
907
+ EIGEN_CAT(EIGEN_CAT(internal::scalar_,OPNAME),_op)< \
908
+ typename internal::traits<LHS>::Scalar, \
909
+ typename internal::traits<RHS>::Scalar \
910
+ >, \
911
+ const LHS, \
912
+ const RHS \
913
+ >
914
+
915
+ #define EIGEN_MAKE_CWISE_BINARY_OP(METHOD,OPNAME) \
916
+ template<typename OtherDerived> \
917
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,OPNAME) \
918
+ (METHOD)(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
919
+ { \
920
+ return EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,OPNAME)(derived(), other.derived()); \
921
+ }
922
+
923
+ #define EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,TYPEA,TYPEB) \
924
+ (Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<TYPEA,TYPEB,EIGEN_CAT(EIGEN_CAT(Eigen::internal::scalar_,OPNAME),_op)<TYPEA,TYPEB> > >::value)
925
+
926
+ #define EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(EXPR,SCALAR,OPNAME) \
927
+ CwiseBinaryOp<EIGEN_CAT(EIGEN_CAT(internal::scalar_,OPNAME),_op)<typename internal::traits<EXPR>::Scalar,SCALAR>, const EXPR, \
928
+ const typename internal::plain_constant_type<EXPR,SCALAR>::type>
929
+
930
+ #define EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(SCALAR,EXPR,OPNAME) \
931
+ CwiseBinaryOp<EIGEN_CAT(EIGEN_CAT(internal::scalar_,OPNAME),_op)<SCALAR,typename internal::traits<EXPR>::Scalar>, \
932
+ const typename internal::plain_constant_type<EXPR,SCALAR>::type, const EXPR>
933
+
934
+ // Workaround for MSVC 2010 (see ML thread "patch with compile for for MSVC 2010")
935
+ #if EIGEN_COMP_MSVC_STRICT<=1600
936
+ #define EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(X) typename internal::enable_if<true,X>::type
937
+ #else
938
+ #define EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(X) X
939
+ #endif
940
+
941
+ #define EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD,OPNAME) \
942
+ template <typename T> EIGEN_DEVICE_FUNC inline \
943
+ EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived,typename internal::promote_scalar_arg<Scalar EIGEN_COMMA T EIGEN_COMMA EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,Scalar,T)>::type,OPNAME))\
944
+ (METHOD)(const T& scalar) const { \
945
+ typedef typename internal::promote_scalar_arg<Scalar,T,EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,Scalar,T)>::type PromotedT; \
946
+ return EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived,PromotedT,OPNAME)(derived(), \
947
+ typename internal::plain_constant_type<Derived,PromotedT>::type(derived().rows(), derived().cols(), internal::scalar_constant_op<PromotedT>(scalar))); \
948
+ }
949
+
950
+ #define EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT(METHOD,OPNAME) \
951
+ template <typename T> EIGEN_DEVICE_FUNC inline friend \
952
+ EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(typename internal::promote_scalar_arg<Scalar EIGEN_COMMA T EIGEN_COMMA EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,T,Scalar)>::type,Derived,OPNAME)) \
953
+ (METHOD)(const T& scalar, const StorageBaseType& matrix) { \
954
+ typedef typename internal::promote_scalar_arg<Scalar,T,EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,T,Scalar)>::type PromotedT; \
955
+ return EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(PromotedT,Derived,OPNAME)( \
956
+ typename internal::plain_constant_type<Derived,PromotedT>::type(matrix.derived().rows(), matrix.derived().cols(), internal::scalar_constant_op<PromotedT>(scalar)), matrix.derived()); \
957
+ }
958
+
959
+ #define EIGEN_MAKE_SCALAR_BINARY_OP(METHOD,OPNAME) \
960
+ EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT(METHOD,OPNAME) \
961
+ EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD,OPNAME)
962
+
963
+
964
+ #ifdef EIGEN_EXCEPTIONS
965
+ # define EIGEN_THROW_X(X) throw X
966
+ # define EIGEN_THROW throw
967
+ # define EIGEN_TRY try
968
+ # define EIGEN_CATCH(X) catch (X)
969
+ #else
970
+ # ifdef __CUDA_ARCH__
971
+ # define EIGEN_THROW_X(X) asm("trap;")
972
+ # define EIGEN_THROW asm("trap;")
973
+ # else
974
+ # define EIGEN_THROW_X(X) std::abort()
975
+ # define EIGEN_THROW std::abort()
976
+ # endif
977
+ # define EIGEN_TRY if (true)
978
+ # define EIGEN_CATCH(X) else
979
+ #endif
980
+
981
+
982
+ #if EIGEN_HAS_CXX11_NOEXCEPT
983
+ # define EIGEN_INCLUDE_TYPE_TRAITS
984
+ # define EIGEN_NOEXCEPT noexcept
985
+ # define EIGEN_NOEXCEPT_IF(x) noexcept(x)
986
+ # define EIGEN_NO_THROW noexcept(true)
987
+ # define EIGEN_EXCEPTION_SPEC(X) noexcept(false)
988
+ #else
989
+ # define EIGEN_NOEXCEPT
990
+ # define EIGEN_NOEXCEPT_IF(x)
991
+ # define EIGEN_NO_THROW throw()
992
+ # if EIGEN_COMP_MSVC
993
+ // MSVC does not support exception specifications (warning C4290),
994
+ // and they are deprecated in c++11 anyway.
995
+ # define EIGEN_EXCEPTION_SPEC(X) throw()
996
+ # else
997
+ # define EIGEN_EXCEPTION_SPEC(X) throw(X)
998
+ # endif
999
+ #endif
1000
+
1001
+ #endif // EIGEN_MACROS_H