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

Function CheckTensorRowMajor

cpp/src/arrow/record_batch_test.cc:962–972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

960
961template <typename DataType>
962void CheckTensorRowMajor(const std::shared_ptr<Tensor>& tensor, const int size,
963 const std::vector<int64_t> shape,
964 const std::vector<int64_t> strides) {
965 EXPECT_EQ(size, tensor->size());
966 EXPECT_EQ(TypeTraits<DataType>::type_singleton(), tensor->type());
967 EXPECT_EQ(shape, tensor->shape());
968 EXPECT_EQ(strides, tensor->strides());
969 EXPECT_TRUE(tensor->is_row_major());
970 EXPECT_FALSE(tensor->is_column_major());
971 EXPECT_TRUE(tensor->is_contiguous());
972}
973
974TEST_F(TestRecordBatch, ToTensorSupportedNaN) {
975 const int length = 9;

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