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

Method SetUp

cpp/src/arrow/sparse_tensor_test.cc:875–885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

873class TestSparseCSRMatrixEquality : public TestSparseTensorBase<ValueType> {
874 public:
875 void SetUp() {
876 shape_ = {6, 4};
877 values1_ = {1, 0, 2, 0, 0, 3, 0, 4, 5, 0, 6, 0,
878 0, 11, 0, 12, 13, 0, 14, 0, 0, 15, 0, 16};
879 values2_ = {9, 0, 2, 0, 0, 3, 0, 4, 5, 0, 6, 0,
880 0, 11, 0, 12, 13, 0, 14, 0, 0, 15, 0, 16};
881 auto buffer1 = Buffer::Wrap(values1_);
882 auto buffer2 = Buffer::Wrap(values2_);
883 DCHECK_OK(NumericTensor<ValueType>::Make(buffer1, this->shape_).Value(&tensor1_));
884 DCHECK_OK(NumericTensor<ValueType>::Make(buffer2, this->shape_).Value(&tensor2_));
885 }
886
887 protected:
888 using TestSparseTensorBase<ValueType>::shape_;

Callers

nothing calls this directly

Calls 3

WrapFunction · 0.85
MakeFunction · 0.70
ValueMethod · 0.45

Tested by

no test coverage detected