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

Method At

tensorflow/lite/profiling/profile_buffer.h:118–128  ·  view source on GitHub ↗

Returns the profile event at the given index. If the index is invalid a nullptr is returned. The return event may get overwritten if more events are added to buffer.

Source from the content-addressed store, hash-verified

116 // nullptr is returned. The return event may get overwritten if more events
117 // are added to buffer.
118 const struct ProfileEvent* At(size_t index) const {
119 size_t size = Size();
120 if (index >= size) {
121 return nullptr;
122 }
123 const uint32_t max_size = event_buffer_.size();
124 uint32_t start =
125 (current_index_ > max_size) ? current_index_ % max_size : max_size;
126 index = (index + start) % max_size;
127 return &event_buffer_[index];
128 }
129
130 private:
131 bool enabled_;

Callers 3

GetProfileEventsMethod · 0.80
GetProfileEventsFunction · 0.80
TESTFunction · 0.80

Calls 2

SizeFunction · 0.50
sizeMethod · 0.45

Tested by 2

GetProfileEventsFunction · 0.64
TESTFunction · 0.64