Microflow 3D  v1.0
AutoThreading.h
Go to the documentation of this file.
1 // ==============================================================================================
2 // Microflow 3D, http://www.microflow.pwr.edu.pl/
3 // Created by Roman Szafran on 18.05.19.
4 // Copyright (c) 2019 Wroclaw University of Science and Technology.
5 // Distributed under the Apache License, Version 2.0. You may obtain a copy of the License at
6 // http://www.apache.org/licenses/LICENSE-2.0 or see accompanying file license.txt.
7 // Redistributions of source code must retain the above copyright and license notice.
8 // ==============================================================================================
9 
10 # pragma once
11 
12 // OpenVDB
13 #include <openvdb/openvdb.h>
14 
15 #include <memory>
16 #include <vector>
17 #include <math.h>
18 
19 #include "MFDatabase/ThreadArray.h"
20 #include "MFDatabase/Node.h"
21 #include "MFDatabase/Thread.h"
23 #include "GeometryBuilder/NodeID.h"
24 #include "MFDatabase/ConfigData.h"
26 #include "MFDatabase/Vec3.h"
27 
28 namespace MF {
29  namespace Database {
30 
38  class AutoThreading {
39  public:
40  AutoThreading () = default;
41  ~AutoThreading() = default;
42 
43  static void GridThreading (const openvdb::Int64Grid::Ptr& VDBGrid_Ptr, std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr);
44  static void ThreadPartitioning (const openvdb::Int64Grid::Ptr& VDBGrid_Ptr, const std::shared_ptr<MF::Database::ConfigData>& ConfigData_Ptr);
45  };
46  } /* namespace Database */
47 } /* namespace MF */
static void GridThreading(const openvdb::Int64Grid::Ptr &VDBGrid_Ptr, std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Grid partitioning into MFThreads.
The AutoThreading class is responsible for automatic partitioning of grid nodes into MFThreads...
Definition: AutoThreading.h:38
static void ThreadPartitioning(const openvdb::Int64Grid::Ptr &VDBGrid_Ptr, const std::shared_ptr< MF::Database::ConfigData > &ConfigData_Ptr)
MFThreads partitioning.