Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/extended/parameterisations/Par04/src/Par04InferenceMessenger.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/parameterisations/Par04/src/Par04InferenceMessenger.cc (Version 11.3.0) and /examples/extended/parameterisations/Par04/src/Par04InferenceMessenger.cc (Version 11.0)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 #ifdef USE_INFERENCE                               26 #ifdef USE_INFERENCE
 27 #  include "Par04InferenceMessenger.hh"        <<  27 #include "Par04InferenceMessenger.hh"
 28                                                <<  28 #include "Par04InferenceSetup.hh"
 29 #  include "Par04InferenceSetup.hh"  // for Pa <<  29 #include "G4UIdirectory.hh"
 30                                                <<  30 #include "G4UIcmdWithoutParameter.hh"
 31 #  include "G4UIcmdWithADoubleAndUnit.hh"  //  <<  31 #include "G4UIcmdWithAnInteger.hh"
 32 #  include "G4UIcmdWithAString.hh"  // for G4U <<  32 #include "G4UIcmdWithADoubleAndUnit.hh"
 33 #  include "G4UIcmdWithAnInteger.hh"  // for G <<  33 #include "G4UIcmdWithAString.hh"
 34 #  include "G4UIdirectory.hh"  // for G4UIdire << 
 35                                                << 
 36 #  include <CLHEP/Units/SystemOfUnits.h>  // f << 
 37 #  include <G4ApplicationState.hh>  // for G4S << 
 38 #  include <G4ThreeVector.hh>  // for G4ThreeV << 
 39 #  include <G4UImessenger.hh>  // for G4UImess << 
 40 #  include <string>  // for stoi               << 
 41 class G4UIcommand;                             << 
 42                                                    34 
 43 //....oooOO0OOooo........oooOO0OOooo........oo     35 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 44                                                    36 
 45 Par04InferenceMessenger::Par04InferenceMesseng     37 Par04InferenceMessenger::Par04InferenceMessenger(Par04InferenceSetup* aInference)
 46   : G4UImessenger(), fInference(aInference)    <<  38   : G4UImessenger()
                                                   >>  39   , fInference(aInference)
 47 {                                                  40 {
 48   fExampleDir = new G4UIdirectory("/Par04/");      41   fExampleDir = new G4UIdirectory("/Par04/");
 49   fExampleDir->SetGuidance("UI commands specif     42   fExampleDir->SetGuidance("UI commands specific to this example");
 50                                                    43 
 51   fInferenceDir = new G4UIdirectory("/Par04/in     44   fInferenceDir = new G4UIdirectory("/Par04/inference/");
 52   fInferenceDir->SetGuidance("Inference constr     45   fInferenceDir->SetGuidance("Inference construction UI commands");
 53                                                    46 
 54   fInferenceLibraryCmd = new G4UIcmdWithAStrin     47   fInferenceLibraryCmd = new G4UIcmdWithAString("/Par04/inference/setInferenceLibrary", this);
 55   fInferenceLibraryCmd->SetGuidance("Inference     48   fInferenceLibraryCmd->SetGuidance("Inference library.");
 56   fInferenceLibraryCmd->SetParameterName("Infe     49   fInferenceLibraryCmd->SetParameterName("InferenceLibrary", false);
 57   fInferenceLibraryCmd->AvailableForStates(G4S     50   fInferenceLibraryCmd->AvailableForStates(G4State_Idle);
 58   fInferenceLibraryCmd->SetToBeBroadcasted(tru     51   fInferenceLibraryCmd->SetToBeBroadcasted(true);
 59                                                    52 
 60   fSizeLatentVectorCmd = new G4UIcmdWithAnInte     53   fSizeLatentVectorCmd = new G4UIcmdWithAnInteger("/Par04/inference/setSizeLatentVector", this);
 61   fSizeLatentVectorCmd->SetGuidance("Set size      54   fSizeLatentVectorCmd->SetGuidance("Set size of the latent space vector.");
 62   fSizeLatentVectorCmd->SetParameterName("Size     55   fSizeLatentVectorCmd->SetParameterName("SizeLatentVector", false);
 63   fSizeLatentVectorCmd->SetRange("SizeLatentVe     56   fSizeLatentVectorCmd->SetRange("SizeLatentVector>0");
 64   fSizeLatentVectorCmd->AvailableForStates(G4S     57   fSizeLatentVectorCmd->AvailableForStates(G4State_Idle);
 65   fSizeLatentVectorCmd->SetToBeBroadcasted(tru     58   fSizeLatentVectorCmd->SetToBeBroadcasted(true);
 66                                                    59 
 67   fSizeConditionVectorCmd =                        60   fSizeConditionVectorCmd =
 68     new G4UIcmdWithAnInteger("/Par04/inference     61     new G4UIcmdWithAnInteger("/Par04/inference/setSizeConditionVector", this);
 69   fSizeConditionVectorCmd->SetGuidance("Set si     62   fSizeConditionVectorCmd->SetGuidance("Set size of the condition vector.");
 70   fSizeConditionVectorCmd->SetParameterName("S     63   fSizeConditionVectorCmd->SetParameterName("SizeConditionVector", false);
 71   fSizeConditionVectorCmd->SetRange("SizeCondi     64   fSizeConditionVectorCmd->SetRange("SizeConditionVector>0");
 72   fSizeConditionVectorCmd->AvailableForStates(     65   fSizeConditionVectorCmd->AvailableForStates(G4State_Idle);
 73   fSizeConditionVectorCmd->SetToBeBroadcasted(     66   fSizeConditionVectorCmd->SetToBeBroadcasted(true);
 74                                                    67 
 75   fModelPathNameCmd = new G4UIcmdWithAString("     68   fModelPathNameCmd = new G4UIcmdWithAString("/Par04/inference/setModelPathName", this);
 76   fModelPathNameCmd->SetGuidance("Model path a     69   fModelPathNameCmd->SetGuidance("Model path and name.");
 77   fModelPathNameCmd->SetParameterName("Name",      70   fModelPathNameCmd->SetParameterName("Name", false);
 78   fModelPathNameCmd->AvailableForStates(G4Stat     71   fModelPathNameCmd->AvailableForStates(G4State_Idle);
 79   fModelPathNameCmd->SetToBeBroadcasted(true);     72   fModelPathNameCmd->SetToBeBroadcasted(true);
 80                                                    73 
 81   fProfileFlagCmd = new G4UIcmdWithAnInteger("     74   fProfileFlagCmd = new G4UIcmdWithAnInteger("/Par04/inference/setProfileFlag", this);
 82   fProfileFlagCmd->SetGuidance("Flag to save a     75   fProfileFlagCmd->SetGuidance("Flag to save a json file for model execution profiling.");
 83   fProfileFlagCmd->SetParameterName("ProfileFl     76   fProfileFlagCmd->SetParameterName("ProfileFlag", false);
 84   fProfileFlagCmd->SetRange("ProfileFlag>-1");     77   fProfileFlagCmd->SetRange("ProfileFlag>-1");
 85   fProfileFlagCmd->AvailableForStates(G4State_     78   fProfileFlagCmd->AvailableForStates(G4State_Idle);
 86   fProfileFlagCmd->SetToBeBroadcasted(true);       79   fProfileFlagCmd->SetToBeBroadcasted(true);
 87                                                    80 
 88   fOptimizationFlagCmd = new G4UIcmdWithAnInte     81   fOptimizationFlagCmd = new G4UIcmdWithAnInteger("/Par04/inference/setOptimizationFlag", this);
 89   fOptimizationFlagCmd->SetGuidance("Set optim     82   fOptimizationFlagCmd->SetGuidance("Set optimization flag");
 90   fOptimizationFlagCmd->SetParameterName("Opti     83   fOptimizationFlagCmd->SetParameterName("OptimizationFlag", false);
 91   fOptimizationFlagCmd->SetRange("Optimization     84   fOptimizationFlagCmd->SetRange("OptimizationFlag>-1");
 92   fOptimizationFlagCmd->AvailableForStates(G4S     85   fOptimizationFlagCmd->AvailableForStates(G4State_Idle);
 93   fOptimizationFlagCmd->SetToBeBroadcasted(tru     86   fOptimizationFlagCmd->SetToBeBroadcasted(true);
 94                                                    87 
 95   fMeshNbRhoCellsCmd = new G4UIcmdWithAnIntege     88   fMeshNbRhoCellsCmd = new G4UIcmdWithAnInteger("/Par04/inference/setNbOfRhoCells", this);
 96   fMeshNbRhoCellsCmd->SetGuidance("Set number      89   fMeshNbRhoCellsCmd->SetGuidance("Set number of rho cells in the cylindrical mesh readout.");
 97   fMeshNbRhoCellsCmd->SetParameterName("NbRhoC     90   fMeshNbRhoCellsCmd->SetParameterName("NbRhoCells", false);
 98   fMeshNbRhoCellsCmd->SetRange("NbRhoCells>0")     91   fMeshNbRhoCellsCmd->SetRange("NbRhoCells>0");
 99   fMeshNbRhoCellsCmd->AvailableForStates(G4Sta     92   fMeshNbRhoCellsCmd->AvailableForStates(G4State_Idle);
100   fMeshNbRhoCellsCmd->SetToBeBroadcasted(true)     93   fMeshNbRhoCellsCmd->SetToBeBroadcasted(true);
101                                                    94 
102   fMeshNbPhiCellsCmd = new G4UIcmdWithAnIntege     95   fMeshNbPhiCellsCmd = new G4UIcmdWithAnInteger("/Par04/inference/setNbOfPhiCells", this);
103   fMeshNbPhiCellsCmd->SetGuidance("Set number      96   fMeshNbPhiCellsCmd->SetGuidance("Set number of phi cells in the cylindrical mesh readout.");
104   fMeshNbPhiCellsCmd->SetParameterName("NbPhiC     97   fMeshNbPhiCellsCmd->SetParameterName("NbPhiCells", false);
105   fMeshNbPhiCellsCmd->SetRange("NbPhiCells>0")     98   fMeshNbPhiCellsCmd->SetRange("NbPhiCells>0");
106   fMeshNbPhiCellsCmd->AvailableForStates(G4Sta     99   fMeshNbPhiCellsCmd->AvailableForStates(G4State_Idle);
107   fMeshNbPhiCellsCmd->SetToBeBroadcasted(true)    100   fMeshNbPhiCellsCmd->SetToBeBroadcasted(true);
108                                                   101 
109   fMeshNbZCellsCmd = new G4UIcmdWithAnInteger(    102   fMeshNbZCellsCmd = new G4UIcmdWithAnInteger("/Par04/inference/setNbOfZCells", this);
110   fMeshNbZCellsCmd->SetGuidance("Set number of    103   fMeshNbZCellsCmd->SetGuidance("Set number of z cells in the cylindrical mesh readout.");
111   fMeshNbZCellsCmd->SetParameterName("NbZCells    104   fMeshNbZCellsCmd->SetParameterName("NbZCells", false);
112   fMeshNbZCellsCmd->SetRange("NbZCells>0");       105   fMeshNbZCellsCmd->SetRange("NbZCells>0");
113   fMeshNbZCellsCmd->AvailableForStates(G4State    106   fMeshNbZCellsCmd->AvailableForStates(G4State_Idle);
114   fMeshNbZCellsCmd->SetToBeBroadcasted(true);     107   fMeshNbZCellsCmd->SetToBeBroadcasted(true);
115                                                   108 
116   fMeshSizeRhoCellsCmd = new G4UIcmdWithADoubl    109   fMeshSizeRhoCellsCmd = new G4UIcmdWithADoubleAndUnit("/Par04/inference/setSizeOfRhoCells", this);
117   fMeshSizeRhoCellsCmd->SetGuidance("Set size     110   fMeshSizeRhoCellsCmd->SetGuidance("Set size of rho cells in the cylindrical readout mesh");
118   fMeshSizeRhoCellsCmd->SetParameterName("Size    111   fMeshSizeRhoCellsCmd->SetParameterName("Size", false);
119   fMeshSizeRhoCellsCmd->SetRange("Size>0.");      112   fMeshSizeRhoCellsCmd->SetRange("Size>0.");
120   fMeshSizeRhoCellsCmd->SetUnitCategory("Lengt    113   fMeshSizeRhoCellsCmd->SetUnitCategory("Length");
121   fMeshSizeRhoCellsCmd->AvailableForStates(G4S    114   fMeshSizeRhoCellsCmd->AvailableForStates(G4State_Idle);
122   fMeshSizeRhoCellsCmd->SetToBeBroadcasted(tru    115   fMeshSizeRhoCellsCmd->SetToBeBroadcasted(true);
123                                                   116 
124   fMeshSizeZCellsCmd = new G4UIcmdWithADoubleA    117   fMeshSizeZCellsCmd = new G4UIcmdWithADoubleAndUnit("/Par04/inference/setSizeOfZCells", this);
125   fMeshSizeZCellsCmd->SetGuidance("Set size of    118   fMeshSizeZCellsCmd->SetGuidance("Set size of z cells in the cylindrical readout mesh");
126   fMeshSizeZCellsCmd->SetParameterName("Size",    119   fMeshSizeZCellsCmd->SetParameterName("Size", false);
127   fMeshSizeZCellsCmd->SetRange("Size>0.");        120   fMeshSizeZCellsCmd->SetRange("Size>0.");
128   fMeshSizeZCellsCmd->SetUnitCategory("Length"    121   fMeshSizeZCellsCmd->SetUnitCategory("Length");
129   fMeshSizeZCellsCmd->AvailableForStates(G4Sta    122   fMeshSizeZCellsCmd->AvailableForStates(G4State_Idle);
130   fMeshSizeZCellsCmd->SetToBeBroadcasted(true)    123   fMeshSizeZCellsCmd->SetToBeBroadcasted(true);
131                                                << 
132   // Onnx Runtime Execution Provider flag comm << 
133   fCudaFlagCmd = new G4UIcmdWithAnInteger("/Pa << 
134   G4cout << "f CudaFlagCmd " << fCudaFlagCmd < << 
135   fCudaFlagCmd->SetGuidance("Whether to use CU << 
136   fCudaFlagCmd->SetParameterName("CudaFlag", f << 
137   fCudaFlagCmd->SetRange("CudaFlag>-1");       << 
138   fCudaFlagCmd->AvailableForStates(G4State_Idl << 
139   fCudaFlagCmd->SetToBeBroadcasted(true);      << 
140                                                << 
141   /// OnnxRuntime Execution Provider Options   << 
142   /// Cuda                                     << 
143   fCudaOptionsDir = new G4UIdirectory("/Par04/ << 
144   fCudaOptionsDir->SetGuidance("Commands for s << 
145                                                << 
146   fCudaDeviceIdCmd = new G4UIcmdWithAString("/ << 
147   fCudaDeviceIdCmd->SetGuidance("Device ID of  << 
148   fCudaDeviceIdCmd->SetParameterName("CudaDevi << 
149   fCudaDeviceIdCmd->AvailableForStates(G4State << 
150   fCudaDeviceIdCmd->SetToBeBroadcasted(true);  << 
151                                                << 
152   fCudaGpuMemLimitCmd = new G4UIcmdWithAString << 
153   fCudaGpuMemLimitCmd->SetGuidance("GPU Memory << 
154   fCudaGpuMemLimitCmd->SetParameterName("CudaG << 
155   fCudaGpuMemLimitCmd->AvailableForStates(G4St << 
156   fCudaGpuMemLimitCmd->SetToBeBroadcasted(true << 
157                                                << 
158   fCudaArenaExtendedStrategyCmd =              << 
159     new G4UIcmdWithAString("/Par04/inference/c << 
160   fCudaArenaExtendedStrategyCmd->SetGuidance(  << 
161     "Strategy for extending the device memory  << 
162   fCudaArenaExtendedStrategyCmd->SetParameterN << 
163   fCudaArenaExtendedStrategyCmd->AvailableForS << 
164   fCudaArenaExtendedStrategyCmd->SetToBeBroadc << 
165                                                << 
166   fCudaCudnnConvAlgoSearchCmd =                << 
167     new G4UIcmdWithAString("/Par04/inference/c << 
168   fCudaCudnnConvAlgoSearchCmd->SetGuidance("Se << 
169   fCudaCudnnConvAlgoSearchCmd->SetParameterNam << 
170   fCudaCudnnConvAlgoSearchCmd->AvailableForSta << 
171   fCudaCudnnConvAlgoSearchCmd->SetToBeBroadcas << 
172                                                << 
173   fCudaDoCopyInDefaultStreamCmd =              << 
174     new G4UIcmdWithAString("/Par04/inference/c << 
175   fCudaDoCopyInDefaultStreamCmd->SetGuidance(" << 
176   fCudaDoCopyInDefaultStreamCmd->SetParameterN << 
177   fCudaDoCopyInDefaultStreamCmd->AvailableForS << 
178   fCudaDoCopyInDefaultStreamCmd->SetToBeBroadc << 
179                                                << 
180   fCudaCudnnConvUseMaxWorkspaceCmd =           << 
181     new G4UIcmdWithAString("/Par04/inference/c << 
182   fCudaCudnnConvUseMaxWorkspaceCmd->SetGuidanc << 
183   fCudaCudnnConvUseMaxWorkspaceCmd->SetParamet << 
184   fCudaCudnnConvUseMaxWorkspaceCmd->AvailableF << 
185   fCudaCudnnConvUseMaxWorkspaceCmd->SetToBeBro << 
186 }                                                 124 }
187                                                   125 
188 //....oooOO0OOooo........oooOO0OOooo........oo    126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
189                                                   127 
190 Par04InferenceMessenger::~Par04InferenceMessen    128 Par04InferenceMessenger::~Par04InferenceMessenger()
191 {                                                 129 {
192   delete fInferenceLibraryCmd;                    130   delete fInferenceLibraryCmd;
193   delete fSizeLatentVectorCmd;                    131   delete fSizeLatentVectorCmd;
194   delete fSizeConditionVectorCmd;                 132   delete fSizeConditionVectorCmd;
195   delete fModelPathNameCmd;                       133   delete fModelPathNameCmd;
196   delete fProfileFlagCmd;                         134   delete fProfileFlagCmd;
197   delete fOptimizationFlagCmd;                    135   delete fOptimizationFlagCmd;
198   delete fMeshNbRhoCellsCmd;                      136   delete fMeshNbRhoCellsCmd;
199   delete fMeshNbPhiCellsCmd;                      137   delete fMeshNbPhiCellsCmd;
200   delete fMeshNbZCellsCmd;                        138   delete fMeshNbZCellsCmd;
201   delete fMeshSizeRhoCellsCmd;                    139   delete fMeshSizeRhoCellsCmd;
202   delete fMeshSizeZCellsCmd;                      140   delete fMeshSizeZCellsCmd;
203 }                                                 141 }
204                                                   142 
205 //....oooOO0OOooo........oooOO0OOooo........oo    143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
206                                                   144 
207 void Par04InferenceMessenger::SetNewValue(G4UI    145 void Par04InferenceMessenger::SetNewValue(G4UIcommand* aCommand, G4String aNewValue)
208 {                                                 146 {
209   if (aCommand == fInferenceLibraryCmd) {      << 147   if(aCommand == fInferenceLibraryCmd)
                                                   >> 148   {
210     fInference->SetInferenceLibrary(aNewValue)    149     fInference->SetInferenceLibrary(aNewValue);
211   }                                               150   }
212   if (aCommand == fSizeLatentVectorCmd) {      << 151   if(aCommand == fSizeLatentVectorCmd)
                                                   >> 152   {
213     fInference->SetSizeLatentVector(std::stoi(    153     fInference->SetSizeLatentVector(std::stoi(aNewValue));
214   }                                               154   }
215   if (aCommand == fSizeConditionVectorCmd) {   << 155   if(aCommand == fSizeConditionVectorCmd)
                                                   >> 156   {
216     fInference->SetSizeConditionVector(std::st    157     fInference->SetSizeConditionVector(std::stoi(aNewValue));
217   }                                               158   }
218   if (aCommand == fModelPathNameCmd) {         << 159   if(aCommand == fModelPathNameCmd)
                                                   >> 160   {
219     fInference->SetModelPathName(aNewValue);      161     fInference->SetModelPathName(aNewValue);
220   }                                               162   }
221   if (aCommand == fProfileFlagCmd) {           << 163   if(aCommand == fProfileFlagCmd)
                                                   >> 164   {
222     fInference->SetProfileFlag(std::stoi(aNewV    165     fInference->SetProfileFlag(std::stoi(aNewValue));
223   }                                               166   }
224   if (aCommand == fOptimizationFlagCmd) {      << 167   if(aCommand == fOptimizationFlagCmd)
                                                   >> 168   {
225     fInference->SetOptimizationFlag(std::stoi(    169     fInference->SetOptimizationFlag(std::stoi(aNewValue));
226   }                                               170   }
227   else if (aCommand == fMeshNbRhoCellsCmd) {   << 171   else if(aCommand == fMeshNbRhoCellsCmd)
                                                   >> 172   {
228     fInference->SetMeshNbOfCells(0, fMeshNbRho    173     fInference->SetMeshNbOfCells(0, fMeshNbRhoCellsCmd->GetNewIntValue(aNewValue));
229   }                                               174   }
230   else if (aCommand == fMeshNbPhiCellsCmd) {   << 175   else if(aCommand == fMeshNbPhiCellsCmd)
                                                   >> 176   {
231     fInference->SetMeshNbOfCells(1, fMeshNbPhi    177     fInference->SetMeshNbOfCells(1, fMeshNbPhiCellsCmd->GetNewIntValue(aNewValue));
232     fInference->SetMeshSizeOfCells(1,             178     fInference->SetMeshSizeOfCells(1,
233                                    2. * CLHEP:    179                                    2. * CLHEP::pi / fMeshNbPhiCellsCmd->GetNewIntValue(aNewValue));
234   }                                               180   }
235   else if (aCommand == fMeshNbZCellsCmd) {     << 181   else if(aCommand == fMeshNbZCellsCmd)
                                                   >> 182   {
236     fInference->SetMeshNbOfCells(2, fMeshNbZCe    183     fInference->SetMeshNbOfCells(2, fMeshNbZCellsCmd->GetNewIntValue(aNewValue));
237   }                                               184   }
238   else if (aCommand == fMeshSizeRhoCellsCmd) { << 185   else if(aCommand == fMeshSizeRhoCellsCmd)
                                                   >> 186   {
239     fInference->SetMeshSizeOfCells(0, fMeshSiz    187     fInference->SetMeshSizeOfCells(0, fMeshSizeRhoCellsCmd->GetNewDoubleValue(aNewValue));
240   }                                               188   }
241   else if (aCommand == fMeshSizeZCellsCmd) {   << 189   else if(aCommand == fMeshSizeZCellsCmd)
                                                   >> 190   {
242     fInference->SetMeshSizeOfCells(2, fMeshSiz    191     fInference->SetMeshSizeOfCells(2, fMeshSizeZCellsCmd->GetNewDoubleValue(aNewValue));
243   }                                               192   }
244   /// Onnx Runtime Execution Provider Flags    << 
245   /// Cuda                                     << 
246   if (aCommand == fCudaFlagCmd) {              << 
247     fInference->SetCudaFlag(std::stoi(aNewValu << 
248   }                                            << 
249   if (aCommand == fCudaDeviceIdCmd) {          << 
250     fInference->SetCudaDeviceId(aNewValue);    << 
251   }                                            << 
252   else if (aCommand == fCudaGpuMemLimitCmd) {  << 
253     fInference->SetCudaGpuMemLimit(aNewValue); << 
254   }                                            << 
255   else if (aCommand == fCudaArenaExtendedStrat << 
256     fInference->SetCudaArenaExtendedStrategy(a << 
257   }                                            << 
258   else if (aCommand == fCudaCudnnConvAlgoSearc << 
259     fInference->SetCudaCudnnConvAlgoSearch(aNe << 
260   }                                            << 
261   else if (aCommand == fCudaDoCopyInDefaultStr << 
262     fInference->SetCudaDoCopyInDefaultStream(a << 
263   }                                            << 
264   else if (aCommand == fCudaCudnnConvUseMaxWor << 
265     fInference->SetCudaCudnnConvUseMaxWorkspac << 
266   }                                            << 
267 }                                                 193 }
268                                                   194 
269 //....oooOO0OOooo........oooOO0OOooo........oo    195 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
270                                                   196 
271 G4String Par04InferenceMessenger::GetCurrentVa    197 G4String Par04InferenceMessenger::GetCurrentValue(G4UIcommand* aCommand)
272 {                                                 198 {
273   G4String cv;                                    199   G4String cv;
274                                                   200 
275   if (aCommand == fInferenceLibraryCmd) {      << 201   if(aCommand == fInferenceLibraryCmd)
                                                   >> 202   {
276     cv = fInferenceLibraryCmd->ConvertToString    203     cv = fInferenceLibraryCmd->ConvertToString(fInference->GetInferenceLibrary());
277   }                                               204   }
278   if (aCommand == fSizeLatentVectorCmd) {      << 205   if(aCommand == fSizeLatentVectorCmd)
                                                   >> 206   {
279     cv = fSizeLatentVectorCmd->ConvertToString    207     cv = fSizeLatentVectorCmd->ConvertToString(fInference->GetSizeLatentVector());
280   }                                               208   }
281   if (aCommand == fSizeConditionVectorCmd) {   << 209   if(aCommand == fSizeConditionVectorCmd)
                                                   >> 210   {
282     cv = fSizeConditionVectorCmd->ConvertToStr    211     cv = fSizeConditionVectorCmd->ConvertToString(fInference->GetSizeConditionVector());
283   }                                               212   }
284   if (aCommand == fModelPathNameCmd) {         << 213   if(aCommand == fModelPathNameCmd)
                                                   >> 214   {
285     cv = fModelPathNameCmd->ConvertToString(fI    215     cv = fModelPathNameCmd->ConvertToString(fInference->GetModelPathName());
286   }                                               216   }
287   if (aCommand == fProfileFlagCmd) {           << 217   if(aCommand == fProfileFlagCmd)
                                                   >> 218   {
288     cv = fSizeLatentVectorCmd->ConvertToString    219     cv = fSizeLatentVectorCmd->ConvertToString(fInference->GetProfileFlag());
289   }                                               220   }
290   if (aCommand == fOptimizationFlagCmd) {      << 221   if(aCommand == fOptimizationFlagCmd)
                                                   >> 222   {
291     cv = fSizeLatentVectorCmd->ConvertToString    223     cv = fSizeLatentVectorCmd->ConvertToString(fInference->GetOptimizationFlag());
292   }                                               224   }
293   else if (aCommand == fMeshNbRhoCellsCmd) {   << 225   else if(aCommand == fMeshNbRhoCellsCmd)
                                                   >> 226   {
294     cv = fMeshNbRhoCellsCmd->ConvertToString(f    227     cv = fMeshNbRhoCellsCmd->ConvertToString(fInference->GetMeshNbOfCells()[0]);
295   }                                               228   }
296   else if (aCommand == fMeshNbPhiCellsCmd) {   << 229   else if(aCommand == fMeshNbPhiCellsCmd)
                                                   >> 230   {
297     cv = fMeshNbPhiCellsCmd->ConvertToString(f    231     cv = fMeshNbPhiCellsCmd->ConvertToString(fInference->GetMeshNbOfCells()[1]);
298   }                                               232   }
299   else if (aCommand == fMeshNbZCellsCmd) {     << 233   else if(aCommand == fMeshNbZCellsCmd)
                                                   >> 234   {
300     cv = fMeshNbZCellsCmd->ConvertToString(fIn    235     cv = fMeshNbZCellsCmd->ConvertToString(fInference->GetMeshNbOfCells()[2]);
301   }                                               236   }
302   else if (aCommand == fMeshSizeRhoCellsCmd) { << 237   else if(aCommand == fMeshSizeRhoCellsCmd)
                                                   >> 238   {
303     cv = fMeshSizeRhoCellsCmd->ConvertToString    239     cv = fMeshSizeRhoCellsCmd->ConvertToString(fInference->GetMeshSizeOfCells()[0]);
304   }                                               240   }
305   else if (aCommand == fMeshSizeZCellsCmd) {   << 241   else if(aCommand == fMeshSizeZCellsCmd)
                                                   >> 242   {
306     cv = fMeshSizeZCellsCmd->ConvertToString(f    243     cv = fMeshSizeZCellsCmd->ConvertToString(fInference->GetMeshSizeOfCells()[2]);
307   }                                               244   }
308   /// Onnx Runtime Execution Provider Flags    << 
309   /// Cuda                                     << 
310   if (aCommand == fCudaDeviceIdCmd) {          << 
311     cv = fCudaDeviceIdCmd->ConvertToString(fIn << 
312   }                                            << 
313   else if (aCommand == fCudaGpuMemLimitCmd) {  << 
314     cv = fCudaGpuMemLimitCmd->ConvertToString( << 
315   }                                            << 
316   else if (aCommand == fCudaArenaExtendedStrat << 
317     cv = fCudaArenaExtendedStrategyCmd->Conver << 
318   }                                            << 
319   else if (aCommand == fCudaCudnnConvAlgoSearc << 
320     cv = fCudaCudnnConvAlgoSearchCmd->ConvertT << 
321   }                                            << 
322   else if (aCommand == fCudaDoCopyInDefaultStr << 
323     cv = fCudaDoCopyInDefaultStreamCmd->Conver << 
324   }                                            << 
325   else if (aCommand == fCudaCudnnConvUseMaxWor << 
326     cv = fCudaCudnnConvUseMaxWorkspaceCmd->Con << 
327       fInference->GetCudaCudnnConvUseMaxWorksp << 
328   }                                            << 
329                                                   245 
330   return cv;                                      246   return cv;
331 }                                                 247 }
332                                                   248 
333 #endif                                         << 249 #endif
334