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

Function align_size

dnn/src/arm_common/separable_conv/sep_conv_common.h:18–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16/////////// helper ///////////
17
18static inline size_t align_size(size_t sz, int n) {
19 megdnn_assert((n & (n - 1)) == 0);
20 return (sz + n - 1) & -n;
21}
22
23static inline int clip(int x, int a, int b) {
24 return x >= a ? (x < b ? x : b - 1) : a;

Callers 2

initMethod · 0.70
resizeGeneric_Function · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected