| 418 | } |
| 419 | |
| 420 | int StridedSliceDescriptor::GetStopForAxis(const TensorShape& inputShape, |
| 421 | unsigned int axis, |
| 422 | int startForAxis) const |
| 423 | { |
| 424 | |
| 425 | if (m_ShrinkAxisMask & (1 << axis)) |
| 426 | { |
| 427 | return startForAxis + 1; |
| 428 | } |
| 429 | |
| 430 | int stop = m_End[axis]; |
| 431 | |
| 432 | if (m_EndMask & (1 << axis)) |
| 433 | { |
| 434 | if (m_Stride[axis] > 0) |
| 435 | { |
| 436 | stop = std::numeric_limits<int>::max(); |
| 437 | } |
| 438 | else |
| 439 | { |
| 440 | stop = std::numeric_limits<int>::min(); |
| 441 | } |
| 442 | } |
| 443 | |
| 444 | const int axisSize = armnn::numeric_cast<int>(inputShape[axis]); |
| 445 | if (stop < 0) |
| 446 | { |
| 447 | stop += axisSize; |
| 448 | } |
| 449 | |
| 450 | return m_Stride[axis] > 0 ? std::max(0, std::min(stop, axisSize)) : |
| 451 | std::max(-1, std::min(stop, axisSize - 1)); |
| 452 | |
| 453 | } |
| 454 | |
| 455 | uint32_t GetNumInputs(bool biasEnabled) |
| 456 | { |
no outgoing calls
no test coverage detected