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

Function CheckTensor

cpp/src/arrow/record_batch_test.cc:956–965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

954
955template <typename DataType>
956void CheckTensor(const std::shared_ptr<Tensor>& tensor, const int size,
957 const std::vector<int64_t> shape, const std::vector<int64_t> f_strides) {
958 EXPECT_EQ(size, tensor->size());
959 EXPECT_EQ(TypeTraits<DataType>::type_singleton(), tensor->type());
960 EXPECT_EQ(shape, tensor->shape());
961 EXPECT_EQ(f_strides, tensor->strides());
962 EXPECT_FALSE(tensor->is_row_major());
963 EXPECT_TRUE(tensor->is_column_major());
964 EXPECT_TRUE(tensor->is_contiguous());
965}
966
967template <typename DataType>
968void CheckTensorRowMajor(const std::shared_ptr<Tensor>& tensor, const int size,

Callers

nothing calls this directly

Calls 8

stridesMethod · 0.80
is_row_majorMethod · 0.80
is_column_majorMethod · 0.80
is_contiguousMethod · 0.80
type_singletonFunction · 0.70
sizeMethod · 0.45
typeMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected