MCPcopy Create free account
hub / github.com/VectorDB-NTU/RaBitQ-Library / normalize

Method normalize

include/rabitqlib/third/Eigen/src/Core/Dot.h:145–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143 */
144template<typename Derived>
145EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void MatrixBase<Derived>::normalize()
146{
147 RealScalar z = squaredNorm();
148 // NOTE: after extensive benchmarking, this conditional does not impact performance, at least on recent x86 CPU
149 if(z>RealScalar(0))
150 derived() /= numext::sqrt(z);
151}
152
153/** \returns an expression of the quotient of \c *this by its own norm while avoiding underflow and overflow.
154 *

Callers 5

runMethod · 0.45
doComputeEigenvectorsMethod · 0.45
eigenvectorsMethod · 0.45
computeSingVecsMethod · 0.45

Calls 1

sqrtFunction · 0.70

Tested by

no test coverage detected