Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Oneflow-Inc/oneflow
/ GetSizeInSlice
Function
GetSizeInSlice
oneflow/user/kernels/slice_kernel.cpp:33–36 ·
view source on GitHub ↗
[start, end)
Source
from the content-addressed store, hash-verified
31
32
// [start, end)
33
int64_t GetSizeInSlice(const int64_t start, const int64_t end, const int64_t step) {
34
if (end <= start) { return 0; }
35
return (end - start - 1) / step + 1;
36
}
37
38
class SliceContext final {
39
public:
Callers
1
FOR_RANGE
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected