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

Function CheckTableToTensorRowMajor

cpp/src/arrow/table_test.cc:632–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

630
631template <typename DataType>
632void CheckTableToTensorRowMajor(const std::shared_ptr<Tensor>& tensor, const int size,
633 const std::vector<int64_t> shape,
634 const std::vector<int64_t> strides) {
635 EXPECT_EQ(size, tensor->size());
636 EXPECT_EQ(TypeTraits<DataType>::type_singleton(), tensor->type());
637 EXPECT_EQ(shape, tensor->shape());
638 EXPECT_EQ(strides, tensor->strides());
639 EXPECT_TRUE(tensor->is_row_major());
640 EXPECT_FALSE(tensor->is_column_major());
641 EXPECT_TRUE(tensor->is_contiguous());
642}
643
644TEST_F(TestTable, ToTensorSupportedNaN) {
645 auto f0 = field("f0", float32());

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