MCPcopy Create free account
hub / github.com/KnowingNothing/MatmulTutorial / _abs

Function _abs

include/common.h:72–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70
71template <class DType>
72HOST_DEVICE constexpr DType _abs(DType a) {
73 return a < DType(0) ? -a : a;
74}
75
76template <class DType>
77HOST_DEVICE constexpr DType _max(DType a, DType b) {

Callers 1

assert_allcloseFunction · 0.85

Calls 1

DTypeClass · 0.85

Tested by

no test coverage detected