Ignore:
Timestamp:
03/05/07 11:07:44 (17 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r2170 r2187  
    409409 
    410410 
     411void HierarchyManager::PrintTimings(const bool lastSplitWasOsp) 
     412{ 
     413        double sortTime, evalTime, nodeTime, splitTime, subdTime; 
     414 
     415        sortTime = mBvHierarchy->mSortTimer.TotalTime(); 
     416        evalTime = mBvHierarchy->mEvalTimer.TotalTime(); 
     417        nodeTime = mBvHierarchy->mNodeTimer.TotalTime(); 
     418        splitTime = mBvHierarchy->mSplitTimer.TotalTime(); 
     419        subdTime = mBvHierarchy->mSubdivTimer.TotalTime(); 
     420 
     421        cout << "bvh times" 
     422                 << " sort : " << sortTime 
     423                 << " eval : " << evalTime 
     424                 << " node : " << nodeTime 
     425                 << " split: " << splitTime 
     426                 << " subd : " << subdTime << endl; 
     427 
     428        Debug << "bvh times" 
     429                << " sort : " << sortTime 
     430                 << " eval : " << evalTime 
     431                 << " node : " << nodeTime 
     432                 << " split: " << splitTime 
     433                 << " subd : " << subdTime << endl; 
     434 
     435        sortTime = mVspTree->mSortTimer.TotalTime(); 
     436        evalTime = mVspTree->mEvalTimer.TotalTime(); 
     437        nodeTime = mVspTree->mNodeTimer.TotalTime(); 
     438        splitTime = mVspTree->mSplitTimer.TotalTime(); 
     439        subdTime = mVspTree->mSubdivTimer.TotalTime(); 
     440 
     441        cout << "vsp times" 
     442                 << " sort : " << sortTime 
     443                 << " eval : " << evalTime 
     444                 << " node : " << nodeTime 
     445                 << " split: " << splitTime 
     446                 << " subd : " << subdTime << endl; 
     447 
     448        Debug << "vsp times" 
     449                << " sort : " << sortTime 
     450                 << " eval : " << evalTime 
     451                 << " node : " << nodeTime 
     452                 << " split: " << splitTime 
     453                 << " subd : " << subdTime << endl; 
     454        cout << endl; 
     455        Debug << endl; 
     456} 
     457 
     458 
    411459void HierarchyManager::ConstructInterleavedWithGradient(const VssRayContainer &sampleRays, 
    412460                                                                                                                const ObjectContainer &objects, 
     
    518566                //if (!lastSplitWasOsp) 
    519567                { 
     568                        ///////////////// 
     569                        // subdivide object space with respect to the objects 
     570 
    520571                        lastSplitWasOsp = true; 
    521572                        cout << "osp" << endl; 
     
    545596                else 
    546597                { 
     598                        ///////////////// 
     599                        // subdivide view space with respect to the objects 
     600 
    547601                        lastSplitWasOsp = false; 
    548602                        cout << "vsp" << endl; 
    549                          
    550                         ///////////////// 
    551                         // subdivide view space with respect to the objects 
    552603 
    553604                        // dirtied object space candidates 
     
    574625                                 << (int)dirtyOspList.size() << " dirtied candidates" << endl; 
    575626                } 
     627 
     628                PrintTimings(lastSplitWasOsp); 
    576629        } 
    577630 
     
    18451898                //cout << "priority: " << nodeWrapper->GetMergeCost() << endl; 
    18461899                // save the view cells if it is a leaf or if enough view cells have already been traversed 
    1847                 // because of the priority queue, this will be the optimal set of v 
     1900                // because of the priority queue, this will be the optimal set of view cells 
    18481901                if (nodeWrapper->IsLeaf() ||  
    18491902                        ((viewCells.size() + bvhNodes.size() + tqueue.size() + 1) >= maxSplits) || 
     
    18871940 
    18881941                if (obj->Type() != Intersectable::BVH_INTERSECTABLE) 
    1889                         cout << "error " << obj->Type() << endl; 
     1942                { 
     1943                        cout << "error: wrong object type detected: " << obj->Type() << endl; 
     1944                        exit(0); 
     1945                } 
    18901946 
    18911947                BvhNode *intersect = static_cast<BvhNode *>(obj); 
Note: See TracChangeset for help on using the changeset viewer.