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

Function IsTensorStridesColumnMajor

cpp/src/arrow/tensor.cc:155–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155bool IsTensorStridesColumnMajor(const std::shared_ptr<DataType>& type,
156 const std::vector<int64_t>& shape,
157 const std::vector<int64_t>& strides) {
158 std::vector<int64_t> f_strides;
159 const auto& fw_type = checked_cast<const FixedWidthType&>(*type);
160 if (internal::ComputeColumnMajorStrides(fw_type, shape, &f_strides).ok()) {
161 return strides == f_strides;
162 } else {
163 return false;
164 }
165}
166
167Status CheckTensorValidity(const std::shared_ptr<DataType>& type,
168 const std::shared_ptr<Buffer>& data,

Callers 2

is_column_majorMethod · 0.85

Calls 2

okMethod · 0.45

Tested by

no test coverage detected