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

Method Init

cpp/src/arrow/gpu/cuda_context.cc:51–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 std::string name_;
50
51 Status Init(int device_number) {
52 device_number_ = device_number;
53 CU_RETURN_NOT_OK("cuDeviceGet", cuDeviceGet(&handle_, device_number));
54 size_t total_memory = 0;
55 CU_RETURN_NOT_OK("cuDeviceTotalMem", cuDeviceTotalMem(&total_memory, handle_));
56 total_memory_ = total_memory;
57
58 char buf[200];
59 CU_RETURN_NOT_OK("cuDeviceGetName", cuDeviceGetName(buf, sizeof(buf), device_number));
60 name_.assign(buf);
61 return Status::OK();
62 }
63};
64
65const char kCudaDeviceTypeName[] = "arrow::cuda::CudaDevice";

Callers 3

GetContextMethod · 0.45
MakeDeviceMethod · 0.45
InstanceMethod · 0.45

Calls 2

assignMethod · 0.80
OKFunction · 0.50

Tested by

no test coverage detected