File indexing completed on 2026-04-10 07:49:32
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include <cuda_runtime.h>
0014
0015 #include "SSim.hh"
0016 #include "OPTICKS_LOG.hh"
0017 #include "SEvt.hh"
0018 #include "CSGFoundry.h"
0019 #include "CSGOptiX.h"
0020 #include "QSim.hh"
0021
0022 int main(int argc, char** argv)
0023 {
0024 OPTICKS_LOG(argc, argv);
0025
0026 SEvt* evt = SEvt::Create(SEvt::EGPU) ;
0027 assert(evt);
0028
0029 const SSim* ssim = SSim::Load() ;
0030
0031 CSGFoundry* fdl = CSGFoundry::Load("$CFBASE_LOCAL", "CSGFoundry") ;
0032
0033 fdl->setOverrideSim(ssim);
0034
0035 CSGOptiX* cx = CSGOptiX::Create(fdl);
0036
0037 QSim* qs = cx->sim ;
0038
0039 SEvt::AddCarrierGenstep();
0040
0041 int eventID = 0 ;
0042 bool end = true ;
0043
0044 qs->simulate(eventID, end);
0045
0046 cudaDeviceSynchronize();
0047
0048 evt->save();
0049
0050 return 0 ;
0051 }