diff --git a/graph_framework.xcodeproj/project.pbxproj b/graph_framework.xcodeproj/project.pbxproj index a84317c874d81627280cce0592d2e976b845c465..58d124bb0c291872aa955fb65af1b8ad7a231ea9 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 7119a064ea7b45f9fe43f26512523287c90b6f73..d0c01d7af24310564bbd17d19fab6371296fbc66 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 76fb3130d2a4a8759ed04d07bce8ca19e2f322e5..f9750ec2d72ec13abb50c47781a9d3e655265191 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 diff --git a/graph_framework/timing.hpp b/graph_framework/timing.hpp index 5303dbc0cd23aba4236b6530cefe9c8f44fec78d..a8c4d1eeb91f1f06695a47f6e3dd046368d335b4 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; + } }; }