Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
101
template <typename _Tp>
102
static inline _Tp* align_ptr(_Tp* ptr, int n = (int)sizeof(_Tp)) {
103
return (_Tp*)(((size_t)ptr + n - 1) & -n);
104
}
105
106
template <typename T>
107
inline T saturate(T x, T lower, T upper) {
Callers
2
start
Method · 0.70
proceed
Method · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected