Browse Source

Removed shiny profiler. The Shiny profiler was only working on MSVC
and nowadays the sampling profiler inside Visual Studio is better.

Vojtech Bubnik 2 years ago
parent
commit
7e77048593

+ 0 - 20
CMakeLists.txt

@@ -27,7 +27,6 @@ option(SLIC3R_STATIC 			"Compile PrusaSlicer with static libraries (Boost, TBB,
 option(SLIC3R_GUI    			"Compile PrusaSlicer with GUI components (OpenGL, wxWidgets)" 1)
 option(SLIC3R_FHS               "Assume PrusaSlicer is to be installed in a FHS directory structure" 0)
 option(SLIC3R_WX_STABLE         "Build against wxWidgets stable (3.0) as oppsed to dev (3.1) on Linux" 0)
-option(SLIC3R_PROFILE 			"Compile PrusaSlicer with an invasive Shiny profiler" 0)
 option(SLIC3R_PCH               "Use precompiled headers" 1)
 option(SLIC3R_MSVC_COMPILE_PARALLEL "Compile on Visual Studio in parallel" 1)
 option(SLIC3R_MSVC_PDB          "Generate PDB files on MSVC in Release mode" 1)
@@ -328,25 +327,6 @@ add_definitions(-DwxUSE_UNICODE -D_UNICODE -DUNICODE -DWXINTL_NO_GETTEXT_MACRO)
 # Disable unsafe implicit wxString to const char* / std::string and vice versa. This implicit conversion breaks the UTF-8 encoding quite often.
 add_definitions(-DwxNO_UNSAFE_WXSTRING_CONV)
 
-if (SLIC3R_PROFILE)
-    message("PrusaSlicer will be built with a Shiny invasive profiler")
-    add_definitions(-DSLIC3R_PROFILE)
-endif ()
-
-# Disable optimization even with debugging on.
-if (0)
-    message(STATUS "Perl compiled without optimization. Disabling optimization for the PrusaSlicer build.")
-    message("Old CMAKE_CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}")
-    message("Old CMAKE_CXX_FLAGS_RELWITHDEBINFO: ${CMAKE_CXX_FLAGS_RELEASE}")
-    message("Old CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS_RELEASE}")
-    set(CMAKE_CXX_FLAGS_RELEASE "/MD /Od /Zi /EHsc /DWIN32 /DTBB_USE_ASSERT")
-    set(CMAKE_C_FLAGS_RELEASE "/MD /Od /Zi /DWIN32 /DTBB_USE_ASSERT")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /Od /Zi /EHsc /DWIN32 /DTBB_USE_ASSERT")
-    set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MD /Od /Zi /DWIN32 /DTBB_USE_ASSERT")
-    set(CMAKE_CXX_FLAGS "/MD /Od /Zi /EHsc /DWIN32 /DTBB_USE_ASSERT")
-    set(CMAKE_C_FLAGS "/MD /Od /Zi /DWIN32 /DTBB_USE_ASSERT")
-endif()
-
 # Find and configure boost
 if(SLIC3R_STATIC)
     # Use static boost libraries.

+ 0 - 1
doc/Dependencies.md

@@ -24,7 +24,6 @@
 * miniz: No packages, author suggests using in the source tree
 * qhull: libqhull-dev does not contain libqhullcpp => link errors. Until it is fixed, we will use the builtin version. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925540
 * semver: One module C library, author expects to use clib for installation. No packages.
-* Shiny: no packages
 
 ## Header only
 * igl

+ 79 - 115
sandboxes/aabb-evaluation/aabb-evaluation.cpp

@@ -6,8 +6,6 @@
 #include <libslic3r/AABBTreeIndirect.hpp>
 #include <libslic3r/SLA/EigenMesh3D.hpp>
 
-#include <Shiny/Shiny.h>
-
 #ifdef _MSC_VER
 #pragma warning(push)
 #pragma warning(disable: 4244)
@@ -42,53 +40,42 @@ void profile(const TriangleMesh &mesh)
 
     Eigen::MatrixXd occlusion_output0;
     {
-        AABBTreeIndirect::Tree3f tree;
-        {
-            PROFILE_BLOCK(AABBIndirect_Init);
-            tree = AABBTreeIndirect::build_aabb_tree_over_indexed_triangle_set(mesh.its.vertices, mesh.its.indices);
-        }
-        {
-            PROFILE_BLOCK(EigenMesh3D_AABBIndirectF_AmbientOcclusion);
-            occlusion_output0.resize(num_vertices, 1);
-            for (int ivertex = 0; ivertex < num_vertices; ++ ivertex) {
-                const Eigen::Vector3d origin = mesh.its.vertices[ivertex].template cast<double>();
-                const Eigen::Vector3d normal = vertex_normals.row(ivertex).template cast<double>();
-                int num_hits = 0;
-                for (int s = 0; s < num_samples; s++) {
-                    Eigen::Vector3d d = dirs.row(s);
-                    if(d.dot(normal) < 0) {
-                        // reverse ray
-                        d *= -1;
-                    }
-                    igl::Hit hit;
-                    if (AABBTreeIndirect::intersect_ray_first_hit(mesh.its.vertices, mesh.its.indices, tree, (origin + 1e-4 * d).eval(), d, hit))
-                        ++ num_hits;
+        AABBTreeIndirect::Tree3f tree = AABBTreeIndirect::build_aabb_tree_over_indexed_triangle_set(mesh.its.vertices, mesh.its.indices);
+        occlusion_output0.resize(num_vertices, 1);
+        for (int ivertex = 0; ivertex < num_vertices; ++ ivertex) {
+            const Eigen::Vector3d origin = mesh.its.vertices[ivertex].template cast<double>();
+            const Eigen::Vector3d normal = vertex_normals.row(ivertex).template cast<double>();
+            int num_hits = 0;
+            for (int s = 0; s < num_samples; s++) {
+                Eigen::Vector3d d = dirs.row(s);
+                if(d.dot(normal) < 0) {
+                    // reverse ray
+                    d *= -1;
                 }
-                occlusion_output0(ivertex) = (double)num_hits/(double)num_samples;
+                igl::Hit hit;
+                if (AABBTreeIndirect::intersect_ray_first_hit(mesh.its.vertices, mesh.its.indices, tree, (origin + 1e-4 * d).eval(), d, hit))
+                    ++ num_hits;
             }
+            occlusion_output0(ivertex) = (double)num_hits/(double)num_samples;
         }
-
-        {
-            PROFILE_BLOCK(EigenMesh3D_AABBIndirectFF_AmbientOcclusion);
-            occlusion_output0.resize(num_vertices, 1);
-            for (int ivertex = 0; ivertex < num_vertices; ++ ivertex) {
-                const Eigen::Vector3d origin = mesh.its.vertices[ivertex].template cast<double>();
-                const Eigen::Vector3d normal = vertex_normals.row(ivertex).template cast<double>();
-                int num_hits = 0;
-                for (int s = 0; s < num_samples; s++) {
-                    Eigen::Vector3d d = dirs.row(s);
-                    if(d.dot(normal) < 0) {
-                        // reverse ray
-                        d *= -1;
-                    }
-                    igl::Hit hit;
-                    if (AABBTreeIndirect::intersect_ray_first_hit(mesh.its.vertices, mesh.its.indices, tree, 
-                            Eigen::Vector3f((origin + 1e-4 * d).template cast<float>()),
-                            Eigen::Vector3f(d.template cast<float>()), hit))
-                        ++ num_hits;
+        occlusion_output0.resize(num_vertices, 1);
+        for (int ivertex = 0; ivertex < num_vertices; ++ ivertex) {
+            const Eigen::Vector3d origin = mesh.its.vertices[ivertex].template cast<double>();
+            const Eigen::Vector3d normal = vertex_normals.row(ivertex).template cast<double>();
+            int num_hits = 0;
+            for (int s = 0; s < num_samples; s++) {
+                Eigen::Vector3d d = dirs.row(s);
+                if(d.dot(normal) < 0) {
+                    // reverse ray
+                    d *= -1;
                 }
-                occlusion_output0(ivertex) = (double)num_hits/(double)num_samples;
+                igl::Hit hit;
+                if (AABBTreeIndirect::intersect_ray_first_hit(mesh.its.vertices, mesh.its.indices, tree, 
+                        Eigen::Vector3f((origin + 1e-4 * d).template cast<float>()),
+                        Eigen::Vector3f(d.template cast<float>()), hit))
+                    ++ num_hits;
             }
+            occlusion_output0(ivertex) = (double)num_hits/(double)num_samples;
         }
     }
 
@@ -100,31 +87,23 @@ void profile(const TriangleMesh &mesh)
             vertices.emplace_back(V.row(i).transpose());
         for (int i = 0; i < F.rows(); ++ i)
             triangles.emplace_back(F.row(i).transpose());
-        AABBTreeIndirect::Tree3d tree;
-        {
-            PROFILE_BLOCK(AABBIndirectD_Init);
-            tree = AABBTreeIndirect::build_aabb_tree_over_indexed_triangle_set(vertices, triangles);
-        }
-
-        {
-            PROFILE_BLOCK(EigenMesh3D_AABBIndirectD_AmbientOcclusion);
-            occlusion_output1.resize(num_vertices, 1);
-            for (int ivertex = 0; ivertex < num_vertices; ++ ivertex) {
-                const Eigen::Vector3d origin = V.row(ivertex).template cast<double>();
-                const Eigen::Vector3d normal = vertex_normals.row(ivertex).template cast<double>();
-                int num_hits = 0;
-                for (int s = 0; s < num_samples; s++) {
-                    Eigen::Vector3d d = dirs.row(s);
-                    if(d.dot(normal) < 0) {
-                        // reverse ray
-                        d *= -1;
-                    }
-                    igl::Hit hit;
-                    if (AABBTreeIndirect::intersect_ray_first_hit(vertices, triangles, tree, Eigen::Vector3d(origin + 1e-4 * d), d, hit))
-                        ++ num_hits;
+        AABBTreeIndirect::Tree3d tree = AABBTreeIndirect::build_aabb_tree_over_indexed_triangle_set(vertices, triangles);
+        occlusion_output1.resize(num_vertices, 1);
+        for (int ivertex = 0; ivertex < num_vertices; ++ ivertex) {
+            const Eigen::Vector3d origin = V.row(ivertex).template cast<double>();
+            const Eigen::Vector3d normal = vertex_normals.row(ivertex).template cast<double>();
+            int num_hits = 0;
+            for (int s = 0; s < num_samples; s++) {
+                Eigen::Vector3d d = dirs.row(s);
+                if(d.dot(normal) < 0) {
+                    // reverse ray
+                    d *= -1;
                 }
-                occlusion_output1(ivertex) = (double)num_hits/(double)num_samples;
+                igl::Hit hit;
+                if (AABBTreeIndirect::intersect_ray_first_hit(vertices, triangles, tree, Eigen::Vector3d(origin + 1e-4 * d), d, hit))
+                    ++ num_hits;
             }
+            occlusion_output1(ivertex) = (double)num_hits/(double)num_samples;
         }
     }
 
@@ -133,29 +112,23 @@ void profile(const TriangleMesh &mesh)
     Eigen::MatrixXd occlusion_output2;
     {
         igl::AABB<Eigen::MatrixXd, 3> AABB;
-        {
-            PROFILE_BLOCK(EigenMesh3D_AABB_Init);
-            AABB.init(V, F);
-        }
-        {
-            PROFILE_BLOCK(EigenMesh3D_AABB_AmbientOcclusion);
-            occlusion_output2.resize(num_vertices, 1);
-            for (int ivertex = 0; ivertex < num_vertices; ++ ivertex) {
-                const Eigen::Vector3d origin = V.row(ivertex).template cast<double>();
-                const Eigen::Vector3d normal = vertex_normals.row(ivertex).template cast<double>();
-                int num_hits = 0;
-                for (int s = 0; s < num_samples; s++) {
-                    Eigen::Vector3d d = dirs.row(s);
-                    if(d.dot(normal) < 0) {
-                        // reverse ray
-                        d *= -1;
-                    }
-                    igl::Hit hit;
-                    if (AABB.intersect_ray(V, F, origin + 1e-4 * d, d, hit))
-                        ++ num_hits;
+        AABB.init(V, F);
+        occlusion_output2.resize(num_vertices, 1);
+        for (int ivertex = 0; ivertex < num_vertices; ++ ivertex) {
+            const Eigen::Vector3d origin = V.row(ivertex).template cast<double>();
+            const Eigen::Vector3d normal = vertex_normals.row(ivertex).template cast<double>();
+            int num_hits = 0;
+            for (int s = 0; s < num_samples; s++) {
+                Eigen::Vector3d d = dirs.row(s);
+                if(d.dot(normal) < 0) {
+                    // reverse ray
+                    d *= -1;
                 }
-                occlusion_output2(ivertex) = (double)num_hits/(double)num_samples;
+                igl::Hit hit;
+                if (AABB.intersect_ray(V, F, origin + 1e-4 * d, d, hit))
+                    ++ num_hits;
             }
+            occlusion_output2(ivertex) = (double)num_hits/(double)num_samples;
         }
     }
 
@@ -166,37 +139,28 @@ void profile(const TriangleMesh &mesh)
         igl::AABB<MapMatrixXfUnaligned, 3> AABB;
         auto vertices = MapMatrixXfUnaligned(mesh.its.vertices.front().data(), mesh.its.vertices.size(), 3);
         auto faces = MapMatrixXiUnaligned(mesh.its.indices.front().data(), mesh.its.indices.size(), 3);
-        {
-            PROFILE_BLOCK(EigenMesh3D_AABBf_Init);
-            AABB.init(
-                vertices,
-                faces);
-        }
-
-        {
-            PROFILE_BLOCK(EigenMesh3D_AABBf_AmbientOcclusion);
-            occlusion_output3.resize(num_vertices, 1);
-            for (int ivertex = 0; ivertex < num_vertices; ++ ivertex) {
-                const Eigen::Vector3d origin = mesh.its.vertices[ivertex].template cast<double>();
-                const Eigen::Vector3d normal = vertex_normals.row(ivertex).template cast<double>();
-                int num_hits = 0;
-                for (int s = 0; s < num_samples; s++) {
-                    Eigen::Vector3d d = dirs.row(s);
-                    if(d.dot(normal) < 0) {
-                        // reverse ray
-                        d *= -1;
-                    }
-                    igl::Hit hit;
-                    if (AABB.intersect_ray(vertices, faces, (origin + 1e-4 * d).eval().template cast<float>(), d.template cast<float>(), hit))
-                        ++ num_hits;
+        AABB.init(
+            vertices,
+            faces);
+
+        occlusion_output3.resize(num_vertices, 1);
+        for (int ivertex = 0; ivertex < num_vertices; ++ ivertex) {
+            const Eigen::Vector3d origin = mesh.its.vertices[ivertex].template cast<double>();
+            const Eigen::Vector3d normal = vertex_normals.row(ivertex).template cast<double>();
+            int num_hits = 0;
+            for (int s = 0; s < num_samples; s++) {
+                Eigen::Vector3d d = dirs.row(s);
+                if(d.dot(normal) < 0) {
+                    // reverse ray
+                    d *= -1;
                 }
-                occlusion_output3(ivertex) = (double)num_hits/(double)num_samples;
+                igl::Hit hit;
+                if (AABB.intersect_ray(vertices, faces, (origin + 1e-4 * d).eval().template cast<float>(), d.template cast<float>(), hit))
+                    ++ num_hits;
             }
+            occlusion_output3(ivertex) = (double)num_hits/(double)num_samples;
         }
     }
-
-    PROFILE_UPDATE();
-    PROFILE_OUTPUT(nullptr);
 }
 
 int main(const int argc, const char *argv[])

+ 0 - 1
src/CMakeLists.txt

@@ -9,7 +9,6 @@ add_subdirectory(boost)
 add_subdirectory(clipper)
 add_subdirectory(miniz)
 add_subdirectory(glu-libtess)
-add_subdirectory(Shiny)
 add_subdirectory(semver)
 add_subdirectory(libigl)
 add_subdirectory(hints)

+ 0 - 25
src/Shiny/CMakeLists.txt

@@ -1,25 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12)
-project(Shiny)
-
-add_library(Shiny STATIC
-    Shiny.h
-    ShinyConfig.h
-    ShinyData.h
-    ShinyMacros.h
-    ShinyManager.c
-    ShinyManager.h
-    ShinyNode.c
-    ShinyNode.h
-    ShinyNodePool.c
-    ShinyNodePool.h
-    ShinyNodeState.c
-    ShinyNodeState.h
-    ShinyOutput.c
-    ShinyOutput.h
-    ShinyPrereqs.h
-    ShinyTools.c
-    ShinyTools.h
-    ShinyVersion.h
-    ShinyZone.c
-    ShinyZone.h
-)

+ 0 - 36
src/Shiny/Shiny.h

@@ -1,36 +0,0 @@
-/*
-The MIT License
-
-Copyright (c) 2007-2010 Aidin Abedi http://code.google.com/p/shinyprofiler/
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-
-#ifndef SHINY_H
-#define SHINY_H
-
-/*---------------------------------------------------------------------------*/
-
-#include "ShinyMacros.h"
-
-#ifdef SLIC3R_PROFILE
-#include "ShinyManager.h"
-#endif /* SLIC3R_PROFILE */
-
-#endif /* SHINY_H */

+ 0 - 61
src/Shiny/ShinyConfig.h

@@ -1,61 +0,0 @@
-/*
-The MIT License
-
-Copyright (c) 2007-2010 Aidin Abedi http://code.google.com/p/shinyprofiler/
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-
-#ifndef SHINY_CONFIG_H
-#define SHINY_CONFIG_H
-
-
-/*---------------------------------------------------------------------------*/
-
-/* if SHINY_LOOKUP_RATE is defined to TRUE then Shiny will record the success of its hash function. This is useful for debugging. Default is FALSE.
- */
-#ifndef SHINY_LOOKUP_RATE
-// #define SHINY_LOOKUP_RATE		FALSE
-#endif
-
-/* if SHINY_HAS_ENABLED is defined to TRUE then Shiny can be enabled and disabled at runtime. TODO: bla bla...
- */
-#ifndef SHINY_HAS_ENABLED
-// #define SHINY_HAS_ENABLED		FALSE
-#endif
-
-/* TODO: 
- */
-#define SHINY_OUTPUT_MODE_FLAT	0x1
-
-/* TODO: 
- */
-#define SHINY_OUTPUT_MODE_TREE	0x2
-
-/* TODO: 
- */
-#define SHINY_OUTPUT_MODE_BOTH	0x3
-
-/* TODO: 
- */
-#ifndef SHINY_OUTPUT_MODE
-#define SHINY_OUTPUT_MODE		SHINY_OUTPUT_MODE_BOTH
-#endif
-
-#endif /* SHINY_CONFIG_H */

+ 0 - 102
src/Shiny/ShinyData.h

@@ -1,102 +0,0 @@
-/*
-The MIT License
-
-Copyright (c) 2007-2010 Aidin Abedi http://code.google.com/p/shinyprofiler/
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-
-#ifndef SHINY_DATA_H
-#define SHINY_DATA_H
-
-#include "ShinyPrereqs.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*---------------------------------------------------------------------------*/
-
-typedef struct {
-	uint32_t entryCount;
-	shinytick_t selfTicks;
-} ShinyLastData;
-
-
-/*---------------------------------------------------------------------------*/
-
-typedef struct {
-	shinytick_t cur;
-	float avg;
-} ShinyTickData;
-
-typedef struct {
-	uint32_t cur;
-	float avg;
-} ShinyCountData;
-
-typedef struct {
-	ShinyCountData entryCount;
-	ShinyTickData selfTicks;
-	ShinyTickData childTicks;
-} ShinyData;
-
-SHINY_INLINE shinytick_t ShinyData_totalTicksCur(const ShinyData *self) {
-	return self->selfTicks.cur + self->childTicks.cur;
-}
-
-SHINY_INLINE float ShinyData_totalTicksAvg(const ShinyData *self) {
-	return self->selfTicks.avg + self->childTicks.avg;
-}
-
-SHINY_INLINE void ShinyData_computeAverage(ShinyData *self, float a_damping) {
-	self->entryCount.avg = self->entryCount.cur +
-		a_damping * (self->entryCount.avg - self->entryCount.cur);
-	self->selfTicks.avg = self->selfTicks.cur +
-		a_damping * (self->selfTicks.avg - self->selfTicks.cur);
-	self->childTicks.avg = self->childTicks.cur +
-		a_damping * (self->childTicks.avg - self->childTicks.cur);
-}
-
-SHINY_INLINE void ShinyData_copyAverage(ShinyData *self) {
-	self->entryCount.avg = (float) self->entryCount.cur;
-	self->selfTicks.avg = (float) self->selfTicks.cur;
-	self->childTicks.avg = (float) self->childTicks.cur;
-}
-
-SHINY_INLINE void ShinyData_clearAll(ShinyData *self) {
-	self->entryCount.cur = 0;
-	self->entryCount.avg = 0;
-	self->selfTicks.cur = 0;
-	self->selfTicks.avg = 0;
-	self->childTicks.cur = 0;
-	self->childTicks.avg = 0;
-}
-
-SHINY_INLINE void ShinyData_clearCurrent(ShinyData *self) {
-	self->entryCount.cur = 0;
-	self->selfTicks.cur = 0;
-	self->childTicks.cur = 0;
-}
-
-#if __cplusplus
-} /* end of extern "C" */
-#endif
-
-#endif /* SHINY_DATA_H */

+ 0 - 281
src/Shiny/ShinyMacros.h

@@ -1,281 +0,0 @@
-/*
-The MIT License
-
-Copyright (c) 2007-2010 Aidin Abedi http://code.google.com/p/shinyprofiler/
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-
-#ifndef SHINY_MACROS_H
-#define SHINY_MACROS_H
-
-#ifdef SLIC3R_PROFILE
-
-#include "ShinyManager.h"
-
-/*---------------------------------------------------------------------------*/
-/* public preprocessors */
-
-#define PROFILE_UPDATE()													\
-	ShinyManager_update(&Shiny_instance)
-
-#define PROFILE_SET_DAMPING(floatfrom0to1)									\
-	Shiny_instance.damping = (floatfrom0to1);
-
-#define PROFILE_GET_DAMPING()												\
-	(Shiny_instance.damping)
-
-#define PROFILE_OUTPUT(filename)											\
-	ShinyManager_output(&Shiny_instance, (filename))
-
-#define PROFILE_OUTPUT_STREAM(stream)										\
-	ShinyManager_outputToStream(&Shiny_instance, (stream))
-
-#ifdef __cplusplus
-#define PROFILE_GET_TREE_STRING()											\
-	ShinyManager_outputTreeToString(&Shiny_instance)
-
-#define PROFILE_GET_FLAT_STRING()											\
-	ShinyManager_outputFlatToString(&Shiny_instance)
-#endif /* __cplusplus */
-
-#define PROFILE_DESTROY()													\
-	ShinyManager_destroy(&Shiny_instance)
-
-#define PROFILE_CLEAR()														\
-	ShinyManager_clear(&Shiny_instance)
-
-#define PROFILE_SORT_ZONES()												\
-	ShinyManager_sortZones(&Shiny_instance)
-
-
-/*---------------------------------------------------------------------------*/
-/* public preprocessors */
-
-#define PROFILE_GET_TOTAL_TICKS_CUR()										\
-	ShinyData_totalTicksCur(&Shiny_instance.rootZone.data)
-
-#define PROFILE_GET_TOTAL_TICKS()											\
-	ShinyData_totalTicksAvg(&Shiny_instance.rootZone.data)
-
-#define PROFILE_GET_PROFILED_TICKS_CUR()									\
-	(Shiny_instance.rootZone.data.selfTicks.cur)
-
-#define PROFILE_GET_PROFILED_TICKS()										\
-	(Shiny_instance.rootZone.data.selfTicks.avg)
-
-#define PROFILE_GET_UNPROFILED_TICKS_CUR()									\
-	(Shiny_instance.rootZone.data.childTicks.cur)
-
-#define PROFILE_GET_UNPROFILED_TICKS()										\
-	(Shiny_instance.rootZone.data.childTicks.avg)
-
-#define PROFILE_GET_SHARED_TOTAL_TICKS_CUR(name)							\
-	ShinyData_totalTicksCur(&(_PROFILE_ID_ZONE_SHARED(name).data))
-
-#define PROFILE_GET_SHARED_TOTAL_TICKS(name)								\
-	ShinyData_totalTicksAvg(&(_PROFILE_ID_ZONE_SHARED(name).data))
-
-#define PROFILE_GET_SHARED_SELF_TICKS_CUR(name)								\
-	(_PROFILE_ID_ZONE_SHARED(name).data.selfTicks.cur)
-
-#define PROFILE_GET_SHARED_SELF_TICKS(name)									\
-	(_PROFILE_ID_ZONE_SHARED(name).data.selfTicks.avg)
-
-
-/*---------------------------------------------------------------------------*/
-/* public preprocessors */
-
-#define PROFILE_IS_SHARED_SELF_BELOW(name, floatfrom0to1)					\
-	ShinyManager_isZoneSelfTimeBelow(										\
-		&Shiny_instance, _PROFILE_ID_ZONE_SHARED(name), floatfrom0to1)
-
-#define PROFILE_IS_SHARED_TOTAL_BELOW(name, floatfrom0to1)					\
-	ShinyManager_isZoneTotalTimeBelow(										\
-		&Shiny_instance, _PROFILE_ID_ZONE_SHARED(name), floatfrom0to1)
-
-
-/*---------------------------------------------------------------------------*/
-/* public preprocessors */
-
-#define PROFILE_END()														\
-	ShinyManager_endCurNode(&Shiny_instance)
-
-
-/*---------------------------------------------------------------------------*/
-/* public preprocessors */
-
-#define PROFILE_BEGIN( name )												\
-																			\
-	static _PROFILE_ZONE_DEFINE(_PROFILE_ID_ZONE(name), #name);				\
-	_PROFILE_ZONE_BEGIN(_PROFILE_ID_ZONE(name))
-
-
-/*---------------------------------------------------------------------------*/
-/* public preprocessors */
-
-#ifdef __cplusplus
-#define PROFILE_BLOCK( name )												\
-																			\
-	_PROFILE_BLOCK_DEFINE(_PROFILE_ID_BLOCK());								\
-	PROFILE_BEGIN(name)
-#endif /* __cplusplus */
-
-/*---------------------------------------------------------------------------*/
-/* public preprocessors */
-
-#ifdef __cplusplus
-#define PROFILE_FUNC()														\
-																			\
-	_PROFILE_BLOCK_DEFINE(_PROFILE_ID_BLOCK());								\
-	static _PROFILE_ZONE_DEFINE(_PROFILE_ID_ZONE_FUNC(), __FUNCTION__);		\
-	_PROFILE_ZONE_BEGIN(_PROFILE_ID_ZONE_FUNC())
-#endif /* __cplusplus */
-
-/*---------------------------------------------------------------------------*/
-/* public preprocessors */
-
-#define PROFILE_CODE( code )												\
-																			\
-	do {																	\
-		static _PROFILE_ZONE_DEFINE(_PROFILE_ID_ZONE_CODE(), #code);		\
-		_PROFILE_ZONE_BEGIN(_PROFILE_ID_ZONE_CODE());						\
-		{ code; }															\
-		PROFILE_END();														\
-	} while(0)
-
-
-/*---------------------------------------------------------------------------*/
-/* public preprocessors */
-
-#define PROFILE_SHARED_EXTERN( name )										\
-																			\
-	_PROFILE_ZONE_DECLARE(extern, _PROFILE_ID_ZONE_SHARED(name))
-
-
-/*---------------------------------------------------------------------------*/
-/* public preprocessors */
-
-#define PROFILE_SHARED_DEFINE( name )										\
-																			\
-	_PROFILE_ZONE_DEFINE(_PROFILE_ID_ZONE_SHARED(name), #name)
-
-
-/*---------------------------------------------------------------------------*/
-/* public preprocessors */
-
-#define PROFILE_SHARED_BEGIN( name )										\
-																			\
-	_PROFILE_ZONE_BEGIN(_PROFILE_ID_ZONE_SHARED(name))
-
-
-/*---------------------------------------------------------------------------*/
-/* public preprocessors */
-
-#ifdef __cplusplus
-#define PROFILE_SHARED_BLOCK( name )										\
-																			\
-	_PROFILE_BLOCK_DEFINE(_PROFILE_ID_BLOCK());								\
-	_PROFILE_ZONE_BEGIN(_PROFILE_ID_ZONE_SHARED(name))
-#endif /* __cplusplus */
-
-
-/*---------------------------------------------------------------------------*/
-/* public preprocessors */
-
-#ifdef SHINY_HAS_ENABLED
-#define PROFILE_SET_ENABLED( boolean )										\
-	Shiny_instance.enabled = boolean
-#endif
-
-
-/*---------------------------------------------------------------------------*/
-/* internal preprocessors */
-
-#define _PROFILE_ID_ZONE( name )			__ShinyZone_##name
-#define _PROFILE_ID_ZONE_FUNC()				__ShinyZoneFunc
-#define _PROFILE_ID_ZONE_CODE()				__ShinyZoneCode
-#define _PROFILE_ID_ZONE_SHARED( name )		name##__ShinyZoneShared
-#define _PROFILE_ID_BLOCK()					__ShinyBlock
-
-
-/*---------------------------------------------------------------------------*/
-/* internal preprocessor */
-
-#define _PROFILE_ZONE_DEFINE( id, string )									\
-																			\
-	ShinyZone id = {														\
-		NULL, SHINY_ZONE_STATE_HIDDEN, string,								\
-		{ { 0, 0 }, { 0, 0 }, { 0, 0 } }									\
-	}
-
-
-/*---------------------------------------------------------------------------*/
-/* internal preprocessor */
-
-#define _PROFILE_ZONE_DECLARE( prefix, id )									\
-																			\
-	prefix ShinyZone id
-
-
-/*---------------------------------------------------------------------------*/
-/* internal preprocessor */
-
-#define _PROFILE_BLOCK_DEFINE( id )											\
-																			\
-	ShinyEndNodeOnDestruction SHINY_UNUSED id
-
-
-/*---------------------------------------------------------------------------*/
-/* internal preprocessor */
-
-#define _PROFILE_ZONE_BEGIN( id )											\
-																			\
-	do {																	\
-		static ShinyNodeCache cache = &_ShinyNode_dummy;					\
-		ShinyManager_lookupAndBeginNode(&Shiny_instance, &cache, &id);		\
-	} while(0)
-
-/*---------------------------------------------------------------------------*/
-
-#else /* SLIC3R_PROFILE */
-
-#define PROFILE_UPDATE()
-#define PROFILE_SET_DAMPING(x)
-#define PROFILE_GET_DAMPING()			0.0f
-#define PROFILE_OUTPUT(x)
-#define PROFILE_OUTPUT_STREAM(x)
-#define PROFILE_CLEAR()
-#define PROFILE_GET_TREE_STRING()		std::string()
-#define PROFILE_GET_FLAT_STRING()		std::string()
-#define PROFILE_DESTROY()
-#define PROFILE_BEGIN(name)
-#define PROFILE_BLOCK(name)
-#define PROFILE_FUNC()
-#define PROFILE_CODE(code)				do { code; } while (0)
-#define PROFILE_SHARED_GLOBAL(name)
-#define PROFILE_SHARED_MEMBER(name)
-#define PROFILE_SHARED_DEFINE(name)
-#define PROFILE_SHARED_BEGIN(name)
-#define PROFILE_SHARED_BLOCK(name)
-#define PROFILE_SET_ENABLED(boolean)
-
-#endif /* SLIC3R_PROFILE */
-
-#endif /* SHINY_MACROS_H */

+ 0 - 445
src/Shiny/ShinyManager.c

@@ -1,445 +0,0 @@
-/*
-The MIT License
-
-Copyright (c) 2007-2010 Aidin Abedi http://code.google.com/p/shinyprofiler/
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-
-#ifdef SLIC3R_PROFILE
-
-#include "ShinyManager.h"
-
-#include <malloc.h>
-#include <memory.h>
-#include <string.h>
-#include <stdio.h>
-
-/*---------------------------------------------------------------------------*/
-
-#define TABLE_SIZE_INIT		256
-
-/*---------------------------------------------------------------------------*/
-
-ShinyManager Shiny_instance = {
-#if SHINY_HAS_ENABLED == TRUE
-	/* enabled = */ false,
-#endif
-	/* _lastTick = */ 0,
-	/* _curNode = */ &Shiny_instance.rootNode,
-	/* _tableMask = */ 0,
-	/* _nodeTable = */ _ShinyManager_dummyNodeTable,
-#if SHINY_LOOKUP_RATE == TRUE
-	/* _lookupCount = */ 0,
-	/* _lookupSuccessCount = */ 0,
-#endif
-	/* _tableSize = */ 1,
-	/* nodeCount = */ 1,
-	/* zoneCount = */ 1,
-	/* _lastZone = */ &Shiny_instance.rootZone,
-	/* _lastNodePool = */ NULL,
-	/* _firstNodePool = */ NULL,
-	/* rootNode = */ {
-		/* _last = */ { 0, 0 },
-		/* zone = */ &Shiny_instance.rootZone,
-		/* parent = */ &Shiny_instance.rootNode,
-		/* nextSibling = */ NULL,
-		/* firstChild = */ NULL,
-		/* lastChild = */ NULL,
-		/* childCount = */ 0,
-		/* entryLevel = */ 0,
-		/* _cache = */ NULL,
-		/* data = */ { { 0, 0 }, { 0, 0 }, { 0, 0 } }
-	},
-	/* rootZone = */ {
-		/* next = */ NULL,
-		/* _state = */ SHINY_ZONE_STATE_HIDDEN,
-		/* name = */ "<unprofiled>",
-		/* data = */ { { 0, 0 }, { 0, 0 }, { 0, 0 } }
-	},
-	/* damping = */ 0.f, // Damping disabled, every PROFILE_UPDATE will be performed from scratch. Original value: 0.9f
-	/* _initialized = */ FALSE,
-	/* _firstUpdate = */ TRUE
-};
-
-ShinyNode* _ShinyManager_dummyNodeTable[] = { NULL };
-
-
-/*---------------------------------------------------------------------------*/
-
-#if SHINY_COMPILER == SHINY_COMPILER_MSVC
-#	pragma warning (push)
-#	pragma warning (disable: 4311)
-#endif
-
-/* primary hash function */
-SHINY_INLINE uint32_t hash_value(void* a_pParent, void* a_pZone) {
-	uint32_t a = (uint32_t) a_pParent + (uint32_t) a_pZone;
-//	uint32_t a = *reinterpret_cast<uint32_t*>(&a_pParent) + *reinterpret_cast<uint32_t*>(&a_pZone);
-
-	a = (a+0x7ed55d16) + (a<<12);
-	a = (a^0xc761c23c) ^ (a>>19);
-	return a;
-}
-
-/*
- * secondary hash used as index offset: force it to be odd
- * so it's relatively prime to the power-of-two table size
- */
-SHINY_INLINE uint32_t hash_offset(uint32_t a) {
-	return ((a << 8) + (a >> 4)) | 1;
-}
-
-#if SHINY_COMPILER == SHINY_COMPILER_MSVC
-#	pragma warning (pop)
-#endif
-
-
-/*---------------------------------------------------------------------------*/
-
-void ShinyManager_preLoad(ShinyManager *self) {
-	if (!self->_initialized) {
-		_ShinyManager_init(self);
-
-		_ShinyManager_createNodeTable(self, TABLE_SIZE_INIT);
-		_ShinyManager_createNodePool(self, TABLE_SIZE_INIT / 2);
-	}
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-void ShinyManager_update(ShinyManager *self) {
-#if SHINY_HAS_ENABLED == TRUE
-	if (!enabled) return;
-#endif
-
-	_ShinyManager_appendTicksToCurNode(self);
-	ShinyZone_preUpdateChain(&self->rootZone);
-
-	if (self->_firstUpdate || self->damping == 0) {
-		self->_firstUpdate = FALSE;
-		ShinyNode_updateTreeClean(&self->rootNode);
-		ShinyZone_updateChainClean(&self->rootZone);
-
-	} else {
-		ShinyNode_updateTree(&self->rootNode, self->damping);
-		ShinyZone_updateChain(&self->rootZone, self->damping);
-	}
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-void ShinyManager_updateClean(ShinyManager *self) {
-#if SHINY_HAS_ENABLED == TRUE
-	if (!enabled) return;
-#endif
-
-	_ShinyManager_appendTicksToCurNode(self);
-	ShinyZone_preUpdateChain(&self->rootZone);
-
-	self->_firstUpdate = FALSE;
-	ShinyNode_updateTreeClean(&self->rootNode);
-	ShinyZone_updateChainClean(&self->rootZone);
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-void ShinyManager_clear(ShinyManager *self) {
-	ShinyManager_destroy(self);
-	ShinyManager_preLoad(self);
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-void ShinyManager_destroy(ShinyManager *self) {
-	ShinyManager_destroyNodes(self);
-	ShinyManager_resetZones(self);
-	_ShinyManager_uninit(self);
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-ShinyNode* _ShinyManager_lookupNode(ShinyManager *self, ShinyNodeCache *a_cache, ShinyZone *a_zone) {
-	uint32_t nHash = hash_value(self->_curNode, a_zone);
-	uint32_t nIndex = nHash & self->_tableMask;
-	ShinyNode* pNode = self->_nodeTable[nIndex];
-
-	_ShinyManager_incLookup(self);
-	_ShinyManager_incLookupSuccess(self);
-
-	if (pNode) {
-		uint32_t nStep;
-
-		if (ShinyNode_isEqual(pNode, self->_curNode, a_zone)) return pNode; /* found it! */
-		
-		/* hash collision: */
-
-		/* compute a secondary hash function for stepping */
-		nStep = hash_offset(nHash);
-
-		for (;;) {
-			_ShinyManager_incLookup(self);
-
-			nIndex = (nIndex + nStep) & self->_tableMask;
-			pNode = self->_nodeTable[nIndex];
-
-			if (!pNode) break; /* found empty slot */
-			else if (ShinyNode_isEqual(pNode, self->_curNode, a_zone)) return pNode; /* found it! */
-		}
-
-		/* loop is guaranteed to end because the hash table is never full */
-	}
-
-	if (a_zone->_state == SHINY_ZONE_STATE_HIDDEN) { /* zone is not initialized */
-		ShinyZone_init(a_zone, self->_lastZone);
-
-		self->_lastZone = a_zone;
-		self->zoneCount++;
-
-		if (self->_initialized == FALSE) { /* first time init */
-			_ShinyManager_init(self);
-
-			_ShinyManager_createNodeTable(self, TABLE_SIZE_INIT);
-			_ShinyManager_createNodePool(self, TABLE_SIZE_INIT / 2);
-
-			/* initialization has invalidated nIndex
-			 * we must compute nIndex again
-			 */
-			return _ShinyManager_createNode(self, a_cache, a_zone);
-		}
-	}
-
-	/* Althouth nodeCount is not updated
-	 * it includes rootNode so it adds up.
-	 *
-	 * check if we need to grow the table
-	 * we keep it at most 1/2 full to be very fast
-	 */
-	if (self->_tableSize < 2 * self->nodeCount) {
-
-		_ShinyManager_resizeNodeTable(self, 2 * self->_tableSize);
-		_ShinyManager_resizeNodePool(self, self->nodeCount - 1);
-
-		/* resize has invalidated nIndex
-		 * we must compute nIndex again
-		 */
-		return _ShinyManager_createNode(self, a_cache, a_zone);
-	}
-	
-	self->nodeCount++;
-
-	{
-		ShinyNode* pNewNode = ShinyNodePool_newItem(self->_lastNodePool);
-		ShinyNode_init(pNewNode, self->_curNode, a_zone, a_cache);
-
-		self->_nodeTable[nIndex] = pNewNode;
-		return pNewNode;
-	}
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-void _ShinyManager_insertNode(ShinyManager *self, ShinyNode* a_pNode) {
-	uint32_t nHash = hash_value(a_pNode->parent, a_pNode->zone);
-	uint32_t nIndex = nHash & self->_tableMask;
-
-	if (self->_nodeTable[nIndex]) {
-		uint32_t nStep = hash_offset(nHash);
-
-		while (self->_nodeTable[nIndex])
-			nIndex = (nIndex + nStep) & self->_tableMask;
-	}
-
-	self->_nodeTable[nIndex] = a_pNode;
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-ShinyNode* _ShinyManager_createNode(ShinyManager *self, ShinyNodeCache* a_cache, ShinyZone* a_pZone) {
-	ShinyNode* pNewNode = ShinyNodePool_newItem(self->_lastNodePool);
-	ShinyNode_init(pNewNode, self->_curNode, a_pZone, a_cache);
-
-	self->nodeCount++;
-	_ShinyManager_insertNode(self, pNewNode);
-	return pNewNode;
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-void _ShinyManager_createNodePool(ShinyManager *self, uint32_t a_nCount) {
-	self->_firstNodePool = ShinyNodePool_create(a_nCount);
-	self->_lastNodePool = self->_firstNodePool;
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-void _ShinyManager_resizeNodePool(ShinyManager *self, uint32_t a_nCount) {
-	ShinyNodePool* pPool = ShinyNodePool_create(a_nCount);
-	self->_lastNodePool->nextPool = pPool;
-	self->_lastNodePool = pPool;
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-void _ShinyManager_createNodeTable(ShinyManager *self, uint32_t a_nCount) {
-	self->_tableSize = a_nCount;
-	self->_tableMask = a_nCount - 1;
-
-	self->_nodeTable = (ShinyNodeTable*)
-		malloc(sizeof(ShinyNode) * a_nCount);
-
-	memset(self->_nodeTable, 0, a_nCount * sizeof(ShinyNode*));
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-void _ShinyManager_resizeNodeTable(ShinyManager *self, uint32_t a_nCount) {
-	ShinyNodePool* pPool;
-
-	free(self->_nodeTable);
-	_ShinyManager_createNodeTable(self, a_nCount);
-
-	pPool = self->_firstNodePool;
-	while (pPool) {
-
-		ShinyNode *pIter = ShinyNodePool_firstItem(pPool);
-
-		while (pIter != pPool->_nextItem)
-			_ShinyManager_insertNode(self, pIter++);
-
-		pPool = pPool->nextPool;
-	}
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-void ShinyManager_resetZones(ShinyManager *self) {
-	ShinyZone_resetChain(&self->rootZone);
-	self->_lastZone = &self->rootZone;
-	self->zoneCount = 1;
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-void ShinyManager_destroyNodes(ShinyManager *self) {
-	if (self->_firstNodePool) {
-		ShinyNodePool_destroy(self->_firstNodePool);
-		self->_firstNodePool = NULL;
-	}
-
-	if (self->_nodeTable != _ShinyManager_dummyNodeTable) {
-		free(self->_nodeTable);
-
-		self->_nodeTable = _ShinyManager_dummyNodeTable;
-		self->_tableSize = 1;
-		self->_tableMask = 0;
-	}
-
-	self->_curNode = &self->rootNode;
-	self->nodeCount = 1;
-
-	_ShinyManager_init(self);
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-const char* ShinyManager_getOutputErrorString(ShinyManager *self) {
-	if (self->_firstUpdate) return "!!! Profile data must first be updated !!!";
-	else if (!self->_initialized) return "!!! No profiles where executed !!!";
-	else return NULL;
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-#if SHINY_COMPILER == SHINY_COMPILER_MSVC
-#	pragma warning (push)
-#	pragma warning (disable: 4996)
-#endif
-
-int ShinyManager_output(ShinyManager *self, const char *a_filename) {
-	if (!a_filename) {
-		ShinyManager_outputToStream(self, stdout);
-
-	} else {
-		FILE *file = fopen(a_filename, "w");
-		if (!file) return FALSE;
-		ShinyManager_outputToStream(self, file);
-		fclose(file);
-	}
-
-	return TRUE;
-}
-
-#if SHINY_COMPILER == SHINY_COMPILER_MSVC
-#	pragma warning (pop)
-#endif
-
-
-/*---------------------------------------------------------------------------*/
-
-void ShinyManager_outputToStream(ShinyManager *self, FILE *a_stream) {
-	const char *error = ShinyManager_getOutputErrorString(self);
-
-	if (error) {
-		fwrite(error, 1, strlen(error), a_stream);
-		fwrite("\n\n", 1, 2, a_stream);
-		return;
-	}
-
-#if SHINY_OUTPUT_MODE & SHINY_OUTPUT_MODE_FLAT
-	ShinyManager_sortZones(self);
-
-	{
-		int size = ShinyPrintZonesSize(self->zoneCount);
-		char *buffer = (char*) malloc(size);
-		ShinyPrintZones(buffer, &self->rootZone);
-		fwrite(buffer, 1, size - 1, a_stream);
-		fwrite("\n\n", 1, 2, a_stream);
-		free(buffer);
-	}
-#endif
-
-#if SHINY_OUTPUT_MODE & SHINY_OUTPUT_MODE_TREE
-	{
-		int size = ShinyPrintNodesSize(self->nodeCount);
-		char *buffer = (char*) malloc(size);
-		ShinyPrintNodes(buffer, &self->rootNode);
-		fwrite(buffer, 1, size - 1, a_stream);
-		fwrite("\n\n", 1, 2, a_stream);
-		free(buffer);
-	}
-#endif
-}
-
-#endif /* SLIC3R_PROFILE */

Some files were not shown because too many files changed in this diff