MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Index

Function Index

tensorflow/core/common_runtime/memory_planner.h:31–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31inline size_t Index(size_t s, size_t alignment, size_t alignment_offset) {
32 if (SmallAlloc(s)) {
33 return -1;
34 }
35
36 int64_t aligned = alignment *
37 ((s + alignment - 1) / alignment);
38 return ((aligned - _32KB) >> alignment_offset) - 1;
39}
40
41inline double Timeval2Double(const timeval& tv) {
42 return tv.tv_sec * 1000 * 1000 + tv.tv_usec;

Callers 10

BigAllocateMethod · 0.70
BigAllocateStatisticMethod · 0.70
LifetimePolicyMethod · 0.70
TrackAllocateMethod · 0.70
TrackDeallocateMethod · 0.70
GPULifetimePolicyMethod · 0.70
TrackAllocateMethod · 0.70
TrackDeallocateMethod · 0.70
BigAllocateMethod · 0.70
BigAllocateStatisticMethod · 0.70

Calls 1

SmallAllocFunction · 0.85

Tested by

no test coverage detected