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

Method SetUp

cpp/src/arrow/buffer_test.cc:220–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218class TestDevice : public ::testing::Test {
219 public:
220 void SetUp() {
221 cpu_device_ = CPUDevice::Instance();
222 my_copy_device_ = std::make_shared<MyDevice>(kMyDeviceAllowCopy);
223 my_view_device_ = std::make_shared<MyDevice>(kMyDeviceAllowView);
224 my_other_device_ = std::make_shared<MyDevice>(kMyDeviceDisallowCopyView);
225
226 cpu_mm_ = cpu_device_->default_memory_manager();
227 my_copy_mm_ = my_copy_device_->default_memory_manager();
228 my_view_mm_ = my_view_device_->default_memory_manager();
229 my_other_mm_ = my_other_device_->default_memory_manager();
230
231 cpu_src_ = Buffer::FromString("some data");
232 my_copy_src_ = std::make_shared<MyBuffer>(my_copy_mm_, cpu_src_);
233 my_view_src_ = std::make_shared<MyBuffer>(my_view_mm_, cpu_src_);
234 my_other_src_ = std::make_shared<MyBuffer>(my_other_mm_, cpu_src_);
235 }
236
237 protected:
238 std::shared_ptr<Device> cpu_device_, my_copy_device_, my_view_device_, my_other_device_;

Callers

nothing calls this directly

Calls 2

FromStringFunction · 0.85

Tested by

no test coverage detected