| 88 | } |
| 89 | |
| 90 | inline int32_t GetEndValueAtIndex(StridedSliceContext* op_context, int idx) { |
| 91 | const int dim = op_context->input->dims->data[idx]; |
| 92 | const bool pos_stride = GetTensorData<int32_t>(op_context->strides)[idx] > 0; |
| 93 | return op_context->params->end_mask & (1 << idx) |
| 94 | ? pos_stride ? dim : -1 |
| 95 | : ClampedIndex(GetTensorData<int32_t>(op_context->end)[idx], dim, |
| 96 | pos_stride); |
| 97 | } |
| 98 | |
| 99 | // Processes the indexing tensors (begin, end and strides) to resize the |
| 100 | // output tensor. This function is callable from both Prepare() and Eval() as |
no test coverage detected