| 113 | namespace { |
| 114 | |
| 115 | inline bool IsTensorStridesRowMajor(const std::shared_ptr<DataType>& type, |
| 116 | const std::vector<int64_t>& shape, |
| 117 | const std::vector<int64_t>& strides) { |
| 118 | std::vector<int64_t> c_strides; |
| 119 | const auto& fw_type = checked_cast<const FixedWidthType&>(*type); |
| 120 | if (internal::ComputeRowMajorStrides(fw_type, shape, &c_strides).ok()) { |
| 121 | return strides == c_strides; |
| 122 | } else { |
| 123 | return false; |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | inline bool IsTensorStridesColumnMajor(const std::shared_ptr<DataType>& type, |
| 128 | const std::vector<int64_t>& shape, |
no test coverage detected