Changeset 1653


Ignore:
Timestamp:
10/19/06 16:45:37 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp

    r1649 r1653  
    25292529        RegisterOption("Hierarchy.Termination.maxMemory", 
    25302530                                        optFloat, 
    2531                                         "hierarchy_construction_max_memory=", 
     2531                                        "hierarchy_term_max_memory=", 
    25322532                                        "1"); 
    25332533 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp

    r1649 r1653  
    122122                "Hierarchy.Termination.maxMemory", mTermMaxMemory); 
    123123 
     124        mTermMaxMemory *= (1024.0f * 1024.0f); 
     125 
    124126        Debug << "******** Hierachy Manager Options ***********" << endl; 
    125127        Debug << "max leaves: " << mTermMaxLeaves << endl; 
     
    283285                ); 
    284286 
    285 //#if _DEBUG 
     287#if _DEBUG 
    286288        if (terminationCriteriaMet) 
    287289        { 
     
    291293                Debug << "memory: " << mHierarchyStats.mMemory << " " << mTermMaxMemory << endl; 
    292294        } 
    293 //#endif 
     295#endif 
    294296 
    295297        return terminationCriteriaMet; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp

    r1633 r1653  
    15011501                                                                const int totalPvs, 
    15021502                                                                const int entriesInPvs, 
     1503                                                                const float memoryCost, 
    15031504                                                                const int pvsSizeDecr, 
    15041505                                                                const float volume) 
    15051506{ 
    15061507         stats << "#Pass\n" << pass << endl 
    1507                 << "#ViewCells\n" << viewCells << endl  
    1508         << "#RenderCostDecrease\n" << renderCostDecrease << endl // TODO 
    1509                 << "#TotalRenderCost\n" << totalRenderCost << endl 
    1510                 << "#CurrentPvs\n" << currentPvs << endl 
    1511                 << "#ExpectedCost\n" << expectedCost << endl 
    1512                 << "#AvgRenderCost\n" << avgRenderCost << endl 
    1513                 << "#Deviation\n" << deviation << endl 
    1514                 << "#TotalPvs\n" << totalPvs << endl 
    1515                 << "#TotalEntriesInPvs\n" << entriesInPvs << endl 
    1516                 << "#PvsSizeDecrease\n" << pvsSizeDecr << endl // TODO 
    1517                 << "#Volume\n" << volume << endl 
    1518                 << endl; 
     1508                   << "#ViewCells\n" << viewCells << endl  
     1509                   << "#RenderCostDecrease\n" << renderCostDecrease << endl // TODO 
     1510                   << "#TotalRenderCost\n" << totalRenderCost << endl 
     1511                   << "#CurrentPvs\n" << currentPvs << endl 
     1512                   << "#ExpectedCost\n" << expectedCost << endl 
     1513                   << "#AvgRenderCost\n" << avgRenderCost << endl 
     1514                   << "#Deviation\n" << deviation << endl 
     1515                   << "#TotalPvs\n" << totalPvs << endl 
     1516                   << "#TotalEntriesInPvs\n" << entriesInPvs << endl 
     1517                   << "#Memory\n" << memoryCost << endl 
     1518                   << "#PvsSizeDecrease\n" << pvsSizeDecr << endl 
     1519                   << "#Volume\n" << volume << endl 
     1520                   << endl; 
    15191521} 
    15201522 
     
    15461548        stats.open(mergeStats.c_str()); 
    15471549 
     1550        const float entrySize = sizeof(PvsData) + sizeof(Intersectable *); 
     1551        const float memoryCost = (float)entriesInPvs *  entrySize / (1024.0f * 1024.0f); 
     1552 
    15481553        ///////////// 
    15491554        //-- first view cell 
    15501555 
    15511556        UpdateStats(stats, 
    1552                                 0, numViewCells, 0, totalRenderCost,  
    1553                                 rootPvs, expectedCost, avgRenderCost, deviation, 
    1554                                 totalPvs, entriesInPvs, 0, mRoot->GetVolume()); 
     1557                                0,  
     1558                                numViewCells,  
     1559                                0,  
     1560                                totalRenderCost,  
     1561                                rootPvs,  
     1562                                expectedCost,  
     1563                                avgRenderCost,  
     1564                                deviation, 
     1565                                totalPvs,  
     1566                                entriesInPvs, 
     1567                                memoryCost, 
     1568                                0,  
     1569                                mRoot->GetVolume()); 
    15551570                 
    15561571 
     
    16061621                        avgRenderCost = (float)totalPvs / (float)numViewCells; 
    16071622 
     1623                        const float entrySize = sizeof(PvsData) + sizeof(Intersectable *); 
     1624                        const float memoryCost = (float)entriesInPvs * entrySize / (1024.0f * 1024.0f); 
     1625 
    16081626                        UpdateStats(stats, 
    1609                                                 0, numViewCells, costDecr, totalRenderCost, 
    1610                                                 parentPvs, expectedCost, avgRenderCost, deviation, 
    1611                         totalPvs, entriesInPvs, childPvs - parentPvs, 
     1627                                                0,  
     1628                                                numViewCells,  
     1629                                                costDecr,  
     1630                                                totalRenderCost, 
     1631                                                parentPvs,  
     1632                                                expectedCost,  
     1633                                                avgRenderCost,  
     1634                                                deviation, 
     1635                        totalPvs,  
     1636                                                entriesInPvs,  
     1637                                                memoryCost, 
     1638                                                childPvs - parentPvs, 
    16121639                                                vc->GetVolume()); 
    1613  
    16141640                } 
    16151641        } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h

    r1603 r1653  
    629629        /** Update stats for the log. 
    630630        */ 
    631         void UpdateStats( 
    632                 ofstream &stats, 
    633                 const int pass, 
    634                 const int viewCells, 
    635                 const float renderCostDecrease, 
    636                 const float totalRenderCost, 
    637                 const int currentPvs, 
    638                 const float expectedCost, 
    639                 const float avgRenderCost, 
    640                 const float deviation, 
    641                 const int totalPvs, 
    642                 const int entriesInPvs, 
    643                 const int pvsSizeDecr, 
    644                 const float volume); 
     631        void UpdateStats(ofstream &stats, 
     632                                         const int pass, 
     633                                         const int viewCells, 
     634                                         const float renderCostDecrease, 
     635                                         const float totalRenderCost, 
     636                                         const int currentPvs, 
     637                                         const float expectedCost, 
     638                                         const float avgRenderCost, 
     639                                         const float deviation, 
     640                                         const int totalPvs, 
     641                                         const int entriesInPvs, 
     642                                         const float memoryCost, 
     643                                         const int pvsSizeDecr, 
     644                                         const float volume); 
    645645 
    646646 
Note: See TracChangeset for help on using the changeset viewer.