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

Method strides

cpp/src/arrow/c/dlpack.cc:315–320  ·  view source on GitHub ↗

Strides or empty span for old DLPack row-major convention.

Source from the content-addressed store, hash-verified

313
314 /// Strides or empty span for old DLPack row-major convention.
315 std::span<const int64_t> strides() const {
316 if (auto strides = tensor().strides; strides != nullptr) {
317 return {strides, static_cast<std::size_t>(ndim())};
318 }
319 return {};
320 }
321
322 bool flag_is_set(uint8_t bits) const { return (ptr_->flags & bits) == bits; }
323

Callers 15

ComputeNumElementsMethod · 0.95
test_stridesMethod · 0.45
test_nil_permutationMethod · 0.45
test_stridesMethod · 0.45
TensorToNdarrayFunction · 0.45
TESTFunction · 0.45
MakeMethod · 0.45

Calls 1

ndimFunction · 0.50

Tested by 15

test_stridesMethod · 0.36
test_nil_permutationMethod · 0.36
test_stridesMethod · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36
CheckTableToTensorFunction · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36
CheckTensorFunction · 0.36
CheckTensorRowMajorFunction · 0.36
TYPED_TESTFunction · 0.36