| 35 | {} |
| 36 | |
| 37 | void GpuSettingsDialog::processIntern() |
| 38 | { |
| 39 | auto gpuSettings = _simulationFacade->getGpuSettings(); |
| 40 | auto origGpuSettings = _simulationFacade->getOriginalGpuSettings(); |
| 41 | auto lastGpuSettings = gpuSettings; |
| 42 | |
| 43 | AlienImGui::InputInt( |
| 44 | AlienImGui::InputIntParameters() |
| 45 | .name("Blocks") |
| 46 | .textWidth(RightColumnWidth) |
| 47 | .defaultValue(origGpuSettings.numBlocks) |
| 48 | .tooltip("This values specifies the number of CUDA thread blocks. If you are using a high-end graphics card, you can try to increase the number of " |
| 49 | "blocks."), |
| 50 | gpuSettings.numBlocks); |
| 51 | |
| 52 | ImGui::Dummy({0, ImGui::GetContentRegionAvail().y - scale(50.0f)}); |
| 53 | AlienImGui::Separator(); |
| 54 | |
| 55 | if (AlienImGui::Button("Adopt")) { |
| 56 | close(); |
| 57 | } |
| 58 | ImGui::SetItemDefaultFocus(); |
| 59 | |
| 60 | ImGui::SameLine(); |
| 61 | if (AlienImGui::Button("Cancel")) { |
| 62 | close(); |
| 63 | gpuSettings = _gpuSettings; |
| 64 | } |
| 65 | |
| 66 | validateAndCorrect(gpuSettings); |
| 67 | |
| 68 | if (gpuSettings != lastGpuSettings) { |
| 69 | _simulationFacade->setGpuSettings_async(gpuSettings); |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | void GpuSettingsDialog::openIntern() |
| 74 | { |
nothing calls this directly
no test coverage detected