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

Method SetUp

cpp/src/arrow/sparse_tensor_test.cc:419–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417class TestSparseCOOTensorEquality : public TestSparseTensorBase<ValueType> {
418 public:
419 void SetUp() {
420 shape_ = {2, 3, 4};
421 values1_ = {1, 0, 2, 0, 0, 3, 0, 4, 5, 0, 6, 0,
422 0, 11, 0, 12, 13, 0, 14, 0, 0, 15, 0, 16};
423 values2_ = {1, 0, 2, 0, 0, 3, 0, 4, 5, 0, 6, 0,
424 0, 0, 0, 12, 13, 0, 14, 0, 0, 15, 0, 16};
425 auto buffer1 = Buffer::Wrap(values1_);
426 auto buffer2 = Buffer::Wrap(values2_);
427 DCHECK_OK(NumericTensor<ValueType>::Make(buffer1, this->shape_).Value(&tensor1_));
428 DCHECK_OK(NumericTensor<ValueType>::Make(buffer2, this->shape_).Value(&tensor2_));
429 }
430
431 protected:
432 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