Lines Matching refs:id
34 …DeviceInternal(int id) noexcept : id_(id), devInitialized_(false), syclDevice_(chooseSYCLDevice_(i… in DeviceInternal() argument
35 int id() const { return id_; } in id() function in Petsc::device::sycl::Device::DeviceInternal
60 …_COMM_SELF, PETSC_ERR_COR, "Device %d being viewed before it was initialized or configured", id()); in view()
81 PetscCheck(initialized(), PETSC_COMM_SELF, PETSC_ERR_COR, "Device %d not initialized", id()); in getattribute()
92 static ::sycl::device chooseSYCLDevice_(int id) in chooseSYCLDevice_() argument
94 if (id == PETSC_SYCL_DEVICE_HOST) { in chooseSYCLDevice_()
97 return ::sycl::device::get_devices(::sycl::info::device_type::gpu)[id]; in chooseSYCLDevice_()
133 auto id = *defaultDeviceId; in initialize() local
144 …CIDE) ") to let PETSc decide, 0 and up for GPUs", "PetscDeviceCreate()", id, &id, nullptr, -2, std… in initialize()
152 …eck(ngpus || id < 0, comm, PETSC_ERR_USER_INPUT, "You specified a sycl gpu device with -device_sel… in initialize()
153 …<= 0 || id < ngpus, comm, PETSC_ERR_USER_INPUT, "You specified a sycl gpu device with -device_sele… in initialize()
155 …if (initType == PETSC_DEVICE_INIT_NONE) id = PETSC_SYCL_DEVICE_NONE; /* user wants to disable all … in initialize()
158 if (id == PETSC_DECIDE) { /* PETSc will choose a GPU device if any, otherwise a CPU device */ in initialize()
162 id = rank % ngpus; in initialize()
163 } else id = PETSC_SYCL_DEVICE_HOST; in initialize()
168 …if (id == -2) id = PETSC_SYCL_DEVICE_HOST; // user passed in '-device_select_sycl -2'. We transfor… in initialize()
170 defaultDevice_ = static_cast<decltype(defaultDevice_)>(id); in initialize()
171 …PetscCheck(initType != PETSC_DEVICE_INIT_EAGER || id != PETSC_SYCL_DEVICE_NONE, comm, PETSC_ERR_US… in initialize()
173 *defaultDeviceId = id; in initialize()
191 const auto id = *inid == PETSC_DECIDE ? defaultDevice_ : (int)*inid; in init_device_id_() local
195 …id < PETSC_SYCL_DEVICE_HOST) && !(id - PETSC_SYCL_DEVICE_HOST >= PETSC_DEVICE_MAX_DEVICES), PETSC_… in init_device_id_()
196 if (!devices_[id]) devices_[id] = new DeviceInternal(id); in init_device_id_()
197 …PetscCheck(id == devices_[id]->id(), PETSC_COMM_SELF, PETSC_ERR_PLIB, "Entry %d contains device wi… in init_device_id_()
198 PetscCall(devices_[id]->initialize()); in init_device_id_()
199 *inid = id; in init_device_id_()
210 PetscErrorCode Device::get_attribute_(PetscInt id, PetscDeviceAttribute attr, void *value) noexcept in get_attribute_() argument
213 PetscCall(devices_[id]->getattribute(attr, value)); in get_attribute_()