Lines Matching defs:trace
73 inline constexpr int trace(int v) { return v; }
74 inline constexpr float trace(float v) { return v; }
75 inline constexpr double trace(double v) { return v; }
276 // trace. this handles matrices of matrices
278 CONSTEXPR typename MATRIX::value_type PURE trace(const MATRIX& m) {
279 static_assert(MATRIX::NUM_COLS == MATRIX::NUM_ROWS, "trace only defined for square matrices");
282 result += trace(m[col][col]);
306 // Compute the trace to see if it is positive or not.
307 const T trace = mat[0][0] + mat[1][1] + mat[2][2];
309 // check the sign of the trace
310 if (LIKELY(trace > 0)) {
311 // trace is positive
312 T s = std::sqrt(trace + 1);
319 // trace is negative
435 friend inline constexpr T PURE trace(const BASE<T>& m) {
436 return matrix::trace(m);