MCPcopy Create free account
hub / github.com/apache/arrow / IsTensorStridesRowMajor

Function IsTensorStridesRowMajor

cpp/src/arrow/tensor.cc:115–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113namespace {
114
115inline 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
127inline bool IsTensorStridesColumnMajor(const std::shared_ptr<DataType>& type,
128 const std::vector<int64_t>& shape,

Callers 2

is_row_majorMethod · 0.85

Calls 2

ComputeRowMajorStridesFunction · 0.85
okMethod · 0.45

Tested by

no test coverage detected