Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ CanonicalAxis
Function
CanonicalAxis
dnn/src/cambricon/softmax/opr_impl.cpp:9–14 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
7
namespace {
8
9
int CanonicalAxis(const int axis, const int rank) {
10
if (axis < 0) {
11
return axis + rank;
12
}
13
return axis;
14
}
15
16
size_t SizeToAxis(const int axis, const size_t* dims) {
17
size_t size = 1;
Callers
1
init_shape
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected