tomoto 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (347) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/README.md +8 -10
  4. data/ext/tomoto/extconf.rb +6 -2
  5. data/ext/tomoto/{ext.cpp → tomoto.cpp} +1 -1
  6. data/lib/tomoto/version.rb +1 -1
  7. data/lib/tomoto.rb +5 -1
  8. data/vendor/EigenRand/EigenRand/Core.h +10 -10
  9. data/vendor/EigenRand/EigenRand/Dists/Basic.h +208 -9
  10. data/vendor/EigenRand/EigenRand/Dists/Discrete.h +52 -31
  11. data/vendor/EigenRand/EigenRand/Dists/GammaPoisson.h +9 -8
  12. data/vendor/EigenRand/EigenRand/Dists/NormalExp.h +28 -21
  13. data/vendor/EigenRand/EigenRand/EigenRand +11 -6
  14. data/vendor/EigenRand/EigenRand/Macro.h +13 -7
  15. data/vendor/EigenRand/EigenRand/MorePacketMath.h +348 -740
  16. data/vendor/EigenRand/EigenRand/MvDists/Multinomial.h +5 -3
  17. data/vendor/EigenRand/EigenRand/MvDists/MvNormal.h +9 -3
  18. data/vendor/EigenRand/EigenRand/PacketFilter.h +11 -253
  19. data/vendor/EigenRand/EigenRand/PacketRandomEngine.h +21 -47
  20. data/vendor/EigenRand/EigenRand/RandUtils.h +50 -344
  21. data/vendor/EigenRand/EigenRand/arch/AVX/MorePacketMath.h +619 -0
  22. data/vendor/EigenRand/EigenRand/arch/AVX/PacketFilter.h +149 -0
  23. data/vendor/EigenRand/EigenRand/arch/AVX/RandUtils.h +228 -0
  24. data/vendor/EigenRand/EigenRand/arch/NEON/MorePacketMath.h +473 -0
  25. data/vendor/EigenRand/EigenRand/arch/NEON/PacketFilter.h +142 -0
  26. data/vendor/EigenRand/EigenRand/arch/NEON/RandUtils.h +126 -0
  27. data/vendor/EigenRand/EigenRand/arch/SSE/MorePacketMath.h +501 -0
  28. data/vendor/EigenRand/EigenRand/arch/SSE/PacketFilter.h +133 -0
  29. data/vendor/EigenRand/EigenRand/arch/SSE/RandUtils.h +120 -0
  30. data/vendor/EigenRand/EigenRand/doc.h +24 -12
  31. data/vendor/EigenRand/README.md +57 -4
  32. data/vendor/eigen/COPYING.APACHE +203 -0
  33. data/vendor/eigen/COPYING.BSD +1 -1
  34. data/vendor/eigen/COPYING.MINPACK +51 -52
  35. data/vendor/eigen/Eigen/Cholesky +0 -1
  36. data/vendor/eigen/Eigen/Core +112 -265
  37. data/vendor/eigen/Eigen/Eigenvalues +2 -3
  38. data/vendor/eigen/Eigen/Geometry +5 -8
  39. data/vendor/eigen/Eigen/Householder +0 -1
  40. data/vendor/eigen/Eigen/Jacobi +0 -1
  41. data/vendor/eigen/Eigen/KLUSupport +41 -0
  42. data/vendor/eigen/Eigen/LU +2 -5
  43. data/vendor/eigen/Eigen/OrderingMethods +0 -3
  44. data/vendor/eigen/Eigen/PaStiXSupport +1 -0
  45. data/vendor/eigen/Eigen/PardisoSupport +0 -0
  46. data/vendor/eigen/Eigen/QR +2 -3
  47. data/vendor/eigen/Eigen/QtAlignedMalloc +0 -1
  48. data/vendor/eigen/Eigen/SVD +0 -1
  49. data/vendor/eigen/Eigen/Sparse +0 -2
  50. data/vendor/eigen/Eigen/SparseCholesky +0 -8
  51. data/vendor/eigen/Eigen/SparseLU +4 -0
  52. data/vendor/eigen/Eigen/SparseQR +0 -1
  53. data/vendor/eigen/Eigen/src/Cholesky/LDLT.h +42 -27
  54. data/vendor/eigen/Eigen/src/Cholesky/LLT.h +39 -23
  55. data/vendor/eigen/Eigen/src/CholmodSupport/CholmodSupport.h +90 -47
  56. data/vendor/eigen/Eigen/src/Core/ArithmeticSequence.h +413 -0
  57. data/vendor/eigen/Eigen/src/Core/Array.h +99 -11
  58. data/vendor/eigen/Eigen/src/Core/ArrayBase.h +3 -3
  59. data/vendor/eigen/Eigen/src/Core/ArrayWrapper.h +21 -21
  60. data/vendor/eigen/Eigen/src/Core/Assign.h +1 -1
  61. data/vendor/eigen/Eigen/src/Core/AssignEvaluator.h +125 -50
  62. data/vendor/eigen/Eigen/src/Core/Assign_MKL.h +10 -10
  63. data/vendor/eigen/Eigen/src/Core/BandMatrix.h +16 -16
  64. data/vendor/eigen/Eigen/src/Core/Block.h +56 -60
  65. data/vendor/eigen/Eigen/src/Core/BooleanRedux.h +29 -31
  66. data/vendor/eigen/Eigen/src/Core/CommaInitializer.h +7 -3
  67. data/vendor/eigen/Eigen/src/Core/CoreEvaluators.h +325 -272
  68. data/vendor/eigen/Eigen/src/Core/CoreIterators.h +5 -0
  69. data/vendor/eigen/Eigen/src/Core/CwiseBinaryOp.h +21 -22
  70. data/vendor/eigen/Eigen/src/Core/CwiseNullaryOp.h +153 -18
  71. data/vendor/eigen/Eigen/src/Core/CwiseUnaryOp.h +6 -6
  72. data/vendor/eigen/Eigen/src/Core/CwiseUnaryView.h +14 -10
  73. data/vendor/eigen/Eigen/src/Core/DenseBase.h +132 -42
  74. data/vendor/eigen/Eigen/src/Core/DenseCoeffsBase.h +25 -21
  75. data/vendor/eigen/Eigen/src/Core/DenseStorage.h +153 -71
  76. data/vendor/eigen/Eigen/src/Core/Diagonal.h +21 -23
  77. data/vendor/eigen/Eigen/src/Core/DiagonalMatrix.h +50 -2
  78. data/vendor/eigen/Eigen/src/Core/DiagonalProduct.h +1 -1
  79. data/vendor/eigen/Eigen/src/Core/Dot.h +10 -10
  80. data/vendor/eigen/Eigen/src/Core/EigenBase.h +10 -9
  81. data/vendor/eigen/Eigen/src/Core/ForceAlignedAccess.h +8 -4
  82. data/vendor/eigen/Eigen/src/Core/Fuzzy.h +3 -3
  83. data/vendor/eigen/Eigen/src/Core/GeneralProduct.h +20 -10
  84. data/vendor/eigen/Eigen/src/Core/GenericPacketMath.h +599 -152
  85. data/vendor/eigen/Eigen/src/Core/GlobalFunctions.h +40 -33
  86. data/vendor/eigen/Eigen/src/Core/IO.h +40 -7
  87. data/vendor/eigen/Eigen/src/Core/IndexedView.h +237 -0
  88. data/vendor/eigen/Eigen/src/Core/Inverse.h +9 -10
  89. data/vendor/eigen/Eigen/src/Core/Map.h +7 -7
  90. data/vendor/eigen/Eigen/src/Core/MapBase.h +10 -3
  91. data/vendor/eigen/Eigen/src/Core/MathFunctions.h +767 -125
  92. data/vendor/eigen/Eigen/src/Core/MathFunctionsImpl.h +118 -19
  93. data/vendor/eigen/Eigen/src/Core/Matrix.h +131 -25
  94. data/vendor/eigen/Eigen/src/Core/MatrixBase.h +21 -3
  95. data/vendor/eigen/Eigen/src/Core/NestByValue.h +25 -50
  96. data/vendor/eigen/Eigen/src/Core/NoAlias.h +4 -3
  97. data/vendor/eigen/Eigen/src/Core/NumTraits.h +107 -20
  98. data/vendor/eigen/Eigen/src/Core/PartialReduxEvaluator.h +232 -0
  99. data/vendor/eigen/Eigen/src/Core/PermutationMatrix.h +3 -31
  100. data/vendor/eigen/Eigen/src/Core/PlainObjectBase.h +152 -59
  101. data/vendor/eigen/Eigen/src/Core/Product.h +30 -25
  102. data/vendor/eigen/Eigen/src/Core/ProductEvaluators.h +192 -125
  103. data/vendor/eigen/Eigen/src/Core/Random.h +37 -1
  104. data/vendor/eigen/Eigen/src/Core/Redux.h +180 -170
  105. data/vendor/eigen/Eigen/src/Core/Ref.h +121 -23
  106. data/vendor/eigen/Eigen/src/Core/Replicate.h +8 -8
  107. data/vendor/eigen/Eigen/src/Core/Reshaped.h +454 -0
  108. data/vendor/eigen/Eigen/src/Core/ReturnByValue.h +7 -5
  109. data/vendor/eigen/Eigen/src/Core/Reverse.h +18 -12
  110. data/vendor/eigen/Eigen/src/Core/Select.h +8 -6
  111. data/vendor/eigen/Eigen/src/Core/SelfAdjointView.h +33 -20
  112. data/vendor/eigen/Eigen/src/Core/Solve.h +14 -14
  113. data/vendor/eigen/Eigen/src/Core/SolveTriangular.h +16 -16
  114. data/vendor/eigen/Eigen/src/Core/SolverBase.h +41 -3
  115. data/vendor/eigen/Eigen/src/Core/StableNorm.h +100 -70
  116. data/vendor/eigen/Eigen/src/Core/StlIterators.h +463 -0
  117. data/vendor/eigen/Eigen/src/Core/Stride.h +9 -4
  118. data/vendor/eigen/Eigen/src/Core/Swap.h +5 -4
  119. data/vendor/eigen/Eigen/src/Core/Transpose.h +88 -27
  120. data/vendor/eigen/Eigen/src/Core/Transpositions.h +26 -47
  121. data/vendor/eigen/Eigen/src/Core/TriangularMatrix.h +93 -75
  122. data/vendor/eigen/Eigen/src/Core/VectorBlock.h +5 -5
  123. data/vendor/eigen/Eigen/src/Core/VectorwiseOp.h +159 -70
  124. data/vendor/eigen/Eigen/src/Core/Visitor.h +137 -29
  125. data/vendor/eigen/Eigen/src/Core/arch/AVX/Complex.h +50 -129
  126. data/vendor/eigen/Eigen/src/Core/arch/AVX/MathFunctions.h +126 -337
  127. data/vendor/eigen/Eigen/src/Core/arch/AVX/PacketMath.h +1092 -155
  128. data/vendor/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h +65 -1
  129. data/vendor/eigen/Eigen/src/Core/arch/AVX512/Complex.h +422 -0
  130. data/vendor/eigen/Eigen/src/Core/arch/AVX512/MathFunctions.h +207 -236
  131. data/vendor/eigen/Eigen/src/Core/arch/AVX512/PacketMath.h +1482 -495
  132. data/vendor/eigen/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
  133. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/Complex.h +152 -165
  134. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h +19 -251
  135. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2937 -0
  136. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +221 -0
  137. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +629 -0
  138. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h +2042 -392
  139. data/vendor/eigen/Eigen/src/Core/arch/CUDA/Complex.h +235 -80
  140. data/vendor/eigen/Eigen/src/Core/arch/Default/BFloat16.h +700 -0
  141. data/vendor/eigen/Eigen/src/Core/arch/Default/ConjHelper.h +102 -14
  142. data/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1649 -0
  143. data/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +110 -0
  144. data/vendor/eigen/Eigen/src/Core/arch/Default/Half.h +942 -0
  145. data/vendor/eigen/Eigen/src/Core/arch/Default/Settings.h +1 -1
  146. data/vendor/eigen/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
  147. data/vendor/eigen/Eigen/src/Core/arch/{CUDA → GPU}/MathFunctions.h +16 -4
  148. data/vendor/eigen/Eigen/src/Core/arch/GPU/PacketMath.h +1685 -0
  149. data/vendor/eigen/Eigen/src/Core/arch/GPU/TypeCasting.h +80 -0
  150. data/vendor/eigen/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
  151. data/vendor/eigen/Eigen/src/Core/arch/MSA/Complex.h +648 -0
  152. data/vendor/eigen/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
  153. data/vendor/eigen/Eigen/src/Core/arch/MSA/PacketMath.h +1233 -0
  154. data/vendor/eigen/Eigen/src/Core/arch/NEON/Complex.h +313 -219
  155. data/vendor/eigen/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
  156. data/vendor/eigen/Eigen/src/Core/arch/NEON/MathFunctions.h +54 -70
  157. data/vendor/eigen/Eigen/src/Core/arch/NEON/PacketMath.h +4376 -549
  158. data/vendor/eigen/Eigen/src/Core/arch/NEON/TypeCasting.h +1419 -0
  159. data/vendor/eigen/Eigen/src/Core/arch/SSE/Complex.h +59 -179
  160. data/vendor/eigen/Eigen/src/Core/arch/SSE/MathFunctions.h +65 -428
  161. data/vendor/eigen/Eigen/src/Core/arch/SSE/PacketMath.h +893 -283
  162. data/vendor/eigen/Eigen/src/Core/arch/SSE/TypeCasting.h +65 -0
  163. data/vendor/eigen/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
  164. data/vendor/eigen/Eigen/src/Core/arch/SVE/PacketMath.h +752 -0
  165. data/vendor/eigen/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
  166. data/vendor/eigen/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
  167. data/vendor/eigen/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
  168. data/vendor/eigen/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
  169. data/vendor/eigen/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
  170. data/vendor/eigen/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
  171. data/vendor/eigen/Eigen/src/Core/arch/ZVector/Complex.h +212 -183
  172. data/vendor/eigen/Eigen/src/Core/arch/ZVector/MathFunctions.h +101 -5
  173. data/vendor/eigen/Eigen/src/Core/arch/ZVector/PacketMath.h +510 -395
  174. data/vendor/eigen/Eigen/src/Core/functors/AssignmentFunctors.h +11 -2
  175. data/vendor/eigen/Eigen/src/Core/functors/BinaryFunctors.h +112 -46
  176. data/vendor/eigen/Eigen/src/Core/functors/NullaryFunctors.h +31 -30
  177. data/vendor/eigen/Eigen/src/Core/functors/StlFunctors.h +32 -2
  178. data/vendor/eigen/Eigen/src/Core/functors/UnaryFunctors.h +355 -16
  179. data/vendor/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h +1075 -586
  180. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix.h +49 -24
  181. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +41 -35
  182. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +6 -6
  183. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +4 -2
  184. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixVector.h +382 -483
  185. data/vendor/eigen/Eigen/src/Core/products/Parallelizer.h +22 -5
  186. data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +53 -30
  187. data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +16 -8
  188. data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +8 -6
  189. data/vendor/eigen/Eigen/src/Core/products/SelfadjointProduct.h +4 -4
  190. data/vendor/eigen/Eigen/src/Core/products/SelfadjointRank2Update.h +5 -4
  191. data/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix.h +33 -27
  192. data/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +14 -12
  193. data/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h +36 -34
  194. data/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +8 -4
  195. data/vendor/eigen/Eigen/src/Core/products/TriangularSolverVector.h +13 -10
  196. data/vendor/eigen/Eigen/src/Core/util/BlasUtil.h +304 -119
  197. data/vendor/eigen/Eigen/src/Core/util/ConfigureVectorization.h +512 -0
  198. data/vendor/eigen/Eigen/src/Core/util/Constants.h +25 -9
  199. data/vendor/eigen/Eigen/src/Core/util/DisableStupidWarnings.h +26 -3
  200. data/vendor/eigen/Eigen/src/Core/util/ForwardDeclarations.h +29 -9
  201. data/vendor/eigen/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
  202. data/vendor/eigen/Eigen/src/Core/util/IntegralConstant.h +272 -0
  203. data/vendor/eigen/Eigen/src/Core/util/MKL_support.h +8 -1
  204. data/vendor/eigen/Eigen/src/Core/util/Macros.h +709 -246
  205. data/vendor/eigen/Eigen/src/Core/util/Memory.h +222 -52
  206. data/vendor/eigen/Eigen/src/Core/util/Meta.h +355 -77
  207. data/vendor/eigen/Eigen/src/Core/util/ReenableStupidWarnings.h +5 -1
  208. data/vendor/eigen/Eigen/src/Core/util/ReshapedHelper.h +51 -0
  209. data/vendor/eigen/Eigen/src/Core/util/StaticAssert.h +8 -5
  210. data/vendor/eigen/Eigen/src/Core/util/SymbolicIndex.h +293 -0
  211. data/vendor/eigen/Eigen/src/Core/util/XprHelper.h +65 -30
  212. data/vendor/eigen/Eigen/src/Eigenvalues/ComplexEigenSolver.h +1 -1
  213. data/vendor/eigen/Eigen/src/Eigenvalues/ComplexSchur.h +7 -4
  214. data/vendor/eigen/Eigen/src/Eigenvalues/EigenSolver.h +2 -2
  215. data/vendor/eigen/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +1 -1
  216. data/vendor/eigen/Eigen/src/Eigenvalues/HessenbergDecomposition.h +2 -2
  217. data/vendor/eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +2 -2
  218. data/vendor/eigen/Eigen/src/Eigenvalues/RealQZ.h +9 -6
  219. data/vendor/eigen/Eigen/src/Eigenvalues/RealSchur.h +21 -9
  220. data/vendor/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +77 -43
  221. data/vendor/eigen/Eigen/src/Eigenvalues/Tridiagonalization.h +20 -15
  222. data/vendor/eigen/Eigen/src/Geometry/AlignedBox.h +99 -5
  223. data/vendor/eigen/Eigen/src/Geometry/AngleAxis.h +4 -4
  224. data/vendor/eigen/Eigen/src/Geometry/EulerAngles.h +3 -3
  225. data/vendor/eigen/Eigen/src/Geometry/Homogeneous.h +15 -11
  226. data/vendor/eigen/Eigen/src/Geometry/Hyperplane.h +1 -1
  227. data/vendor/eigen/Eigen/src/Geometry/OrthoMethods.h +3 -2
  228. data/vendor/eigen/Eigen/src/Geometry/ParametrizedLine.h +39 -2
  229. data/vendor/eigen/Eigen/src/Geometry/Quaternion.h +70 -14
  230. data/vendor/eigen/Eigen/src/Geometry/Rotation2D.h +3 -3
  231. data/vendor/eigen/Eigen/src/Geometry/Scaling.h +23 -5
  232. data/vendor/eigen/Eigen/src/Geometry/Transform.h +88 -67
  233. data/vendor/eigen/Eigen/src/Geometry/Translation.h +6 -12
  234. data/vendor/eigen/Eigen/src/Geometry/Umeyama.h +1 -1
  235. data/vendor/eigen/Eigen/src/Geometry/arch/Geometry_SIMD.h +168 -0
  236. data/vendor/eigen/Eigen/src/Householder/BlockHouseholder.h +9 -2
  237. data/vendor/eigen/Eigen/src/Householder/Householder.h +8 -4
  238. data/vendor/eigen/Eigen/src/Householder/HouseholderSequence.h +123 -48
  239. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +15 -15
  240. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +7 -23
  241. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +5 -22
  242. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +41 -47
  243. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +51 -60
  244. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +70 -20
  245. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +2 -20
  246. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +11 -9
  247. data/vendor/eigen/Eigen/src/Jacobi/Jacobi.h +31 -10
  248. data/vendor/eigen/Eigen/src/KLUSupport/KLUSupport.h +358 -0
  249. data/vendor/eigen/Eigen/src/LU/Determinant.h +35 -19
  250. data/vendor/eigen/Eigen/src/LU/FullPivLU.h +29 -43
  251. data/vendor/eigen/Eigen/src/LU/InverseImpl.h +25 -8
  252. data/vendor/eigen/Eigen/src/LU/PartialPivLU.h +71 -58
  253. data/vendor/eigen/Eigen/src/LU/arch/InverseSize4.h +351 -0
  254. data/vendor/eigen/Eigen/src/OrderingMethods/Amd.h +7 -17
  255. data/vendor/eigen/Eigen/src/OrderingMethods/Eigen_Colamd.h +297 -277
  256. data/vendor/eigen/Eigen/src/OrderingMethods/Ordering.h +6 -10
  257. data/vendor/eigen/Eigen/src/PaStiXSupport/PaStiXSupport.h +1 -1
  258. data/vendor/eigen/Eigen/src/PardisoSupport/PardisoSupport.h +9 -7
  259. data/vendor/eigen/Eigen/src/QR/ColPivHouseholderQR.h +41 -20
  260. data/vendor/eigen/Eigen/src/QR/CompleteOrthogonalDecomposition.h +100 -27
  261. data/vendor/eigen/Eigen/src/QR/FullPivHouseholderQR.h +59 -22
  262. data/vendor/eigen/Eigen/src/QR/HouseholderQR.h +48 -23
  263. data/vendor/eigen/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +25 -3
  264. data/vendor/eigen/Eigen/src/SVD/BDCSVD.h +183 -63
  265. data/vendor/eigen/Eigen/src/SVD/JacobiSVD.h +22 -14
  266. data/vendor/eigen/Eigen/src/SVD/SVDBase.h +83 -22
  267. data/vendor/eigen/Eigen/src/SVD/UpperBidiagonalization.h +3 -3
  268. data/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h +17 -9
  269. data/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +12 -37
  270. data/vendor/eigen/Eigen/src/SparseCore/AmbiVector.h +3 -2
  271. data/vendor/eigen/Eigen/src/SparseCore/CompressedStorage.h +16 -0
  272. data/vendor/eigen/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +6 -6
  273. data/vendor/eigen/Eigen/src/SparseCore/SparseAssign.h +81 -27
  274. data/vendor/eigen/Eigen/src/SparseCore/SparseBlock.h +25 -57
  275. data/vendor/eigen/Eigen/src/SparseCore/SparseCompressedBase.h +40 -11
  276. data/vendor/eigen/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +11 -15
  277. data/vendor/eigen/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +4 -2
  278. data/vendor/eigen/Eigen/src/SparseCore/SparseDenseProduct.h +30 -8
  279. data/vendor/eigen/Eigen/src/SparseCore/SparseMatrix.h +126 -11
  280. data/vendor/eigen/Eigen/src/SparseCore/SparseMatrixBase.h +5 -12
  281. data/vendor/eigen/Eigen/src/SparseCore/SparseProduct.h +13 -1
  282. data/vendor/eigen/Eigen/src/SparseCore/SparseRef.h +7 -7
  283. data/vendor/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h +5 -2
  284. data/vendor/eigen/Eigen/src/SparseCore/SparseUtil.h +8 -0
  285. data/vendor/eigen/Eigen/src/SparseCore/SparseVector.h +1 -1
  286. data/vendor/eigen/Eigen/src/SparseCore/SparseView.h +1 -0
  287. data/vendor/eigen/Eigen/src/SparseLU/SparseLU.h +162 -12
  288. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_Memory.h +1 -1
  289. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +76 -2
  290. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_column_dfs.h +2 -2
  291. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +1 -1
  292. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_panel_bmod.h +1 -1
  293. data/vendor/eigen/Eigen/src/SparseQR/SparseQR.h +19 -6
  294. data/vendor/eigen/Eigen/src/StlSupport/StdDeque.h +2 -12
  295. data/vendor/eigen/Eigen/src/StlSupport/StdList.h +2 -2
  296. data/vendor/eigen/Eigen/src/StlSupport/StdVector.h +2 -2
  297. data/vendor/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h +6 -8
  298. data/vendor/eigen/Eigen/src/UmfPackSupport/UmfPackSupport.h +175 -39
  299. data/vendor/eigen/Eigen/src/misc/lapacke.h +5 -4
  300. data/vendor/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.h +28 -2
  301. data/vendor/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.h +155 -11
  302. data/vendor/eigen/Eigen/src/plugins/BlockMethods.h +626 -242
  303. data/vendor/eigen/Eigen/src/plugins/CommonCwiseUnaryOps.h +14 -0
  304. data/vendor/eigen/Eigen/src/plugins/IndexedViewMethods.h +262 -0
  305. data/vendor/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.h +4 -4
  306. data/vendor/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.h +10 -0
  307. data/vendor/eigen/Eigen/src/plugins/ReshapedMethods.h +149 -0
  308. data/vendor/eigen/README.md +2 -0
  309. data/vendor/eigen/bench/btl/README +1 -1
  310. data/vendor/eigen/bench/tensors/README +6 -7
  311. data/vendor/eigen/ci/README.md +56 -0
  312. data/vendor/eigen/demos/mix_eigen_and_c/README +1 -1
  313. data/vendor/eigen/unsupported/Eigen/CXX11/src/Tensor/README.md +213 -158
  314. data/vendor/eigen/unsupported/README.txt +1 -1
  315. data/vendor/tomotopy/README.kr.rst +21 -0
  316. data/vendor/tomotopy/README.rst +20 -0
  317. data/vendor/tomotopy/src/Labeling/FoRelevance.cpp +2 -2
  318. data/vendor/tomotopy/src/Labeling/Phraser.hpp +1 -1
  319. data/vendor/tomotopy/src/TopicModel/CTModel.hpp +2 -1
  320. data/vendor/tomotopy/src/TopicModel/DMRModel.hpp +2 -1
  321. data/vendor/tomotopy/src/TopicModel/DTModel.hpp +1 -1
  322. data/vendor/tomotopy/src/TopicModel/GDMRModel.hpp +2 -2
  323. data/vendor/tomotopy/src/TopicModel/HDP.h +1 -0
  324. data/vendor/tomotopy/src/TopicModel/HDPModel.hpp +53 -2
  325. data/vendor/tomotopy/src/TopicModel/HLDAModel.hpp +1 -1
  326. data/vendor/tomotopy/src/TopicModel/HPAModel.hpp +1 -0
  327. data/vendor/tomotopy/src/TopicModel/LDACVB0Model.hpp +2 -2
  328. data/vendor/tomotopy/src/TopicModel/LDAModel.hpp +16 -5
  329. data/vendor/tomotopy/src/TopicModel/LLDAModel.hpp +1 -0
  330. data/vendor/tomotopy/src/TopicModel/MGLDAModel.hpp +1 -0
  331. data/vendor/tomotopy/src/TopicModel/PLDAModel.hpp +1 -0
  332. data/vendor/tomotopy/src/TopicModel/PT.h +3 -1
  333. data/vendor/tomotopy/src/TopicModel/PTModel.hpp +31 -1
  334. data/vendor/tomotopy/src/TopicModel/SLDAModel.hpp +2 -2
  335. data/vendor/tomotopy/src/TopicModel/TopicModel.hpp +7 -5
  336. data/vendor/tomotopy/src/Utils/EigenAddonOps.hpp +36 -1
  337. data/vendor/tomotopy/src/Utils/exception.h +6 -0
  338. data/vendor/tomotopy/src/Utils/sample.hpp +14 -12
  339. data/vendor/tomotopy/src/Utils/sse_gamma.h +0 -3
  340. metadata +60 -14
  341. data/vendor/eigen/Eigen/CMakeLists.txt +0 -19
  342. data/vendor/eigen/Eigen/src/Core/arch/CUDA/Half.h +0 -674
  343. data/vendor/eigen/Eigen/src/Core/arch/CUDA/PacketMath.h +0 -333
  344. data/vendor/eigen/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +0 -1124
  345. data/vendor/eigen/Eigen/src/Core/arch/CUDA/TypeCasting.h +0 -212
  346. data/vendor/eigen/Eigen/src/Geometry/arch/Geometry_SSE.h +0 -161
  347. data/vendor/eigen/Eigen/src/LU/arch/Inverse_SSE.h +0 -338
@@ -10,7 +10,7 @@
10
10
  #ifndef EIGEN_VISITOR_H
11
11
  #define EIGEN_VISITOR_H
12
12
 
13
- namespace Eigen {
13
+ namespace Eigen {
14
14
 
15
15
  namespace internal {
16
16
 
@@ -40,6 +40,14 @@ struct visitor_impl<Visitor, Derived, 1>
40
40
  }
41
41
  };
42
42
 
43
+ // This specialization enables visitors on empty matrices at compile-time
44
+ template<typename Visitor, typename Derived>
45
+ struct visitor_impl<Visitor, Derived, 0> {
46
+ EIGEN_DEVICE_FUNC
47
+ static inline void run(const Derived &/*mat*/, Visitor& /*visitor*/)
48
+ {}
49
+ };
50
+
43
51
  template<typename Visitor, typename Derived>
44
52
  struct visitor_impl<Visitor, Derived, Dynamic>
45
53
  {
@@ -62,22 +70,22 @@ class visitor_evaluator
62
70
  public:
63
71
  EIGEN_DEVICE_FUNC
64
72
  explicit visitor_evaluator(const XprType &xpr) : m_evaluator(xpr), m_xpr(xpr) {}
65
-
73
+
66
74
  typedef typename XprType::Scalar Scalar;
67
75
  typedef typename XprType::CoeffReturnType CoeffReturnType;
68
-
76
+
69
77
  enum {
70
78
  RowsAtCompileTime = XprType::RowsAtCompileTime,
71
79
  CoeffReadCost = internal::evaluator<XprType>::CoeffReadCost
72
80
  };
73
-
74
- EIGEN_DEVICE_FUNC Index rows() const { return m_xpr.rows(); }
75
- EIGEN_DEVICE_FUNC Index cols() const { return m_xpr.cols(); }
76
- EIGEN_DEVICE_FUNC Index size() const { return m_xpr.size(); }
81
+
82
+ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT { return m_xpr.rows(); }
83
+ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT { return m_xpr.cols(); }
84
+ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT { return m_xpr.size(); }
77
85
 
78
86
  EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index row, Index col) const
79
87
  { return m_evaluator.coeff(row, col); }
80
-
88
+
81
89
  protected:
82
90
  internal::evaluator<XprType> m_evaluator;
83
91
  const XprType &m_xpr;
@@ -99,6 +107,8 @@ protected:
99
107
  * \note compared to one or two \em for \em loops, visitors offer automatic
100
108
  * unrolling for small fixed size matrix.
101
109
  *
110
+ * \note if the matrix is empty, then the visitor is left unchanged.
111
+ *
102
112
  * \sa minCoeff(Index*,Index*), maxCoeff(Index*,Index*), DenseBase::redux()
103
113
  */
104
114
  template<typename Derived>
@@ -106,12 +116,15 @@ template<typename Visitor>
106
116
  EIGEN_DEVICE_FUNC
107
117
  void DenseBase<Derived>::visit(Visitor& visitor) const
108
118
  {
119
+ if(size()==0)
120
+ return;
121
+
109
122
  typedef typename internal::visitor_evaluator<Derived> ThisEvaluator;
110
123
  ThisEvaluator thisEval(derived());
111
-
124
+
112
125
  enum {
113
126
  unroll = SizeAtCompileTime != Dynamic
114
- && SizeAtCompileTime * ThisEvaluator::CoeffReadCost + (SizeAtCompileTime-1) * internal::functor_traits<Visitor>::Cost <= EIGEN_UNROLLING_LIMIT
127
+ && SizeAtCompileTime * int(ThisEvaluator::CoeffReadCost) + (SizeAtCompileTime-1) * int(internal::functor_traits<Visitor>::Cost) <= EIGEN_UNROLLING_LIMIT
115
128
  };
116
129
  return internal::visitor_impl<Visitor, ThisEvaluator, unroll ? int(SizeAtCompileTime) : Dynamic>::run(thisEval, visitor);
117
130
  }
@@ -124,6 +137,9 @@ namespace internal {
124
137
  template <typename Derived>
125
138
  struct coeff_visitor
126
139
  {
140
+ // default initialization to avoid countless invalid maybe-uninitialized warnings by gcc
141
+ EIGEN_DEVICE_FUNC
142
+ coeff_visitor() : row(-1), col(-1), res(0) {}
127
143
  typedef typename Derived::Scalar Scalar;
128
144
  Index row, col;
129
145
  Scalar res;
@@ -141,7 +157,7 @@ struct coeff_visitor
141
157
  *
142
158
  * \sa DenseBase::minCoeff(Index*, Index*)
143
159
  */
144
- template <typename Derived>
160
+ template <typename Derived, int NaNPropagation>
145
161
  struct min_coeff_visitor : coeff_visitor<Derived>
146
162
  {
147
163
  typedef typename Derived::Scalar Scalar;
@@ -157,8 +173,40 @@ struct min_coeff_visitor : coeff_visitor<Derived>
157
173
  }
158
174
  };
159
175
 
160
- template<typename Scalar>
161
- struct functor_traits<min_coeff_visitor<Scalar> > {
176
+ template <typename Derived>
177
+ struct min_coeff_visitor<Derived, PropagateNumbers> : coeff_visitor<Derived>
178
+ {
179
+ typedef typename Derived::Scalar Scalar;
180
+ EIGEN_DEVICE_FUNC
181
+ void operator() (const Scalar& value, Index i, Index j)
182
+ {
183
+ if((numext::isnan)(this->res) || (!(numext::isnan)(value) && value < this->res))
184
+ {
185
+ this->res = value;
186
+ this->row = i;
187
+ this->col = j;
188
+ }
189
+ }
190
+ };
191
+
192
+ template <typename Derived>
193
+ struct min_coeff_visitor<Derived, PropagateNaN> : coeff_visitor<Derived>
194
+ {
195
+ typedef typename Derived::Scalar Scalar;
196
+ EIGEN_DEVICE_FUNC
197
+ void operator() (const Scalar& value, Index i, Index j)
198
+ {
199
+ if((numext::isnan)(value) || value < this->res)
200
+ {
201
+ this->res = value;
202
+ this->row = i;
203
+ this->col = j;
204
+ }
205
+ }
206
+ };
207
+
208
+ template<typename Scalar, int NaNPropagation>
209
+ struct functor_traits<min_coeff_visitor<Scalar, NaNPropagation> > {
162
210
  enum {
163
211
  Cost = NumTraits<Scalar>::AddCost
164
212
  };
@@ -169,10 +217,10 @@ struct functor_traits<min_coeff_visitor<Scalar> > {
169
217
  *
170
218
  * \sa DenseBase::maxCoeff(Index*, Index*)
171
219
  */
172
- template <typename Derived>
220
+ template <typename Derived, int NaNPropagation>
173
221
  struct max_coeff_visitor : coeff_visitor<Derived>
174
222
  {
175
- typedef typename Derived::Scalar Scalar;
223
+ typedef typename Derived::Scalar Scalar;
176
224
  EIGEN_DEVICE_FUNC
177
225
  void operator() (const Scalar& value, Index i, Index j)
178
226
  {
@@ -185,8 +233,40 @@ struct max_coeff_visitor : coeff_visitor<Derived>
185
233
  }
186
234
  };
187
235
 
188
- template<typename Scalar>
189
- struct functor_traits<max_coeff_visitor<Scalar> > {
236
+ template <typename Derived>
237
+ struct max_coeff_visitor<Derived, PropagateNumbers> : coeff_visitor<Derived>
238
+ {
239
+ typedef typename Derived::Scalar Scalar;
240
+ EIGEN_DEVICE_FUNC
241
+ void operator() (const Scalar& value, Index i, Index j)
242
+ {
243
+ if((numext::isnan)(this->res) || (!(numext::isnan)(value) && value > this->res))
244
+ {
245
+ this->res = value;
246
+ this->row = i;
247
+ this->col = j;
248
+ }
249
+ }
250
+ };
251
+
252
+ template <typename Derived>
253
+ struct max_coeff_visitor<Derived, PropagateNaN> : coeff_visitor<Derived>
254
+ {
255
+ typedef typename Derived::Scalar Scalar;
256
+ EIGEN_DEVICE_FUNC
257
+ void operator() (const Scalar& value, Index i, Index j)
258
+ {
259
+ if((numext::isnan)(value) || value > this->res)
260
+ {
261
+ this->res = value;
262
+ this->row = i;
263
+ this->col = j;
264
+ }
265
+ }
266
+ };
267
+
268
+ template<typename Scalar, int NaNPropagation>
269
+ struct functor_traits<max_coeff_visitor<Scalar, NaNPropagation> > {
190
270
  enum {
191
271
  Cost = NumTraits<Scalar>::AddCost
192
272
  };
@@ -196,17 +276,24 @@ struct functor_traits<max_coeff_visitor<Scalar> > {
196
276
 
197
277
  /** \fn DenseBase<Derived>::minCoeff(IndexType* rowId, IndexType* colId) const
198
278
  * \returns the minimum of all coefficients of *this and puts in *row and *col its location.
199
- * \warning the result is undefined if \c *this contains NaN.
279
+ *
280
+ * In case \c *this contains NaN, NaNPropagation determines the behavior:
281
+ * NaNPropagation == PropagateFast : undefined
282
+ * NaNPropagation == PropagateNaN : result is NaN
283
+ * NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN
284
+ * \warning the matrix must be not empty, otherwise an assertion is triggered.
200
285
  *
201
286
  * \sa DenseBase::minCoeff(Index*), DenseBase::maxCoeff(Index*,Index*), DenseBase::visit(), DenseBase::minCoeff()
202
287
  */
203
288
  template<typename Derived>
204
- template<typename IndexType>
289
+ template<int NaNPropagation, typename IndexType>
205
290
  EIGEN_DEVICE_FUNC
206
291
  typename internal::traits<Derived>::Scalar
207
292
  DenseBase<Derived>::minCoeff(IndexType* rowId, IndexType* colId) const
208
293
  {
209
- internal::min_coeff_visitor<Derived> minVisitor;
294
+ eigen_assert(this->rows()>0 && this->cols()>0 && "you are using an empty matrix");
295
+
296
+ internal::min_coeff_visitor<Derived, NaNPropagation> minVisitor;
210
297
  this->visit(minVisitor);
211
298
  *rowId = minVisitor.row;
212
299
  if (colId) *colId = minVisitor.col;
@@ -214,18 +301,25 @@ DenseBase<Derived>::minCoeff(IndexType* rowId, IndexType* colId) const
214
301
  }
215
302
 
216
303
  /** \returns the minimum of all coefficients of *this and puts in *index its location.
217
- * \warning the result is undefined if \c *this contains NaN.
304
+ *
305
+ * In case \c *this contains NaN, NaNPropagation determines the behavior:
306
+ * NaNPropagation == PropagateFast : undefined
307
+ * NaNPropagation == PropagateNaN : result is NaN
308
+ * NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN
309
+ * \warning the matrix must be not empty, otherwise an assertion is triggered.
218
310
  *
219
311
  * \sa DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::maxCoeff(IndexType*,IndexType*), DenseBase::visit(), DenseBase::minCoeff()
220
312
  */
221
313
  template<typename Derived>
222
- template<typename IndexType>
314
+ template<int NaNPropagation, typename IndexType>
223
315
  EIGEN_DEVICE_FUNC
224
316
  typename internal::traits<Derived>::Scalar
225
317
  DenseBase<Derived>::minCoeff(IndexType* index) const
226
318
  {
319
+ eigen_assert(this->rows()>0 && this->cols()>0 && "you are using an empty matrix");
320
+
227
321
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
228
- internal::min_coeff_visitor<Derived> minVisitor;
322
+ internal::min_coeff_visitor<Derived, NaNPropagation> minVisitor;
229
323
  this->visit(minVisitor);
230
324
  *index = IndexType((RowsAtCompileTime==1) ? minVisitor.col : minVisitor.row);
231
325
  return minVisitor.res;
@@ -233,17 +327,24 @@ DenseBase<Derived>::minCoeff(IndexType* index) const
233
327
 
234
328
  /** \fn DenseBase<Derived>::maxCoeff(IndexType* rowId, IndexType* colId) const
235
329
  * \returns the maximum of all coefficients of *this and puts in *row and *col its location.
236
- * \warning the result is undefined if \c *this contains NaN.
330
+ *
331
+ * In case \c *this contains NaN, NaNPropagation determines the behavior:
332
+ * NaNPropagation == PropagateFast : undefined
333
+ * NaNPropagation == PropagateNaN : result is NaN
334
+ * NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN
335
+ * \warning the matrix must be not empty, otherwise an assertion is triggered.
237
336
  *
238
337
  * \sa DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::visit(), DenseBase::maxCoeff()
239
338
  */
240
339
  template<typename Derived>
241
- template<typename IndexType>
340
+ template<int NaNPropagation, typename IndexType>
242
341
  EIGEN_DEVICE_FUNC
243
342
  typename internal::traits<Derived>::Scalar
244
343
  DenseBase<Derived>::maxCoeff(IndexType* rowPtr, IndexType* colPtr) const
245
344
  {
246
- internal::max_coeff_visitor<Derived> maxVisitor;
345
+ eigen_assert(this->rows()>0 && this->cols()>0 && "you are using an empty matrix");
346
+
347
+ internal::max_coeff_visitor<Derived, NaNPropagation> maxVisitor;
247
348
  this->visit(maxVisitor);
248
349
  *rowPtr = maxVisitor.row;
249
350
  if (colPtr) *colPtr = maxVisitor.col;
@@ -251,18 +352,25 @@ DenseBase<Derived>::maxCoeff(IndexType* rowPtr, IndexType* colPtr) const
251
352
  }
252
353
 
253
354
  /** \returns the maximum of all coefficients of *this and puts in *index its location.
254
- * \warning the result is undefined if \c *this contains NaN.
355
+ *
356
+ * In case \c *this contains NaN, NaNPropagation determines the behavior:
357
+ * NaNPropagation == PropagateFast : undefined
358
+ * NaNPropagation == PropagateNaN : result is NaN
359
+ * NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN
360
+ * \warning the matrix must be not empty, otherwise an assertion is triggered.
255
361
  *
256
362
  * \sa DenseBase::maxCoeff(IndexType*,IndexType*), DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::visitor(), DenseBase::maxCoeff()
257
363
  */
258
364
  template<typename Derived>
259
- template<typename IndexType>
365
+ template<int NaNPropagation, typename IndexType>
260
366
  EIGEN_DEVICE_FUNC
261
367
  typename internal::traits<Derived>::Scalar
262
368
  DenseBase<Derived>::maxCoeff(IndexType* index) const
263
369
  {
370
+ eigen_assert(this->rows()>0 && this->cols()>0 && "you are using an empty matrix");
371
+
264
372
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
265
- internal::max_coeff_visitor<Derived> maxVisitor;
373
+ internal::max_coeff_visitor<Derived, NaNPropagation> maxVisitor;
266
374
  this->visit(maxVisitor);
267
375
  *index = (RowsAtCompileTime==1) ? maxVisitor.col : maxVisitor.row;
268
376
  return maxVisitor.res;
@@ -22,6 +22,7 @@ struct Packet4cf
22
22
  __m256 v;
23
23
  };
24
24
 
25
+ #ifndef EIGEN_VECTORIZE_AVX512
25
26
  template<> struct packet_traits<std::complex<float> > : default_packet_traits
26
27
  {
27
28
  typedef Packet4cf type;
@@ -37,6 +38,7 @@ template<> struct packet_traits<std::complex<float> > : default_packet_traits
37
38
  HasMul = 1,
38
39
  HasDiv = 1,
39
40
  HasNegate = 1,
41
+ HasSqrt = 1,
40
42
  HasAbs = 0,
41
43
  HasAbs2 = 0,
42
44
  HasMin = 0,
@@ -44,8 +46,20 @@ template<> struct packet_traits<std::complex<float> > : default_packet_traits
44
46
  HasSetLinear = 0
45
47
  };
46
48
  };
49
+ #endif
47
50
 
48
- template<> struct unpacket_traits<Packet4cf> { typedef std::complex<float> type; enum {size=4, alignment=Aligned32}; typedef Packet2cf half; };
51
+ template<> struct unpacket_traits<Packet4cf> {
52
+ typedef std::complex<float> type;
53
+ typedef Packet2cf half;
54
+ typedef Packet8f as_real;
55
+ enum {
56
+ size=4,
57
+ alignment=Aligned32,
58
+ vectorizable=true,
59
+ masked_load_available=false,
60
+ masked_store_available=false
61
+ };
62
+ };
49
63
 
50
64
  template<> EIGEN_STRONG_INLINE Packet4cf padd<Packet4cf>(const Packet4cf& a, const Packet4cf& b) { return Packet4cf(_mm256_add_ps(a.v,b.v)); }
51
65
  template<> EIGEN_STRONG_INLINE Packet4cf psub<Packet4cf>(const Packet4cf& a, const Packet4cf& b) { return Packet4cf(_mm256_sub_ps(a.v,b.v)); }
@@ -67,10 +81,17 @@ template<> EIGEN_STRONG_INLINE Packet4cf pmul<Packet4cf>(const Packet4cf& a, con
67
81
  return Packet4cf(result);
68
82
  }
69
83
 
84
+ template <>
85
+ EIGEN_STRONG_INLINE Packet4cf pcmp_eq(const Packet4cf& a, const Packet4cf& b) {
86
+ __m256 eq = _mm256_cmp_ps(a.v, b.v, _CMP_EQ_OQ);
87
+ return Packet4cf(_mm256_and_ps(eq, _mm256_permute_ps(eq, 0xb1)));
88
+ }
89
+
90
+ template<> EIGEN_STRONG_INLINE Packet4cf ptrue<Packet4cf>(const Packet4cf& a) { return Packet4cf(ptrue(Packet8f(a.v))); }
70
91
  template<> EIGEN_STRONG_INLINE Packet4cf pand <Packet4cf>(const Packet4cf& a, const Packet4cf& b) { return Packet4cf(_mm256_and_ps(a.v,b.v)); }
71
92
  template<> EIGEN_STRONG_INLINE Packet4cf por <Packet4cf>(const Packet4cf& a, const Packet4cf& b) { return Packet4cf(_mm256_or_ps(a.v,b.v)); }
72
93
  template<> EIGEN_STRONG_INLINE Packet4cf pxor <Packet4cf>(const Packet4cf& a, const Packet4cf& b) { return Packet4cf(_mm256_xor_ps(a.v,b.v)); }
73
- template<> EIGEN_STRONG_INLINE Packet4cf pandnot<Packet4cf>(const Packet4cf& a, const Packet4cf& b) { return Packet4cf(_mm256_andnot_ps(a.v,b.v)); }
94
+ template<> EIGEN_STRONG_INLINE Packet4cf pandnot<Packet4cf>(const Packet4cf& a, const Packet4cf& b) { return Packet4cf(_mm256_andnot_ps(b.v,a.v)); }
74
95
 
75
96
  template<> EIGEN_STRONG_INLINE Packet4cf pload <Packet4cf>(const std::complex<float>* from) { EIGEN_DEBUG_ALIGNED_LOAD return Packet4cf(pload<Packet8f>(&numext::real_ref(*from))); }
76
97
  template<> EIGEN_STRONG_INLINE Packet4cf ploadu<Packet4cf>(const std::complex<float>* from) { EIGEN_DEBUG_UNALIGNED_LOAD return Packet4cf(ploadu<Packet8f>(&numext::real_ref(*from))); }
@@ -140,70 +161,12 @@ template<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet4cf>(const Packe
140
161
  Packet2cf(_mm256_extractf128_ps(a.v,1))));
141
162
  }
142
163
 
143
- template<> EIGEN_STRONG_INLINE Packet4cf preduxp<Packet4cf>(const Packet4cf* vecs)
144
- {
145
- Packet8f t0 = _mm256_shuffle_ps(vecs[0].v, vecs[0].v, _MM_SHUFFLE(3, 1, 2 ,0));
146
- Packet8f t1 = _mm256_shuffle_ps(vecs[1].v, vecs[1].v, _MM_SHUFFLE(3, 1, 2 ,0));
147
- t0 = _mm256_hadd_ps(t0,t1);
148
- Packet8f t2 = _mm256_shuffle_ps(vecs[2].v, vecs[2].v, _MM_SHUFFLE(3, 1, 2 ,0));
149
- Packet8f t3 = _mm256_shuffle_ps(vecs[3].v, vecs[3].v, _MM_SHUFFLE(3, 1, 2 ,0));
150
- t2 = _mm256_hadd_ps(t2,t3);
151
-
152
- t1 = _mm256_permute2f128_ps(t0,t2, 0 + (2<<4));
153
- t3 = _mm256_permute2f128_ps(t0,t2, 1 + (3<<4));
154
-
155
- return Packet4cf(_mm256_add_ps(t1,t3));
156
- }
157
-
158
164
  template<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet4cf>(const Packet4cf& a)
159
165
  {
160
166
  return predux_mul(pmul(Packet2cf(_mm256_extractf128_ps(a.v, 0)),
161
167
  Packet2cf(_mm256_extractf128_ps(a.v, 1))));
162
168
  }
163
169
 
164
- template<int Offset>
165
- struct palign_impl<Offset,Packet4cf>
166
- {
167
- static EIGEN_STRONG_INLINE void run(Packet4cf& first, const Packet4cf& second)
168
- {
169
- if (Offset==0) return;
170
- palign_impl<Offset*2,Packet8f>::run(first.v, second.v);
171
- }
172
- };
173
-
174
- template<> struct conj_helper<Packet4cf, Packet4cf, false,true>
175
- {
176
- EIGEN_STRONG_INLINE Packet4cf pmadd(const Packet4cf& x, const Packet4cf& y, const Packet4cf& c) const
177
- { return padd(pmul(x,y),c); }
178
-
179
- EIGEN_STRONG_INLINE Packet4cf pmul(const Packet4cf& a, const Packet4cf& b) const
180
- {
181
- return internal::pmul(a, pconj(b));
182
- }
183
- };
184
-
185
- template<> struct conj_helper<Packet4cf, Packet4cf, true,false>
186
- {
187
- EIGEN_STRONG_INLINE Packet4cf pmadd(const Packet4cf& x, const Packet4cf& y, const Packet4cf& c) const
188
- { return padd(pmul(x,y),c); }
189
-
190
- EIGEN_STRONG_INLINE Packet4cf pmul(const Packet4cf& a, const Packet4cf& b) const
191
- {
192
- return internal::pmul(pconj(a), b);
193
- }
194
- };
195
-
196
- template<> struct conj_helper<Packet4cf, Packet4cf, true,true>
197
- {
198
- EIGEN_STRONG_INLINE Packet4cf pmadd(const Packet4cf& x, const Packet4cf& y, const Packet4cf& c) const
199
- { return padd(pmul(x,y),c); }
200
-
201
- EIGEN_STRONG_INLINE Packet4cf pmul(const Packet4cf& a, const Packet4cf& b) const
202
- {
203
- return pconj(internal::pmul(a, b));
204
- }
205
- };
206
-
207
170
  EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet4cf,Packet8f)
208
171
 
209
172
  template<> EIGEN_STRONG_INLINE Packet4cf pdiv<Packet4cf>(const Packet4cf& a, const Packet4cf& b)
@@ -228,6 +191,7 @@ struct Packet2cd
228
191
  __m256d v;
229
192
  };
230
193
 
194
+ #ifndef EIGEN_VECTORIZE_AVX512
231
195
  template<> struct packet_traits<std::complex<double> > : default_packet_traits
232
196
  {
233
197
  typedef Packet2cd type;
@@ -243,6 +207,7 @@ template<> struct packet_traits<std::complex<double> > : default_packet_traits
243
207
  HasMul = 1,
244
208
  HasDiv = 1,
245
209
  HasNegate = 1,
210
+ HasSqrt = 1,
246
211
  HasAbs = 0,
247
212
  HasAbs2 = 0,
248
213
  HasMin = 0,
@@ -250,8 +215,20 @@ template<> struct packet_traits<std::complex<double> > : default_packet_traits
250
215
  HasSetLinear = 0
251
216
  };
252
217
  };
218
+ #endif
253
219
 
254
- template<> struct unpacket_traits<Packet2cd> { typedef std::complex<double> type; enum {size=2, alignment=Aligned32}; typedef Packet1cd half; };
220
+ template<> struct unpacket_traits<Packet2cd> {
221
+ typedef std::complex<double> type;
222
+ typedef Packet1cd half;
223
+ typedef Packet4d as_real;
224
+ enum {
225
+ size=2,
226
+ alignment=Aligned32,
227
+ vectorizable=true,
228
+ masked_load_available=false,
229
+ masked_store_available=false
230
+ };
231
+ };
255
232
 
256
233
  template<> EIGEN_STRONG_INLINE Packet2cd padd<Packet2cd>(const Packet2cd& a, const Packet2cd& b) { return Packet2cd(_mm256_add_pd(a.v,b.v)); }
257
234
  template<> EIGEN_STRONG_INLINE Packet2cd psub<Packet2cd>(const Packet2cd& a, const Packet2cd& b) { return Packet2cd(_mm256_sub_pd(a.v,b.v)); }
@@ -272,10 +249,17 @@ template<> EIGEN_STRONG_INLINE Packet2cd pmul<Packet2cd>(const Packet2cd& a, con
272
249
  return Packet2cd(_mm256_addsub_pd(even, odd));
273
250
  }
274
251
 
252
+ template <>
253
+ EIGEN_STRONG_INLINE Packet2cd pcmp_eq(const Packet2cd& a, const Packet2cd& b) {
254
+ __m256d eq = _mm256_cmp_pd(a.v, b.v, _CMP_EQ_OQ);
255
+ return Packet2cd(pand(eq, _mm256_permute_pd(eq, 0x5)));
256
+ }
257
+
258
+ template<> EIGEN_STRONG_INLINE Packet2cd ptrue<Packet2cd>(const Packet2cd& a) { return Packet2cd(ptrue(Packet4d(a.v))); }
275
259
  template<> EIGEN_STRONG_INLINE Packet2cd pand <Packet2cd>(const Packet2cd& a, const Packet2cd& b) { return Packet2cd(_mm256_and_pd(a.v,b.v)); }
276
260
  template<> EIGEN_STRONG_INLINE Packet2cd por <Packet2cd>(const Packet2cd& a, const Packet2cd& b) { return Packet2cd(_mm256_or_pd(a.v,b.v)); }
277
261
  template<> EIGEN_STRONG_INLINE Packet2cd pxor <Packet2cd>(const Packet2cd& a, const Packet2cd& b) { return Packet2cd(_mm256_xor_pd(a.v,b.v)); }
278
- template<> EIGEN_STRONG_INLINE Packet2cd pandnot<Packet2cd>(const Packet2cd& a, const Packet2cd& b) { return Packet2cd(_mm256_andnot_pd(a.v,b.v)); }
262
+ template<> EIGEN_STRONG_INLINE Packet2cd pandnot<Packet2cd>(const Packet2cd& a, const Packet2cd& b) { return Packet2cd(_mm256_andnot_pd(b.v,a.v)); }
279
263
 
280
264
  template<> EIGEN_STRONG_INLINE Packet2cd pload <Packet2cd>(const std::complex<double>* from)
281
265
  { EIGEN_DEBUG_ALIGNED_LOAD return Packet2cd(pload<Packet4d>((const double*)from)); }
@@ -327,63 +311,12 @@ template<> EIGEN_STRONG_INLINE std::complex<double> predux<Packet2cd>(const Pack
327
311
  Packet1cd(_mm256_extractf128_pd(a.v,1))));
328
312
  }
329
313
 
330
- template<> EIGEN_STRONG_INLINE Packet2cd preduxp<Packet2cd>(const Packet2cd* vecs)
331
- {
332
- Packet4d t0 = _mm256_permute2f128_pd(vecs[0].v,vecs[1].v, 0 + (2<<4));
333
- Packet4d t1 = _mm256_permute2f128_pd(vecs[0].v,vecs[1].v, 1 + (3<<4));
334
-
335
- return Packet2cd(_mm256_add_pd(t0,t1));
336
- }
337
-
338
314
  template<> EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet2cd>(const Packet2cd& a)
339
315
  {
340
316
  return predux(pmul(Packet1cd(_mm256_extractf128_pd(a.v,0)),
341
317
  Packet1cd(_mm256_extractf128_pd(a.v,1))));
342
318
  }
343
319
 
344
- template<int Offset>
345
- struct palign_impl<Offset,Packet2cd>
346
- {
347
- static EIGEN_STRONG_INLINE void run(Packet2cd& first, const Packet2cd& second)
348
- {
349
- if (Offset==0) return;
350
- palign_impl<Offset*2,Packet4d>::run(first.v, second.v);
351
- }
352
- };
353
-
354
- template<> struct conj_helper<Packet2cd, Packet2cd, false,true>
355
- {
356
- EIGEN_STRONG_INLINE Packet2cd pmadd(const Packet2cd& x, const Packet2cd& y, const Packet2cd& c) const
357
- { return padd(pmul(x,y),c); }
358
-
359
- EIGEN_STRONG_INLINE Packet2cd pmul(const Packet2cd& a, const Packet2cd& b) const
360
- {
361
- return internal::pmul(a, pconj(b));
362
- }
363
- };
364
-
365
- template<> struct conj_helper<Packet2cd, Packet2cd, true,false>
366
- {
367
- EIGEN_STRONG_INLINE Packet2cd pmadd(const Packet2cd& x, const Packet2cd& y, const Packet2cd& c) const
368
- { return padd(pmul(x,y),c); }
369
-
370
- EIGEN_STRONG_INLINE Packet2cd pmul(const Packet2cd& a, const Packet2cd& b) const
371
- {
372
- return internal::pmul(pconj(a), b);
373
- }
374
- };
375
-
376
- template<> struct conj_helper<Packet2cd, Packet2cd, true,true>
377
- {
378
- EIGEN_STRONG_INLINE Packet2cd pmadd(const Packet2cd& x, const Packet2cd& y, const Packet2cd& c) const
379
- { return padd(pmul(x,y),c); }
380
-
381
- EIGEN_STRONG_INLINE Packet2cd pmul(const Packet2cd& a, const Packet2cd& b) const
382
- {
383
- return pconj(internal::pmul(a, b));
384
- }
385
- };
386
-
387
320
  EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet2cd,Packet4d)
388
321
 
389
322
  template<> EIGEN_STRONG_INLINE Packet2cd pdiv<Packet2cd>(const Packet2cd& a, const Packet2cd& b)
@@ -424,24 +357,12 @@ ptranspose(PacketBlock<Packet2cd,2>& kernel) {
424
357
  kernel.packet[0].v = tmp;
425
358
  }
426
359
 
427
- template<> EIGEN_STRONG_INLINE Packet4cf pinsertfirst(const Packet4cf& a, std::complex<float> b)
428
- {
429
- return Packet4cf(_mm256_blend_ps(a.v,pset1<Packet4cf>(b).v,1|2));
430
- }
431
-
432
- template<> EIGEN_STRONG_INLINE Packet2cd pinsertfirst(const Packet2cd& a, std::complex<double> b)
433
- {
434
- return Packet2cd(_mm256_blend_pd(a.v,pset1<Packet2cd>(b).v,1|2));
360
+ template<> EIGEN_STRONG_INLINE Packet2cd psqrt<Packet2cd>(const Packet2cd& a) {
361
+ return psqrt_complex<Packet2cd>(a);
435
362
  }
436
363
 
437
- template<> EIGEN_STRONG_INLINE Packet4cf pinsertlast(const Packet4cf& a, std::complex<float> b)
438
- {
439
- return Packet4cf(_mm256_blend_ps(a.v,pset1<Packet4cf>(b).v,(1<<7)|(1<<6)));
440
- }
441
-
442
- template<> EIGEN_STRONG_INLINE Packet2cd pinsertlast(const Packet2cd& a, std::complex<double> b)
443
- {
444
- return Packet2cd(_mm256_blend_pd(a.v,pset1<Packet2cd>(b).v,(1<<3)|(1<<2)));
364
+ template<> EIGEN_STRONG_INLINE Packet4cf psqrt<Packet4cf>(const Packet4cf& a) {
365
+ return psqrt_complex<Packet4cf>(a);
445
366
  }
446
367
 
447
368
  } // end namespace internal