MCPcopy Create free account
hub / github.com/apple/ml-pointersect / sub2ind_c

Function sub2ind_c

pointersect/pr/cpp/pr.cpp:78–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78inline int64_t sub2ind_c(
79 const int64_t & x,
80 const int64_t & y,
81 const int64_t & z,
82 const int64_t & sx,
83 const int64_t & sy,
84 const int64_t & sz
85) {
86 return z + y * sz + x * (sy * sz);
87}
88
89
90// Given x y z index, change to the linear index. (matlab's sub2ind)

Callers 2

grid_ray_intersectionFunction · 0.85
grid_ray_intersection_v2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected