Lines Matching refs:gpu_num
46 std::optional<DrmDevice> create_drm_device(int fd, int32_t gpu_num)
48 if (fd < 0 || gpu_num < 0) {
60 ret.gpu_num = gpu_num;
75 for (int32_t gpu_num = 0; gpu_num < num_devices; gpu_num++) {
76 drmDevicePtr device = devices[gpu_num];
81 if (auto drm_device = create_drm_device(fd, gpu_num)) {
91 std::optional<DrmDevice> DrmDevice::create(int32_t gpu_num)
95 if (gpu_num < 0) {
102 if (num_devices > 0 && gpu_num < num_devices) {
103 drmDevicePtr device = devices[gpu_num];
105 ret = create_drm_device(fd, gpu_num);
114 , gpu_num {other.gpu_num}
118 other.gpu_num = -1;
124 std::swap(gpu_num, other.gpu_num);