|
|
|||
Warning, file /include/opencascade/BVH_BuildQueue.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // Created on: 2015-05-28 0002 // Created by: Denis BOGOLEPOV 0003 // Copyright (c) 2015 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _BVH_BuildQueue_Header 0017 #define _BVH_BuildQueue_Header 0018 0019 #include <BVH_Builder.hxx> 0020 0021 #include <Standard_Mutex.hxx> 0022 #include <NCollection_Sequence.hxx> 0023 0024 //! Command-queue for parallel building of BVH nodes. 0025 class BVH_BuildQueue 0026 { 0027 template <class T, int N> 0028 friend class BVH_QueueBuilder; 0029 0030 public: 0031 //! Creates new BVH build queue. 0032 BVH_BuildQueue() 0033 : myNbThreads(0) 0034 { 0035 // 0036 } 0037 0038 //! Releases resources of BVH build queue. 0039 ~BVH_BuildQueue() 0040 { 0041 // 0042 } 0043 0044 public: 0045 //! Returns current size of BVH build queue. 0046 Standard_EXPORT Standard_Integer Size(); 0047 0048 //! Enqueues new work-item onto BVH build queue. 0049 Standard_EXPORT void Enqueue(const Standard_Integer& theNode); 0050 0051 //! Fetches first work-item from BVH build queue. 0052 Standard_EXPORT Standard_Integer Fetch(Standard_Boolean& wasBusy); 0053 0054 //! Checks if there are active build threads. 0055 Standard_Boolean HasBusyThreads() { return myNbThreads != 0; } 0056 0057 protected: 0058 //! Queue of BVH nodes to build. 0059 NCollection_Sequence<Standard_Integer> myQueue; 0060 0061 protected: 0062 //! Manages access serialization of working threads. 0063 Standard_Mutex myMutex; 0064 0065 //! Number of active build threads. 0066 Standard_Integer myNbThreads; 0067 }; 0068 0069 #endif // _BVH_BuildQueue_Header
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|