| 90 | } |
| 91 | |
| 92 | int FindDimIndex(const NVCVTensorLayout &layout, char dimLabel) |
| 93 | { |
| 94 | if (const void *p = memchr(layout.data, dimLabel, layout.rank)) |
| 95 | { |
| 96 | return std::distance(reinterpret_cast<const std::byte *>(layout.data), reinterpret_cast<const std::byte *>(p)); |
| 97 | } |
| 98 | else |
| 99 | { |
| 100 | return -1; |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | bool IsChannelLast(const NVCVTensorLayout &layout) |
| 105 | { |