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

Function align_size

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

Source from the content-addressed store, hash-verified

90using AlignedVector = std::vector<T, ah::aligned_allocator<T, 16>>;
91
92static inline size_t align_size(size_t sz, int n) {
93 megdnn_assert((n & (n - 1)) == 0);
94 return (sz + n - 1) & -n;
95}
96
97static inline int clip(int x, int a, int b) {
98 return x >= a ? (x < b ? x : b - 1) : a;

Callers 3

startMethod · 0.70
resizeGeneric_Function · 0.50
resizeGeneric_Function · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected