MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / align_ptr

Function align_ptr

dnn/src/common/cv/helper.h:102–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101template <typename _Tp>
102static inline _Tp* align_ptr(_Tp* ptr, int n = (int)sizeof(_Tp)) {
103 return (_Tp*)(((size_t)ptr + n - 1) & -n);
104}
105
106template <typename T>
107inline T saturate(T x, T lower, T upper) {

Callers 2

startMethod · 0.70
proceedMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected