From 77562212039b2464e704be84daa72fbc08d29cad Mon Sep 17 00:00:00 2001 From: cianciosa Date: Thu, 20 Nov 2025 15:26:50 -0800 Subject: [PATCH 1/2] Fix debug builds and the single header include. --- graph_framework.xcodeproj/project.pbxproj | 1 + graph_framework/absorption.hpp | 1 + graph_framework/cpu_context.hpp | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/graph_framework.xcodeproj/project.pbxproj b/graph_framework.xcodeproj/project.pbxproj index a84317c..58d124b 100644 --- a/graph_framework.xcodeproj/project.pbxproj +++ b/graph_framework.xcodeproj/project.pbxproj @@ -2011,6 +2011,7 @@ "EFIT_FILE=\\\"/Users/m4c/Projects/graph_framework/graph_tests/efit.nc\\\"", "VMEC_FILE=\\\"/Users/m4c/Projects/graph_framework/graph_tests/vmec.nc\\\"", USE_METAL, + "USE_VERBOSE=false", "\"CXX_ARGS=\\\"-I/Users/m4c/Projects/graph_framework/graph_framework -I/usr/local/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks -fgnuc-version=4.2.1 -std=gnu++2a\\\"\"", "$(inherited)", ); diff --git a/graph_framework/absorption.hpp b/graph_framework/absorption.hpp index 7119a06..d0c01d7 100644 --- a/graph_framework/absorption.hpp +++ b/graph_framework/absorption.hpp @@ -95,6 +95,7 @@ #include "newton.hpp" #include "output.hpp" +#include "dispersion.hpp" /// Namespace for power absorption models. namespace absorption { diff --git a/graph_framework/cpu_context.hpp b/graph_framework/cpu_context.hpp index 76fb313..f9750ec 100644 --- a/graph_framework/cpu_context.hpp +++ b/graph_framework/cpu_context.hpp @@ -43,8 +43,7 @@ /// @brief This just exposes the functions so the debugger links. //------------------------------------------------------------------------------ LLVM_ATTRIBUTE_USED void linkComponents() { - llvm::errs() << (void *)&llvm_orc_registerJITLoaderGDBWrapper - << (void *)&llvm_orc_registerJITLoaderGDBAllocAction; + llvm::errs() << (void *)&llvm_orc_registerJITLoaderGDBAllocAction; } #endif -- GitLab From eab3d62b9411d3625e3a85b8dcab3358140a07fe Mon Sep 17 00:00:00 2001 From: cianciosa Date: Tue, 25 Nov 2025 10:18:32 -0500 Subject: [PATCH 2/2] Add timer printout for longest time. --- graph_framework/timing.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/graph_framework/timing.hpp b/graph_framework/timing.hpp index 5303dbc..a8c4d1e 100644 --- a/graph_framework/timing.hpp +++ b/graph_framework/timing.hpp @@ -121,6 +121,33 @@ namespace timing { std::cout << "Average " << label << " time : " << total_time_ns.count()/start.size() << " ns"<< std::endl; } + +//------------------------------------------------------------------------------ +/// @brief Print out the max time. +//------------------------------------------------------------------------------ + void print_max() { + std::chrono::nanoseconds total_time_ns = static_cast (0); + for (size_t i = 0, ie = start.size(); i < ie; i++) { + const auto duration = end[i] - start[i]; + total_time_ns = std::max(std::chrono::duration_cast (duration), total_time_ns); + } + + std::cout << "Max " << label << " time : "; + if (total_time_ns.count() < 1000) { + std::cout << total_time_ns.count() << " ns" << std::endl; + } else if (total_time_ns.count() < 1000000) { + std::cout << total_time_ns.count()/1000.0 << " μs" << std::endl; + } else if (total_time_ns.count() < 1000000000) { + std::cout << total_time_ns.count()/1000000.0 << " ms" << std::endl; + } else if (total_time_ns.count() < 60000000000) { + std::cout << total_time_ns.count()/1000000000.0 << " s" << std::endl; + } else if (total_time_ns.count() < 3600000000000) { + std::cout << total_time_ns.count()/60000000000.0 << " min" << std::endl; + } else { + std::cout << total_time_ns.count()/3600000000000.0 << " h" << std::endl; + } + std::cout << std::endl; + } }; } -- GitLab