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

Method LocatePos

tensorflow/core/kernels/unique_ali_op_util.h:122–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120 }
121
122 bool LocatePos(const int64 pos, int32* task_id) const {
123 for (int32 i = 0; i < num_parts_; ++i) {
124 if (pos >= parts_[i].Start() && pos < parts_[i].End()) {
125 *task_id = i;
126 return true;
127 }
128 }
129 return false;
130 }
131
132 private:
133 std::vector<Range> parts_;

Callers 1

ParallelComputeV1Function · 0.80

Calls 2

StartMethod · 0.45
EndMethod · 0.45

Tested by

no test coverage detected