Changeset 1315 for trunk/source/geometry/volumes
- Timestamp:
- Jun 18, 2010, 11:42:07 AM (15 years ago)
- Location:
- trunk/source/geometry/volumes
- Files:
-
- 5 edited
-
History (modified) (2 diffs)
-
include/G4NavigationHistory.hh (modified) (3 diffs)
-
include/G4ReflectionFactory.hh (modified) (2 diffs)
-
src/G4NavigationHistory.cc (modified) (3 diffs)
-
src/G4ReflectionFactory.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/geometry/volumes/History
r1228 r1315 1 $Id: History,v 1.1 63 2009/11/06 11:35:03gcosmo Exp $1 $Id: History,v 1.170 2010/04/23 10:27:49 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 Apr 23rd, 2010 G.Cosmo - geomvol-V09-03-06 21 - Corrected initialisation of dummy copy-ctor in G4EnhancedVecAllocator, 22 fixing compilation problem on WIN32-VC. 23 24 Apr 22nd, 2010 G.Cosmo - geomvol-V09-03-05 25 - Make use of specialized allocator for handling internal vector in 26 G4NavigatorHistory, globally controlling the memory pool. 27 Measured ~2% average run-time speed-up. 28 29 Apr 15th, 2010 G.Cosmo - geomvol-V09-03-04 30 - Combine use of G4Allocator for vectors in G4NavigationHistory with use 31 of assign(). 32 33 Apr 13th, 2010 G.Cosmo - geomvol-V09-03-03 34 - Added Reset() method to G4ReflectionFactory for clearing maps of 35 constituent and reflected volumes. 36 37 Apr 9th, 2010 G.Cosmo - geomvol-V09-03-02 38 - Use more elegant solution in G4NavigationHistory copy-ctor. Adopt assign(). 39 40 Mar 31th, 2010 G.Cosmo - geomvol-V09-03-01 41 - Restore original vector allocation, but adopt simple loop copy within 42 copy-constructor. Should provide slight performance improvement and keep 43 locality. 44 45 Dec 11th, 2009 G.Cosmo - geomvol-V09-03-00 46 - Use G4Allocator for vectors in G4NavigationHistory, to optimise memory 47 management and reduce fragmentation. 19 48 20 49 Nov 6th, 2009 G.Cosmo - geomvol-V09-02-04 -
trunk/source/geometry/volumes/include/G4NavigationHistory.hh
r1228 r1315 25 25 // 26 26 // 27 // $Id: G4NavigationHistory.hh,v 1.1 4 2009/11/03 09:15:51gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-0 3$27 // $Id: G4NavigationHistory.hh,v 1.18 2010/04/22 09:06:50 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // class G4NavigationHistory … … 47 47 #include "geomdefs.hh" 48 48 49 //#include "G4Allocator.hh"50 49 #include "G4AffineTransform.hh" 51 50 #include "G4VPhysicalVolume.hh" 52 51 #include "G4NavigationLevel.hh" 52 #include "G4EnhancedVecAllocator.hh" 53 53 54 54 #include <vector> … … 142 142 private: 143 143 144 std::vector<G4NavigationLevel> fNavHistory; 145 //std::vector<G4NavigationLevel, G4Allocator<G4NavigationLevel> > fNavHistory; 144 std::vector<G4NavigationLevel, 145 G4EnhancedVecAllocator<G4NavigationLevel> > fNavHistory; 146 // The geometrical tree; uses specialized allocator to optimize 147 // memory handling and reduce possible fragmentation 146 148 147 149 G4int fStackDepth; -
trunk/source/geometry/volumes/include/G4ReflectionFactory.hh
r1228 r1315 25 25 // 26 26 // 27 // $Id: G4ReflectionFactory.hh,v 1. 4 2008/11/13 09:33:20gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-0 3$27 // $Id: G4ReflectionFactory.hh,v 1.5 2010/04/13 07:19:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // … … 181 181 // been reflected, after that placement or replication is performed. 182 182 183 void Reset(); 184 // Resets maps of constituent and reflected volumes. 185 // To be used exclusively when volumes are removed from the stores. 186 183 187 protected: 184 188 -
trunk/source/geometry/volumes/src/G4NavigationHistory.cc
r1228 r1315 25 25 // 26 26 // 27 // $Id: G4NavigationHistory.cc,v 1.1 1 2009/08/03 16:27:37gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-0 3$27 // $Id: G4NavigationHistory.cc,v 1.15 2010/04/22 09:06:50 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // … … 38 38 #include "G4ios.hh" 39 39 40 // Initialise static data for the specialized memory pool 41 // for the internal STL vector of histories ... 42 // 43 G4ChunkIndexType* G4AllocStats::allocStat = 0; 44 G4int G4AllocStats::totSpace = 0; 45 G4int G4AllocStats::numCat = 0; 46 40 47 G4NavigationHistory::G4NavigationHistory() 41 48 : fNavHistory(kHistoryMax), fStackDepth(0) … … 45 52 46 53 G4NavigationHistory::G4NavigationHistory(const G4NavigationHistory &h) 47 : f NavHistory(h.fNavHistory), fStackDepth(h.fStackDepth)54 : fStackDepth(h.fStackDepth) 48 55 { 56 fNavHistory.assign(h.fNavHistory.begin(),h.fNavHistory.end()); 49 57 } 50 58 -
trunk/source/geometry/volumes/src/G4ReflectionFactory.cc
r1228 r1315 25 25 // 26 26 // 27 // $Id: G4ReflectionFactory.cc,v 1. 9 2008/11/13 09:33:20gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-0 3$27 // $Id: G4ReflectionFactory.cc,v 1.10 2010/04/13 07:19:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // … … 761 761 //_____________________________________________________________________________ 762 762 763 void 764 G4ReflectionFactory::Reset() 765 { 766 fConstituentLVMap.~map(); 767 fReflectedLVMap.~map(); 768 } 769 770 //_____________________________________________________________________________ 771 763 772 void G4ReflectionFactory::PrintConstituentLVMap() 764 773 {
Note:
See TracChangeset
for help on using the changeset viewer.
