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

Function CheckTensor

cpp/src/arrow/record_batch_test.cc:950–959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

948
949template <typename DataType>
950void CheckTensor(const std::shared_ptr<Tensor>& tensor, const int size,
951 const std::vector<int64_t> shape, const std::vector<int64_t> f_strides) {
952 EXPECT_EQ(size, tensor->size());
953 EXPECT_EQ(TypeTraits<DataType>::type_singleton(), tensor->type());
954 EXPECT_EQ(shape, tensor->shape());
955 EXPECT_EQ(f_strides, tensor->strides());
956 EXPECT_FALSE(tensor->is_row_major());
957 EXPECT_TRUE(tensor->is_column_major());
958 EXPECT_TRUE(tensor->is_contiguous());
959}
960
961template <typename DataType>
962void 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