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

Method is_above

tensorflow/core/kernels/topk_op_gpu.h:120–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118 const Data<T> data;
119
120 __device__ bool is_above(int left, int right) {
121 T left_value = data.get_value(left);
122 T right_value = data.get_value(right);
123 if (left_value == right_value) {
124 if (preferIndices == PreferIndices::kLower) {
125 return data.get_index(left) < data.get_index(right);
126 } else {
127 return data.get_index(left) > data.get_index(right);
128 }
129 }
130 if (heapType == HeapType::kMinHeap) {
131 return left_value < right_value;
132 } else {
133 return left_value > right_value;
134 }
135 }
136
137 __device__ void assign(int i, const Entry& entry) { data[i] = entry; }
138

Callers

nothing calls this directly

Calls 2

get_valueMethod · 0.45
get_indexMethod · 0.45

Tested by

no test coverage detected