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

Function IsTensorStridesColumnMajor

cpp/src/arrow/tensor.cc:128–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128inline bool IsTensorStridesColumnMajor(const std::shared_ptr<DataType>& type,
129 const std::vector<int64_t>& shape,
130 const std::vector<int64_t>& strides) {
131 std::vector<int64_t> f_strides;
132 const auto& fw_type = checked_cast<const FixedWidthType&>(*type);
133 if (internal::ComputeColumnMajorStrides(fw_type, shape, &f_strides).ok()) {
134 return strides == f_strides;
135 } else {
136 return false;
137 }
138}
139
140inline Status CheckTensorValidity(const std::shared_ptr<DataType>& type,
141 const std::shared_ptr<Buffer>& data,

Callers 2

is_column_majorMethod · 0.85

Calls 2

okMethod · 0.45

Tested by

no test coverage detected