MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / trace

Method trace

Src/Base/AMReX_SmallMatrix.H:321–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319 //! Returns the trace of a square matrix
320 [[nodiscard]] AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
321 T trace () const requires (NRows==NCols)
322 {
323 T t = 0;
324 constexpr_for<StartIndex,NRows+StartIndex>([&] (int i) { t += (*this)(i,i); });
325 return t;
326 }
327
328 //! Operator += performing matrix addition as in (*this) += rhs
329 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected