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