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

Function CheckTensorRowMajor

cpp/src/arrow/record_batch_test.cc:968–978  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

966
967template <typename DataType>
968void CheckTensorRowMajor(const std::shared_ptr<Tensor>& tensor, const int size,
969 const std::vector<int64_t> shape,
970 const std::vector<int64_t> strides) {
971 EXPECT_EQ(size, tensor->size());
972 EXPECT_EQ(TypeTraits<DataType>::type_singleton(), tensor->type());
973 EXPECT_EQ(shape, tensor->shape());
974 EXPECT_EQ(strides, tensor->strides());
975 EXPECT_TRUE(tensor->is_row_major());
976 EXPECT_FALSE(tensor->is_column_major());
977 EXPECT_TRUE(tensor->is_contiguous());
978}
979
980TEST_F(TestRecordBatch, ToTensorSupportedNaN) {
981 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