Feature/CMake (#1443)

General CMake cleanup/overhaul
* Enable precompiled headers for all projects
* Move specifications itto separate CMakeLists files
  * Add openspace-core as a subdirectory
  * Move handle_modules functionality into modules/CMakeLists.txt
  * Move handleapplications logic into apps/CMakeLists.txt
* Introduce openspace-module-collection interface library to simplify inclusion of modules in applications
* Turn module initialization into a two-step process to adapt to the new minimal dependency scenario
* Compile time speedup
  * Remove circular dependencies between modules and core preventing multithreaded compilation on MSVC
  * Build Spice multithreaded and as static library
  * Remove dependency from core to module-webbrowser
  * Remove unused dependency from kameleon
  * Remove additional unnecessary dependencies
  * Cleanup volume/kameleon/kameleonvolume modules
  * Fix visibility issues. Restrict include paths
  * Compile kameleon in parallel
* Other cleanup
  * Only copy CEF files from one target (hard-coded to OpenSpace right now)
  * Remove unused instrumentation code
  * Remove the ability to render AABB for globes as it caused a circular dependency between GlobeBrowsing and Debugging
  * Removing compiler and cppcheck warnings
  * Turn almost all includes into non-system includes
  * Don't warn on deprecrated copy
* Updated submodules
This commit is contained in:
Alexander Bock
2020-12-28 18:26:57 +01:00
committed by GitHub
parent feb3078641
commit ad8af3ffeb
181 changed files with 2250 additions and 2540 deletions

View File

@@ -139,7 +139,7 @@ bool TSP::construct() {
unsigned int OTNode = OT * _numOTNodes;
// Calculate BST level (first level is level 0)
unsigned int BSTLevel = static_cast<unsigned int>(log(OT + 1) / log(2));
unsigned int BSTLevel = static_cast<unsigned int>(log1p(OT) / log(2));
// Traverse OT
unsigned int OTChild = 1;
@@ -574,18 +574,18 @@ bool TSP::writeCache() {
}
float TSP::spatialError(unsigned int brickIndex) const {
return reinterpret_cast<const float&>(_data[brickIndex*NUM_DATA + SPATIAL_ERR]);
return *reinterpret_cast<const float*>(_data[brickIndex*NUM_DATA + SPATIAL_ERR]);
}
float TSP::temporalError(unsigned int brickIndex) const {
return reinterpret_cast<const float&>(_data[brickIndex*NUM_DATA + TEMPORAL_ERR]);
return *reinterpret_cast<const float*>(_data[brickIndex*NUM_DATA + TEMPORAL_ERR]);
}
unsigned int TSP::firstOctreeChild(unsigned int brickIndex) const {
const unsigned int otNode = brickIndex % _numOTNodes;
const unsigned int bstOffset = brickIndex - otNode;
const unsigned int depth = static_cast<unsigned int>(log(7 * otNode + 1) / log(8));
const unsigned int depth = static_cast<unsigned int>(log1p(7 * otNode) / log(8));
const unsigned int firstInLevel = static_cast<unsigned int>((pow(8, depth) - 1) / 7);
const unsigned int levelOffset = otNode - firstInLevel;
const unsigned int firstInChildLevel = static_cast<unsigned int>(
@@ -599,7 +599,7 @@ unsigned int TSP::firstOctreeChild(unsigned int brickIndex) const {
unsigned int TSP::bstLeft(unsigned int brickIndex) const {
const unsigned int bstNode = brickIndex / _numOTNodes;
const unsigned int otOffset = brickIndex % _numOTNodes;
const unsigned int depth = static_cast<unsigned int>(log(bstNode + 1) / log(2));
const unsigned int depth = static_cast<unsigned int>(log1p(bstNode) / log(2));
const unsigned int firstInLevel = static_cast<unsigned int>(pow(2, depth) - 1);
const unsigned int levelOffset = bstNode - firstInLevel;
const unsigned int firstInChildLevel = static_cast<unsigned int>(
@@ -620,7 +620,7 @@ bool TSP::isBstLeaf(unsigned int brickIndex) const {
bool TSP::isOctreeLeaf(unsigned int brickIndex) const {
const unsigned int otNode = brickIndex % _numOTNodes;
const unsigned int depth = static_cast<unsigned int>(log(7 * otNode + 1) / log(8));
const unsigned int depth = static_cast<unsigned int>(log1p(7 * otNode) / log(8));
return depth == _numOTLevels - 1;
}