mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Merge pull request #2 from demroz/working_differentiation
Working differentiation
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -28,3 +28,6 @@ cmake-build-debug/*
|
||||
build.ninja
|
||||
.ninja*
|
||||
a.out
|
||||
include/boost/math/differentiation/build/
|
||||
include/boost/math/differentiation/build/*
|
||||
|
||||
|
||||
455
CMakeLists.txt.user
Normal file
455
CMakeLists.txt.user
Normal file
@@ -0,0 +1,455 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 15.0.0, 2025-07-29T09:00:48. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{ffc14226-ab71-4806-b0f4-12ccb1245f00}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="qlonglong">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.LineEndingBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="int" key="EditorConfiguration.PreferAfterWhitespaceComments">0</value>
|
||||
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">2</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||
</valuemap>
|
||||
<value type="bool" key="AutoTest.ApplyFilter">false</value>
|
||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||
<valuelist type="QVariantList" key="AutoTest.PathFilters"/>
|
||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">4</value>
|
||||
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 6.8.1 for macOS</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 6.8.1 for macOS</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.681.clang_64_kit</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="CMake.Build.Type">Debug</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/build/Qt_6_8_1_for_macOS-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="CMake.Build.Type">Release</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/build/Qt_6_8_1_for_macOS-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/build/Qt_6_8_1_for_macOS-RelWithDebInfo</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
|
||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/build/Qt_6_8_1_for_macOS-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.4">
|
||||
<value type="QString" key="CMake.Build.Type">MinSizeRel</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/build/Qt_6_8_1_for_macOS-MinSizeRel</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">5</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString"></value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ApplicationManagerPlugin.Deploy.CMakePackageStep</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="QString" key="ApplicationManagerPlugin.Deploy.InstallPackageStep.Arguments">install-package --acknowledge</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Install Application Manager package</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ApplicationManagerPlugin.Deploy.InstallPackageStep</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedHosts"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedRemotePaths"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedSysroots"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ApplicationManagerPlugin.Deploy.Configuration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph dwarf,4096 -F 250</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="qlonglong">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
Binary file not shown.
52
include/boost/math/differentiation/CMakeLists.txt
Normal file
52
include/boost/math/differentiation/CMakeLists.txt
Normal file
@@ -0,0 +1,52 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS YES)
|
||||
set(THIS autodiff_reverse)
|
||||
|
||||
project(autodiff_reverse C CXX)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
enable_testing()#
|
||||
# add_compile_options(-fsanitize=address)
|
||||
# add_link_options(-fsanitize=address)
|
||||
set(BOOST_ROOT_DIRECTORY /Users/mzhelyez/Documents/code/boost/)
|
||||
set(BOOST_MATH_DIRECTORY ${BOOST_ROOT_DIRECTORY}/libs/math/)
|
||||
set(BOOST_MATH_TEST_DIRECTORY ${BOOST_MATH_DIRECTORY}test/)
|
||||
|
||||
set(BOOST_MATH_EXAMPLE_DIRECTORY ${BOOST_MATH_DIRECTORY}/example)
|
||||
include_directories(${BOOST_MATH_DIRECTORY}include
|
||||
${BOOST_ROOT_DIRECTORY}
|
||||
)
|
||||
|
||||
|
||||
set(HEADERS
|
||||
${CMAKE_SOURCE_DIR}/autodiff_reverse.hpp
|
||||
${BOOST_MATH_TEST_DIRECTORY}test_autodiff_reverse.hpp
|
||||
)
|
||||
|
||||
set(TEST_MEMORY_ALLOCATORS
|
||||
${BOOST_MATH_TEST_DIRECTORY}test_autodiff_reverse_flat_linear_allocator.cpp
|
||||
)
|
||||
|
||||
set(TEST_CONSTRUCTORS
|
||||
${BOOST_MATH_TEST_DIRECTORY}test_rvar_constructors.cpp
|
||||
)
|
||||
|
||||
set(TEST_COMPARISON_OPS
|
||||
${BOOST_MATH_TEST_DIRECTORY}test_comparison_operators.cpp
|
||||
)
|
||||
|
||||
set(TEST_STL_SUPPORT
|
||||
${BOOST_MATH_TEST_DIRECTORY}test_stl_support.cpp
|
||||
)
|
||||
SET(TEST_BASIC_OPS ${BOOST_MATH_TEST_DIRECTORY}test_autodiff_basic_math_ops.cpp)
|
||||
SET(TEST_ADDITIONAL_BOOST_FUNCTIONS ${BOOST_MATH_TEST_DIRECTORY}test_autodiff_reverse_additional_boost_functions.cpp)
|
||||
SET(LINEAR_REGRESSION_EXAMPLE ${BOOST_MATH_EXAMPLE_DIRECTORY}/reverse_mode_linear_regression_example.cpp)
|
||||
# add_executable(autodiff_reverse_tests ${TEST_CONSTRUCTORS} ${HEADERS})
|
||||
# add_executable(autodiff_reverse_tests ${TEST_MEMORY_ALLOCATORS} ${HEADERS})
|
||||
# add_executable(autodiff_reverse_tests ${TEST_BASIC_OPS} ${HEADERS})
|
||||
# add_executable(autodiff_reverse_tests ${TEST_COMPARISON_OPS} ${HEADERS})
|
||||
# add_executable(autodiff_reverse_tests ${TEST_STL_SUPPORT} ${HEADERS})
|
||||
# add_executable(autodiff_reverse_tests
|
||||
# ${TEST_ADDITIONAL_BOOST_FUNCTIONS}
|
||||
# ${HEADERS})
|
||||
add_executable(autodiff_reverse_tests ${LINEAR_REGRESSION_EXAMPLE} ${HEADERS})
|
||||
457
include/boost/math/differentiation/CMakeLists.txt.user
Normal file
457
include/boost/math/differentiation/CMakeLists.txt.user
Normal file
@@ -0,0 +1,457 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 15.0.0, 2025-08-04T14:54:43. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{ffc14226-ab71-4806-b0f4-12ccb1245f00}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="qlonglong">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.LineEndingBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="int" key="EditorConfiguration.PreferAfterWhitespaceComments">0</value>
|
||||
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">2</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||
</valuemap>
|
||||
<value type="bool" key="AutoTest.ApplyFilter">false</value>
|
||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||
<valuelist type="QVariantList" key="AutoTest.PathFilters"/>
|
||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">4</value>
|
||||
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 6.8.1 for macOS</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 6.8.1 for macOS</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.681.clang_64_kit</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="CMake.Build.Type">Debug</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Qt_6_8_1_for_macOS-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="CMake.Build.Type">Release</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Qt_6_8_1_for_macOS-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Qt_6_8_1_for_macOS-RelWithDebInfo</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
|
||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Qt_6_8_1_for_macOS-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.4">
|
||||
<value type="QString" key="CMake.Build.Type">MinSizeRel</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Qt_6_8_1_for_macOS-MinSizeRel</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">5</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString"></value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ApplicationManagerPlugin.Deploy.CMakePackageStep</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="QString" key="ApplicationManagerPlugin.Deploy.InstallPackageStep.Arguments">install-package --acknowledge</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Install Application Manager package</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ApplicationManagerPlugin.Deploy.InstallPackageStep</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedHosts"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedRemotePaths"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedSysroots"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ApplicationManagerPlugin.Deploy.Configuration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph dwarf,4096 -F 250</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">autodiff_reverse_tests</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">autodiff_reverse_tests</value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/Users/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Qt_6_8_1_for_macOS-Debug</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="qlonglong">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
367
include/boost/math/differentiation/CMakeLists.txt.user.e6619c4
Normal file
367
include/boost/math/differentiation/CMakeLists.txt.user.e6619c4
Normal file
@@ -0,0 +1,367 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 13.0.0, 2025-07-28T19:08:23. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{e6619c4f-7f68-4110-89de-37923deeee14}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="qlonglong">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="int" key="EditorConfiguration.PreferAfterWhitespaceComments">0</value>
|
||||
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">2</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">10</value>
|
||||
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Imported Kit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Imported Kit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{d52c5e1b-ba1c-4a3d-8439-44355cfcc9f6}</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="CMake.Build.Type">Build</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Unix Makefiles
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="CMake.Source.Directory">/home/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="CMake.Build.Type">Debug</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Unix Makefiles
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Imported_Kit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="CMake.Build.Type">Release</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Unix Makefiles
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Imported_Kit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
|
||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Unix Makefiles
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Imported_Kit-RelWithDebInfo</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">4</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph dwarf,4096 -F 250</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">autodiff_reverse_tests</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.autodiff_reverse_tests</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">autodiff_reverse_tests</value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Imported_Kit-Debug</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="qlonglong">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
455
include/boost/math/differentiation/CMakeLists.txt.user.ffc1422
Normal file
455
include/boost/math/differentiation/CMakeLists.txt.user.ffc1422
Normal file
@@ -0,0 +1,455 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 15.0.0, 2025-07-29T09:02:30. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{ffc14226-ab71-4806-b0f4-12ccb1245f00}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="qlonglong">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.LineEndingBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="int" key="EditorConfiguration.PreferAfterWhitespaceComments">0</value>
|
||||
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">2</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||
</valuemap>
|
||||
<value type="bool" key="AutoTest.ApplyFilter">false</value>
|
||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||
<valuelist type="QVariantList" key="AutoTest.PathFilters"/>
|
||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">4</value>
|
||||
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 6.8.1 for macOS</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 6.8.1 for macOS</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.681.clang_64_kit</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="CMake.Build.Type">Debug</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Qt_6_8_1_for_macOS-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="CMake.Build.Type">Release</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Qt_6_8_1_for_macOS-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Qt_6_8_1_for_macOS-RelWithDebInfo</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
|
||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Qt_6_8_1_for_macOS-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.4">
|
||||
<value type="QString" key="CMake.Build.Type">MinSizeRel</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/mzhelyez/Documents/code/boost/libs/math/include/boost/math/differentiation/build/Qt_6_8_1_for_macOS-MinSizeRel</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">5</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString"></value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ApplicationManagerPlugin.Deploy.CMakePackageStep</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="QString" key="ApplicationManagerPlugin.Deploy.InstallPackageStep.Arguments">install-package --acknowledge</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Install Application Manager package</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ApplicationManagerPlugin.Deploy.InstallPackageStep</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedHosts"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedRemotePaths"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedSysroots"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ApplicationManagerPlugin.Deploy.Configuration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph dwarf,4096 -F 250</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="qlonglong">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
2895
include/boost/math/differentiation/autodiff_reverse.hpp
Normal file
2895
include/boost/math/differentiation/autodiff_reverse.hpp
Normal file
File diff suppressed because it is too large
Load Diff
10295
include/boost/math/differentiation/my_stash.patch
Normal file
10295
include/boost/math/differentiation/my_stash.patch
Normal file
File diff suppressed because it is too large
Load Diff
1155
include/boost/math/differentiation/stashed_copy.hpp
Normal file
1155
include/boost/math/differentiation/stashed_copy.hpp
Normal file
File diff suppressed because it is too large
Load Diff
17
include/boost/math/differentiation/test_fwdiff_behavior.cpp
Normal file
17
include/boost/math/differentiation/test_fwdiff_behavior.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "autodiff.hpp"
|
||||
#include<iostream>
|
||||
|
||||
using namespace boost::math::differentiation;
|
||||
|
||||
double myabs(double x)
|
||||
{
|
||||
return (x>0) - (x<0);
|
||||
}
|
||||
int main()
|
||||
{
|
||||
float y = -0.26647448539733887;
|
||||
float z = 0.8725948333740234;
|
||||
float w = abs(y);
|
||||
std::cout<<w<<std::endl;
|
||||
return 0;
|
||||
}
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <boost/math/special_functions/trunc.hpp>
|
||||
#include <boost/math/tools/promotion.hpp>
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
#include <boost/math/differentiation/autodiff_reverse.hpp>
|
||||
|
||||
namespace boost{ namespace math{ namespace detail{
|
||||
|
||||
@@ -94,7 +95,6 @@ inline typename tools::promote_args<T>::type sin_pi(T x)
|
||||
{
|
||||
return boost::math::sin_pi(x, policies::policy<>());
|
||||
}
|
||||
|
||||
} // namespace math
|
||||
} // namespace boost
|
||||
|
||||
|
||||
@@ -1357,6 +1357,11 @@ test-suite autodiff :
|
||||
[ compile compile_test/diff_lanczos_smoothing_incl_test.cpp : <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj <debug-symbols>off <toolset>msvc:<cxxflags>/bigobj release [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : <build>no ] [ requires cxx11_inline_namespaces ] ]
|
||||
;
|
||||
|
||||
test-suite autodiff_reverse_specific :
|
||||
# This rule compiles and runs your specific test file.
|
||||
# The arguments replicate the common settings for Boost.Math tests.
|
||||
[ run my_autodiff_reverse_test.cpp /boost/test//boost_unit_test_framework : : : <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj <debug-symbols>off <toolset>msvc:<cxxflags>/bigobj release $(float128_type) [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : <build>no ] [ requires cxx11_inline_namespaces ] ]
|
||||
;
|
||||
#
|
||||
# These tests are run by default when you invoke the Jamfile, but
|
||||
# they are deliberately NOT run from the CI scripts as they soak up
|
||||
|
||||
6
test/autodiff_reverse_test0.cpp
Normal file
6
test/autodiff_reverse_test0.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <boost/math/differentiation/autodiff_reverse.hpp>
|
||||
#include <iostream>
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
92
test/generate_cpp_derivative_expr.py
Normal file
92
test/generate_cpp_derivative_expr.py
Normal file
@@ -0,0 +1,92 @@
|
||||
from sympy import symbols, simplify, ccode
|
||||
from sympy.tensor.array import derive_by_array
|
||||
import sys
|
||||
|
||||
def generate_cpp_tensor(expr, vars, order):
|
||||
derivatives = expr
|
||||
for _ in range(order):
|
||||
derivatives = derive_by_array(derivatives, vars)
|
||||
|
||||
# Flatten tensor for variable assignment
|
||||
def flatten(tensor):
|
||||
if not hasattr(tensor, '__iter__') or isinstance(tensor, (str, bytes)):
|
||||
return [tensor]
|
||||
if hasattr(tensor, 'tolist'):
|
||||
tensor = tensor.tolist()
|
||||
flat_list = []
|
||||
for e in tensor:
|
||||
flat_list.extend(flatten(e))
|
||||
return flat_list
|
||||
|
||||
flat_derivs = flatten(derivatives)
|
||||
|
||||
# Generate multi-indices for all tensor elements
|
||||
def generate_indices(d, order):
|
||||
if order == 0:
|
||||
return [[]]
|
||||
else:
|
||||
smaller = generate_indices(d, order - 1)
|
||||
return [s + [i] for s in smaller for i in range(d)]
|
||||
|
||||
all_indices = generate_indices(len(vars), order)
|
||||
|
||||
# Generate variable names like f_x, f_xy, f_xyz, etc.
|
||||
var_names = []
|
||||
for idx in all_indices:
|
||||
suffix = ''.join(str(vars[i]) for i in idx)
|
||||
var_names.append(f"f_{suffix}")
|
||||
|
||||
# Assign each derivative to a separate variable
|
||||
code_lines = []
|
||||
for var_name, expr in zip(var_names, flat_derivs):
|
||||
simplified = simplify(expr)
|
||||
c_expr = ccode(simplified)
|
||||
code_lines.append(f" T {var_name} = static_cast<T>({c_expr});")
|
||||
|
||||
# Now build nested vector initialization recursively matching the shape of derivatives
|
||||
def build_nested_vector(tensor, level=0, index_start=0):
|
||||
if level == order:
|
||||
# At the scalar level, return the variable name at flat index
|
||||
return var_names[index_start], 1
|
||||
else:
|
||||
# tensor is iterable, build vector of sub-elements
|
||||
if hasattr(tensor, 'tolist'):
|
||||
tensor = tensor.tolist()
|
||||
elems = []
|
||||
count = 0
|
||||
for t in tensor:
|
||||
s, c = build_nested_vector(t, level+1, index_start + count)
|
||||
elems.append(s)
|
||||
count += c
|
||||
return '{ ' + ', '.join(elems) + ' }', count
|
||||
|
||||
nested_vector_str, _ = build_nested_vector(derivatives)
|
||||
|
||||
# Compose return type string depending on order
|
||||
def vector_type(level):
|
||||
if level == 0:
|
||||
return "T"
|
||||
else:
|
||||
return f"std::vector<{vector_type(level-1)}>"
|
||||
|
||||
return_type = vector_type(order)
|
||||
|
||||
# Compose final C++ function body with separate variable assignments and nested return vector
|
||||
body = '\n'.join(code_lines) + f'\n return {nested_vector_str};'
|
||||
|
||||
return return_type, body
|
||||
|
||||
if __name__ == "__main__":
|
||||
x, y, z = symbols('x y z')
|
||||
vars = [x, y]
|
||||
f = x*x*x*x*y*y*y*y
|
||||
order = int(sys.argv[1]) if len(sys.argv) > 1 else 2
|
||||
|
||||
print(f"// Order-{order} derivative of f(x, y) = {f}")
|
||||
|
||||
ret_type, func_body = generate_cpp_tensor(f, vars, order)
|
||||
|
||||
print(f"template<typename T>")
|
||||
print(f"{ret_type} gf_a(T x, T y) {{")
|
||||
print(func_body)
|
||||
print("}")
|
||||
57
test/generate_cpp_derivative_expr.py~
Normal file
57
test/generate_cpp_derivative_expr.py~
Normal file
@@ -0,0 +1,57 @@
|
||||
from sympy import quo
|
||||
from sympy import symbols, simplify, ccode
|
||||
from sympy.tensor.array import derive_by_array
|
||||
import sys
|
||||
|
||||
def generate_cpp_tensor(expr, vars, order):
|
||||
derivatives = expr
|
||||
for _ in range(order):
|
||||
derivatives = derive_by_array(derivatives, vars)
|
||||
|
||||
def flatten(tensor):
|
||||
if not hasattr(tensor, '__iter__') or isinstance(tensor, (str, bytes)):
|
||||
return [tensor]
|
||||
if hasattr(tensor, 'tolist'):
|
||||
tensor = tensor.tolist()
|
||||
flat_list = []
|
||||
for e in tensor:
|
||||
flat_list.extend(flatten(e))
|
||||
return flat_list
|
||||
|
||||
flat_derivs = flatten(derivatives)
|
||||
|
||||
def index_to_suffix(idx):
|
||||
return ''.join([str(vars[i]) for i in idx])
|
||||
|
||||
def generate_indices(d, order):
|
||||
if order == 0:
|
||||
return [[]]
|
||||
else:
|
||||
smaller = generate_indices(d, order - 1)
|
||||
return [s + [i] for s in smaller for i in range(d)]
|
||||
|
||||
all_indices = generate_indices(len(vars), order)
|
||||
|
||||
var_names = []
|
||||
for idx in all_indices:
|
||||
suffix = ''.join(str(vars[i]) for i in idx)
|
||||
var_names.append(f"f_{suffix}")
|
||||
code_lines = []
|
||||
for var_name, expr in zip(var_names, flat_derivs):
|
||||
simplified = simplify(expr)
|
||||
c_expr = ccode(simplified)
|
||||
code_lines.append(f" T {var_name} = static_cast<T>({c_expr});")
|
||||
return_line = " return { " + ', '.join(var_names) + " };"
|
||||
return '\n'.join(code_lines) + '\n' + return_line
|
||||
|
||||
if __name__ == "__main__":
|
||||
x, y, z = symbols('x y z')
|
||||
vars = [x, y]
|
||||
f = x/(y+x)*y/(x-y)
|
||||
order = int(sys.argv[1]) if len(sys.argv) > 1 else 2
|
||||
|
||||
print(f"// Order-{order} derivative of f(x, y, z) = {f}")
|
||||
print("template<typename T>")
|
||||
print("std::vector<T> gf_a(T x, T y) {")
|
||||
print(generate_cpp_tensor(f, vars, order))
|
||||
print("}")
|
||||
93
test/generate_cpp_derivative_expr2.py
Normal file
93
test/generate_cpp_derivative_expr2.py
Normal file
@@ -0,0 +1,93 @@
|
||||
from sympy import symbols, simplify, ccode
|
||||
from sympy.tensor.array import derive_by_array
|
||||
import sys
|
||||
import math
|
||||
import sympy
|
||||
def generate_cpp_tensor(expr, vars, order):
|
||||
derivatives = expr
|
||||
for _ in range(order):
|
||||
derivatives = derive_by_array(derivatives, vars)
|
||||
|
||||
# Flatten tensor for variable assignment
|
||||
def flatten(tensor):
|
||||
if not hasattr(tensor, '__iter__') or isinstance(tensor, (str, bytes)):
|
||||
return [tensor]
|
||||
if hasattr(tensor, 'tolist'):
|
||||
tensor = tensor.tolist()
|
||||
flat_list = []
|
||||
for e in tensor:
|
||||
flat_list.extend(flatten(e))
|
||||
return flat_list
|
||||
|
||||
flat_derivs = flatten(derivatives)
|
||||
|
||||
# Generate multi-indices for all tensor elements
|
||||
def generate_indices(d, order):
|
||||
if order == 0:
|
||||
return [[]]
|
||||
else:
|
||||
smaller = generate_indices(d, order - 1)
|
||||
return [s + [i] for s in smaller for i in range(d)]
|
||||
|
||||
all_indices = generate_indices(len(vars), order)
|
||||
|
||||
# Generate variable names like f_x, f_xy, f_xyz, etc.
|
||||
var_names = []
|
||||
for idx in all_indices:
|
||||
suffix = ''.join(str(vars[i]) for i in idx)
|
||||
var_names.append(f"f_{suffix}")
|
||||
|
||||
# Assign each derivative to a separate variable
|
||||
code_lines = []
|
||||
for var_name, expr in zip(var_names, flat_derivs):
|
||||
simplified = simplify(expr)
|
||||
c_expr = ccode(simplified)
|
||||
code_lines.append(f" T {var_name} = static_cast<T>({c_expr});")
|
||||
|
||||
# Now build nested vector initialization recursively matching the shape of derivatives
|
||||
def build_nested_vector(tensor, level=0, index_start=0):
|
||||
if level == order:
|
||||
# At the scalar level, return the variable name at flat index
|
||||
return var_names[index_start], 1
|
||||
else:
|
||||
# tensor is iterable, build vector of sub-elements
|
||||
if hasattr(tensor, 'tolist'):
|
||||
tensor = tensor.tolist()
|
||||
elems = []
|
||||
count = 0
|
||||
for t in tensor:
|
||||
s, c = build_nested_vector(t, level+1, index_start + count)
|
||||
elems.append(s)
|
||||
count += c
|
||||
return '{ ' + ', '.join(elems) + ' }', count
|
||||
|
||||
nested_vector_str, _ = build_nested_vector(derivatives)
|
||||
|
||||
# Compose return type string depending on order
|
||||
def vector_type(level):
|
||||
if level == 0:
|
||||
return "T"
|
||||
else:
|
||||
return f"std::vector<{vector_type(level-1)}>"
|
||||
|
||||
return_type = vector_type(order)
|
||||
|
||||
# Compose final C++ function body with separate variable assignments and nested return vector
|
||||
body = '\n'.join(code_lines) + f'\n return {nested_vector_str};'
|
||||
|
||||
return return_type, body
|
||||
|
||||
if __name__ == "__main__":
|
||||
x, y, z = symbols('x y z')
|
||||
vars = [x, y]
|
||||
f = sympy.log(1+sympy.sqrt(x**2))*sympy.exp(y) + sympy.Pow(x+y,2.5) - sympy.sqrt(1+x*y)
|
||||
order = int(sys.argv[1]) if len(sys.argv) > 1 else 2
|
||||
|
||||
print(f"// Order-{order} derivative of f(x, y) = {f}")
|
||||
|
||||
ret_type, func_body = generate_cpp_tensor(f, vars, order)
|
||||
|
||||
print(f"template<typename T>")
|
||||
print(f"{ret_type} gf_a(T x, T y) {{")
|
||||
print(func_body)
|
||||
print("}")
|
||||
99
test/my_autodiff_reverse_test.cpp
Normal file
99
test/my_autodiff_reverse_test.cpp
Normal file
@@ -0,0 +1,99 @@
|
||||
#include <iostream>
|
||||
// Include your specific autodiff_reverse.hpp header
|
||||
// Make sure the path is correct relative to Boost's include directories.
|
||||
// Given its location in boost/math/differentiation/, this should resolve correctly.
|
||||
#include <boost/math/differentiation/autodiff_reverse.hpp>
|
||||
#include <boost/core/lightweight_test.hpp> // For Boost's simple test assertions
|
||||
#include <cmath> // For std::pow, std::sin, etc.
|
||||
|
||||
// A simple function to test (e.g., f(x) = x^3)
|
||||
template <typename T>
|
||||
T my_function(T const& x) {
|
||||
return x * x * x;
|
||||
}
|
||||
|
||||
// You will define your own reverse-mode AD function or adapt existing ones.
|
||||
// This is a conceptual placeholder, as the exact API of autodiff_reverse.hpp
|
||||
// might be specific to your implementation for true reverse-mode AD.
|
||||
// For example, it might involve a 'variable' type and a 'propagate_reverse' method.
|
||||
|
||||
// Example of a test case
|
||||
void test_autodiff_reverse_my_function() {
|
||||
std::cout << "Running test_autodiff_reverse_my_function..." << std::endl;
|
||||
|
||||
double x_val = 2.0;
|
||||
|
||||
// *** IMPORTANT: The following is a placeholder for your actual autodiff_reverse.hpp usage. ***
|
||||
// You will replace this with how your autodiff_reverse.hpp is designed to compute derivatives.
|
||||
// For demonstration, let's assume it provides a way to get the derivative.
|
||||
|
||||
// Example using a conceptual reverse_var (replace with your actual AD type)
|
||||
// This is highly speculative based on common AD patterns.
|
||||
// If your autodiff_reverse.hpp exposes an fvar-like interface for simple derivative extraction,
|
||||
// you might use something similar to Boost's forward-mode `autodiff.hpp`.
|
||||
// You might need to declare a specific type for reverse AD variables, e.g.:
|
||||
// boost::math::differentiation::reverse_var<double> x_rev(x_val);
|
||||
// boost::math::differentiation::reverse_var<double> y_rev = my_function(x_rev);
|
||||
// y_rev.compute_gradients(); // Or similar method to backpropagate
|
||||
|
||||
// For a simple test, let's just make sure it compiles and a basic derivative can be conceptually checked.
|
||||
// If your autodiff_reverse.hpp indeed provides an interface for `fvar`, use that.
|
||||
// Otherwise, you'll need to implement the specific reverse-mode setup.
|
||||
|
||||
// Placeholder: Assuming `autodiff_reverse.hpp` allows you to extract derivatives
|
||||
// similar to `boost::math::differentiation::fvar` (which is forward mode).
|
||||
// Adapt this to your actual reverse AD API.
|
||||
try {
|
||||
// This line will trigger compilation errors if autodiff_reverse.hpp's API isn't compatible.
|
||||
// Replace `make_fvar<double, 1>` with your actual reverse AD variable creation.
|
||||
// A common reverse AD pattern would be:
|
||||
// 1. Create independent variables.
|
||||
// 2. Compute dependent variables.
|
||||
// 3. Backpropagate to get gradients.
|
||||
|
||||
// As a simplified example, let's assume a function `get_derivative_from_reverse_ad`
|
||||
// that you would implement using your autodiff_reverse.hpp.
|
||||
// In a real scenario, you'd use the types and functions provided by your `autodiff_reverse.hpp`.
|
||||
|
||||
// For now, let's use a very basic check that the header is included.
|
||||
// This test is minimal and assumes no specific AD API without user input.
|
||||
// You'll fill this with actual reverse AD logic.
|
||||
|
||||
// Manual calculation for verification
|
||||
double expected_value = std::pow(x_val, 3);
|
||||
double expected_derivative = 3 * std::pow(x_val, 2); // Derivative of x^3 is 3x^2
|
||||
|
||||
std::cout << "Expected value of f(" << x_val << ") = " << expected_value << std::endl;
|
||||
std::cout << "Expected derivative of f(" << x_val << ") = " << expected_derivative << std::endl;
|
||||
|
||||
// This is where your actual autodiff_reverse.hpp usage would go.
|
||||
// Example:
|
||||
// auto ad_x = boost::math::differentiation::make_reverse_ad_variable(x_val); // Hypothetical
|
||||
// auto ad_y = my_function(ad_x);
|
||||
// ad_y.propagate_gradients(); // Hypothetical
|
||||
// BOOST_TEST_EQ(ad_y.value(), expected_value);
|
||||
// BOOST_TEST_EQ(ad_x.gradient(), expected_derivative);
|
||||
|
||||
// Since we don't have the exact API, let's just assert something simple to make the test pass compilation.
|
||||
// You MUST replace this with actual autodiff_reverse.hpp logic.
|
||||
BOOST_TEST_GT(x_val, 0.0); // Simple placeholder assertion to make test compile
|
||||
|
||||
// Example of how you would assert with actual AD results:
|
||||
// if (your_ad_calculated_value == expected_value && your_ad_calculated_derivative == expected_derivative) {
|
||||
// std::cout << "Autodiff results match expected values!" << std::endl;
|
||||
// } else {
|
||||
// std::cerr << "Autodiff results DO NOT match expected values!" << std::endl;
|
||||
// BOOST_ERROR("Autodiff mismatch");
|
||||
// }
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "Exception during test: " << e.what() << std::endl;
|
||||
BOOST_ERROR("Exception occurred during test.");
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
test_autodiff_reverse_my_function();
|
||||
|
||||
return boost::report_errors(); // Reports any failed BOOST_TEST assertions
|
||||
}
|
||||
415
test/test_autodiff_basic_math_ops.cpp
Normal file
415
test/test_autodiff_basic_math_ops.cpp
Normal file
@@ -0,0 +1,415 @@
|
||||
/*#include <boost/math/differentiation/autodiff_reverse.hpp>
|
||||
using namespace boost::math::differentiation::reverse_mode;
|
||||
int main()
|
||||
{
|
||||
rvar<double,1> x = 1.5;
|
||||
auto z = x*x*x*x*x;
|
||||
rvar<double,1>zz(z);
|
||||
zz.backward();
|
||||
std::cout<<x.adjoint()<<std::endl;
|
||||
}*/
|
||||
|
||||
#include "test_autodiff_reverse.hpp"
|
||||
#include <vector>
|
||||
BOOST_AUTO_TEST_SUITE(test_basic_math_ops)
|
||||
|
||||
using namespace rdiff;
|
||||
template<typename T>
|
||||
T test_add(T x[5])
|
||||
{
|
||||
return x[0] + x[1] + x[2] + x[3] + x[4];
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(addition, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x1_v = rng.next();
|
||||
T x2_v = rng.next();
|
||||
T test_rvar_p_rvar_v = x1_v + x2_v;
|
||||
|
||||
rvar<T, 1> x1 = x1_v;
|
||||
rvar<T, 1> x2 = x2_v;
|
||||
|
||||
rvar<T, 1> test_rvar_p_rvar = x1 + x2;
|
||||
rvar<T, 1> test_rvar_p_float = x1 + x2_v;
|
||||
rvar<T, 1> test_float_p_rvar = x1_v + x2;
|
||||
BOOST_REQUIRE_EQUAL(test_rvar_p_rvar_v, test_rvar_p_rvar.item());
|
||||
BOOST_REQUIRE_EQUAL(test_rvar_p_rvar_v, test_rvar_p_float.item());
|
||||
BOOST_REQUIRE_EQUAL(test_float_p_rvar.item(), test_rvar_p_rvar_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
test_rvar_p_rvar.backward();
|
||||
BOOST_REQUIRE_EQUAL(x1.adjoint(), 1.0);
|
||||
BOOST_REQUIRE_EQUAL(x2.adjoint(), 1.0);
|
||||
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> z = x1 + x1 + x1 + x1 + x1;
|
||||
z.backward();
|
||||
BOOST_REQUIRE_EQUAL(x1.adjoint(), 5.0);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(multiplication, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x1_v = rng.next();
|
||||
T x2_v = rng.next();
|
||||
T test_rvar_p_rvar_v = x1_v * x2_v;
|
||||
|
||||
rvar<T, 1> x1 = x1_v;
|
||||
rvar<T, 1> x2 = x2_v;
|
||||
|
||||
rvar<T, 1> test_rvar_p_rvar = x1 * x2;
|
||||
rvar<T, 1> test_rvar_p_float = x1 * x2_v;
|
||||
rvar<T, 1> test_float_p_rvar = x1_v * x2;
|
||||
|
||||
BOOST_REQUIRE_EQUAL(test_rvar_p_rvar_v, test_rvar_p_rvar.item());
|
||||
BOOST_REQUIRE_EQUAL(test_rvar_p_rvar_v, test_rvar_p_float.item());
|
||||
BOOST_REQUIRE_EQUAL(test_float_p_rvar.item(), test_rvar_p_rvar_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
test_rvar_p_rvar.backward();
|
||||
BOOST_REQUIRE_EQUAL(x1.adjoint(), x2_v);
|
||||
BOOST_REQUIRE_EQUAL(x2.adjoint(), x1_v);
|
||||
|
||||
tape.zero_grad();
|
||||
auto z = x1 * x1 * x1 * x1 * x1;
|
||||
rvar<T, 1> zz(z);
|
||||
zz.backward();
|
||||
BOOST_REQUIRE_CLOSE(x1.adjoint(), 5 * x1_v * x1_v * x1_v * x1_v, boost_close_tol<T>());
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(minus, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x1_v = rng.next();
|
||||
T x2_v = rng.next();
|
||||
T test_rvar_p_rvar_v = x1_v - x2_v;
|
||||
|
||||
rvar<T, 1> x1 = x1_v;
|
||||
rvar<T, 1> x2 = x2_v;
|
||||
|
||||
rvar<T, 1> test_rvar_p_rvar = x1 - x2;
|
||||
rvar<T, 1> test_rvar_p_float = x1 - x2_v;
|
||||
rvar<T, 1> test_float_p_rvar = x1_v - x2;
|
||||
|
||||
BOOST_REQUIRE_EQUAL(test_rvar_p_rvar_v, test_rvar_p_rvar.item());
|
||||
BOOST_REQUIRE_EQUAL(test_rvar_p_rvar_v, test_rvar_p_float.item());
|
||||
BOOST_REQUIRE_EQUAL(test_float_p_rvar.item(), test_rvar_p_rvar_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
test_rvar_p_rvar.backward();
|
||||
BOOST_REQUIRE_EQUAL(x1.adjoint(), 1.0);
|
||||
BOOST_REQUIRE_EQUAL(x2.adjoint(), -1.0);
|
||||
|
||||
tape.zero_grad();
|
||||
auto z = -x1 - x1 - x1 - x1 - x1;
|
||||
rvar<T, 1> zz(z);
|
||||
zz.backward();
|
||||
BOOST_REQUIRE_CLOSE(x1.adjoint(), -5, boost_close_tol<T>());
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(division, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-1, 1};
|
||||
T x1_v = rng.next();
|
||||
T x2_v = rng.next();
|
||||
T test_rvar_p_rvar_v = x1_v / x2_v;
|
||||
|
||||
rvar<T, 1> x1 = x1_v;
|
||||
rvar<T, 1> x2 = x2_v;
|
||||
|
||||
rvar<T, 1> test_rvar_p_rvar = x1 / x2;
|
||||
rvar<T, 1> test_rvar_p_float = x1 / x2_v;
|
||||
rvar<T, 1> test_float_p_rvar = x1_v / x2;
|
||||
|
||||
BOOST_REQUIRE_EQUAL(test_rvar_p_rvar_v, test_rvar_p_rvar.item());
|
||||
BOOST_REQUIRE_EQUAL(test_rvar_p_rvar_v, test_rvar_p_float.item());
|
||||
BOOST_REQUIRE_EQUAL(test_float_p_rvar.item(), test_rvar_p_rvar_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
test_rvar_p_rvar.backward();
|
||||
BOOST_REQUIRE_CLOSE(x1.adjoint(), 1.0 / x2_v, boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(x2.adjoint(), -x1_v / (x2_v * x2_v), boost_close_tol<T>());
|
||||
|
||||
tape.zero_grad();
|
||||
auto z = 2.0 / x1 / x1 / x1 / x1 / x1;
|
||||
rvar<T, 1> zz(z);
|
||||
zz.backward();
|
||||
BOOST_REQUIRE_CLOSE(x1.adjoint(),
|
||||
-10 / (x1_v * x1_v * x1_v * x1_v * x1_v * x1_v),
|
||||
boost_close_tol<T>());
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
/* gradient test function */
|
||||
template<typename T>
|
||||
T f(T x, T y)
|
||||
{
|
||||
auto z1 = x / (y + x);
|
||||
auto z2 = y / (x - y);
|
||||
T f = z1 * z2;
|
||||
return f;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::vector<T> grad_f_a(T x, T y)
|
||||
{
|
||||
T f_x = static_cast<T>(y * (-pow(x, 2) - pow(y, 2))
|
||||
/ (pow(x, 4) - 2 * pow(x, 2) * pow(y, 2) + pow(y, 4)));
|
||||
T f_y = static_cast<T>(x * (pow(x, 2) + pow(y, 2))
|
||||
/ (pow(x, 4) - 2 * pow(x, 2) * pow(y, 2) + pow(y, 4)));
|
||||
return {f_x, f_y};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::vector<std::vector<T>> hess_f_a(T x, T y)
|
||||
{
|
||||
T f_xx = static_cast<T>(
|
||||
2 * x * y * (pow(x, 2) + 3 * pow(y, 2))
|
||||
/ (pow(x, 6) - 3 * pow(x, 4) * pow(y, 2) + 3 * pow(x, 2) * pow(y, 4) - pow(y, 6)));
|
||||
T f_xy = static_cast<T>(
|
||||
(-pow(x, 4) - 6 * pow(x, 2) * pow(y, 2) - pow(y, 4))
|
||||
/ (pow(x, 6) - 3 * pow(x, 4) * pow(y, 2) + 3 * pow(x, 2) * pow(y, 4) - pow(y, 6)));
|
||||
T f_yx = static_cast<T>(
|
||||
(-pow(x, 4) - 6 * pow(x, 2) * pow(y, 2) - pow(y, 4))
|
||||
/ (pow(x, 6) - 3 * pow(x, 4) * pow(y, 2) + 3 * pow(x, 2) * pow(y, 4) - pow(y, 6)));
|
||||
T f_yy = static_cast<T>(
|
||||
2 * x * y * (3 * pow(x, 2) + pow(y, 2))
|
||||
/ (pow(x, 6) - 3 * pow(x, 4) * pow(y, 2) + 3 * pow(x, 2) * pow(y, 4) - pow(y, 6)));
|
||||
return {{f_xx, f_xy}, {f_yx, f_yy}};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::vector<std::vector<std::vector<T>>> df_3_a(T x, T y)
|
||||
{
|
||||
T f_xxx = static_cast<T>(6 * y * (-pow(x, 4) - 6 * pow(x, 2) * pow(y, 2) - pow(y, 4))
|
||||
/ (pow(x, 8) - 4 * pow(x, 6) * pow(y, 2) + 6 * pow(x, 4) * pow(y, 4)
|
||||
- 4 * pow(x, 2) * pow(y, 6) + pow(y, 8)));
|
||||
T f_xxy = static_cast<T>(2 * x * (pow(x, 4) + 14 * pow(x, 2) * pow(y, 2) + 9 * pow(y, 4))
|
||||
/ (pow(x, 8) - 4 * pow(x, 6) * pow(y, 2) + 6 * pow(x, 4) * pow(y, 4)
|
||||
- 4 * pow(x, 2) * pow(y, 6) + pow(y, 8)));
|
||||
T f_xyx = static_cast<T>(2 * x * (pow(x, 4) + 14 * pow(x, 2) * pow(y, 2) + 9 * pow(y, 4))
|
||||
/ (pow(x, 8) - 4 * pow(x, 6) * pow(y, 2) + 6 * pow(x, 4) * pow(y, 4)
|
||||
- 4 * pow(x, 2) * pow(y, 6) + pow(y, 8)));
|
||||
T f_xyy = static_cast<T>(2 * y * (-9 * pow(x, 4) - 14 * pow(x, 2) * pow(y, 2) - pow(y, 4))
|
||||
/ (pow(x, 8) - 4 * pow(x, 6) * pow(y, 2) + 6 * pow(x, 4) * pow(y, 4)
|
||||
- 4 * pow(x, 2) * pow(y, 6) + pow(y, 8)));
|
||||
T f_yxx = static_cast<T>(2 * x * (pow(x, 4) + 14 * pow(x, 2) * pow(y, 2) + 9 * pow(y, 4))
|
||||
/ (pow(x, 8) - 4 * pow(x, 6) * pow(y, 2) + 6 * pow(x, 4) * pow(y, 4)
|
||||
- 4 * pow(x, 2) * pow(y, 6) + pow(y, 8)));
|
||||
T f_yxy = static_cast<T>(2 * y * (-9 * pow(x, 4) - 14 * pow(x, 2) * pow(y, 2) - pow(y, 4))
|
||||
/ (pow(x, 8) - 4 * pow(x, 6) * pow(y, 2) + 6 * pow(x, 4) * pow(y, 4)
|
||||
- 4 * pow(x, 2) * pow(y, 6) + pow(y, 8)));
|
||||
T f_yyx = static_cast<T>(2 * y * (-9 * pow(x, 4) - 14 * pow(x, 2) * pow(y, 2) - pow(y, 4))
|
||||
/ (pow(x, 8) - 4 * pow(x, 6) * pow(y, 2) + 6 * pow(x, 4) * pow(y, 4)
|
||||
- 4 * pow(x, 2) * pow(y, 6) + pow(y, 8)));
|
||||
T f_yyy = static_cast<T>(6 * x * (pow(x, 4) + 6 * pow(x, 2) * pow(y, 2) + pow(y, 4))
|
||||
/ (pow(x, 8) - 4 * pow(x, 6) * pow(y, 2) + 6 * pow(x, 4) * pow(y, 4)
|
||||
- 4 * pow(x, 2) * pow(y, 6) + pow(y, 8)));
|
||||
return {{{f_xxx, f_xxy}, {f_xyx, f_xyy}}, {{f_yxx, f_yxy}, {f_yyx, f_yyy}}};
|
||||
}
|
||||
template<typename T>
|
||||
std::vector<std::vector<std::vector<std::vector<T>>>> df_4_a(T x, T y)
|
||||
{
|
||||
T f_xxxx = static_cast<T>(24 * x * y * (pow(x, 4) + 10 * pow(x, 2) * pow(y, 2) + 5 * pow(y, 4))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8)
|
||||
- pow(y, 10)));
|
||||
T f_xxxy = static_cast<T>(
|
||||
6 * (-pow(x, 6) - 25 * pow(x, 4) * pow(y, 2) - 35 * pow(x, 2) * pow(y, 4) - 3 * pow(y, 6))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_xxyx = static_cast<T>(
|
||||
6 * (-pow(x, 6) - 25 * pow(x, 4) * pow(y, 2) - 35 * pow(x, 2) * pow(y, 4) - 3 * pow(y, 6))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_xxyy = static_cast<T>(
|
||||
(72 * pow(x, 5) * y + 240 * pow(x, 3) * pow(y, 3) + 72 * x * pow(y, 5))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_xyxx = static_cast<T>(
|
||||
6 * (-pow(x, 6) - 25 * pow(x, 4) * pow(y, 2) - 35 * pow(x, 2) * pow(y, 4) - 3 * pow(y, 6))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_xyxy = static_cast<T>(
|
||||
(72 * pow(x, 5) * y + 240 * pow(x, 3) * pow(y, 3) + 72 * x * pow(y, 5))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_xyyx = static_cast<T>(
|
||||
(72 * pow(x, 5) * y + 240 * pow(x, 3) * pow(y, 3) + 72 * x * pow(y, 5))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_xyyy = static_cast<T>(
|
||||
6 * (-3 * pow(x, 6) - 35 * pow(x, 4) * pow(y, 2) - 25 * pow(x, 2) * pow(y, 4) - pow(y, 6))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_yxxx = static_cast<T>(
|
||||
6 * (-pow(x, 6) - 25 * pow(x, 4) * pow(y, 2) - 35 * pow(x, 2) * pow(y, 4) - 3 * pow(y, 6))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_yxxy = static_cast<T>(
|
||||
(72 * pow(x, 5) * y + 240 * pow(x, 3) * pow(y, 3) + 72 * x * pow(y, 5))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_yxyx = static_cast<T>(
|
||||
(72 * pow(x, 5) * y + 240 * pow(x, 3) * pow(y, 3) + 72 * x * pow(y, 5))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_yxyy = static_cast<T>(
|
||||
6 * (-3 * pow(x, 6) - 35 * pow(x, 4) * pow(y, 2) - 25 * pow(x, 2) * pow(y, 4) - pow(y, 6))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_yyxx = static_cast<T>(
|
||||
(72 * pow(x, 5) * y + 240 * pow(x, 3) * pow(y, 3) + 72 * x * pow(y, 5))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_yyxy = static_cast<T>(
|
||||
6 * (-3 * pow(x, 6) - 35 * pow(x, 4) * pow(y, 2) - 25 * pow(x, 2) * pow(y, 4) - pow(y, 6))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_yyyx = static_cast<T>(
|
||||
6 * (-3 * pow(x, 6) - 35 * pow(x, 4) * pow(y, 2) - 25 * pow(x, 2) * pow(y, 4) - pow(y, 6))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8) - pow(y, 10)));
|
||||
T f_yyyy = static_cast<T>(24 * x * y * (5 * pow(x, 4) + 10 * pow(x, 2) * pow(y, 2) + pow(y, 4))
|
||||
/ (pow(x, 10) - 5 * pow(x, 8) * pow(y, 2) + 10 * pow(x, 6) * pow(y, 4)
|
||||
- 10 * pow(x, 4) * pow(y, 6) + 5 * pow(x, 2) * pow(y, 8)
|
||||
- pow(y, 10)));
|
||||
return {{{{f_xxxx, f_xxxy}, {f_xxyx, f_xxyy}}, {{f_xyxx, f_xyxy}, {f_xyyx, f_xyyy}}},
|
||||
{{{f_yxxx, f_yxxy}, {f_yxyx, f_yxyy}}, {{f_yyxx, f_yyxy}, {f_yyyx, f_yyyy}}}};
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(first_derivative, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-1, 1};
|
||||
T x = rng.next();
|
||||
T y = rng.next();
|
||||
|
||||
rvar<T, 1> x_ad = x;
|
||||
rvar<T, 1> y_ad = y;
|
||||
|
||||
T fv = f(x, y);
|
||||
rvar<T, 1> f_ad = f(x_ad, y_ad);
|
||||
auto grad_f_analytical = grad_f_a(x, y);
|
||||
/* intended use case */
|
||||
f_ad.backward();
|
||||
BOOST_REQUIRE_CLOSE(x_ad.adjoint(), grad_f_analytical[0], boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(y_ad.adjoint(), grad_f_analytical[1], boost_close_tol<T>());
|
||||
|
||||
gradient_tape<T, 1, BUFFER_SIZE>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
|
||||
/* grad test */
|
||||
auto grad_func_test_grad = grad(f_ad, &x_ad, &y_ad);
|
||||
/* grad_nd test */
|
||||
auto grad_nd_func_test_grad = grad_nd<1>(f_ad, &x_ad, &y_ad);
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
BOOST_REQUIRE_CLOSE(grad_func_test_grad[i], grad_f_analytical[i], boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(grad_nd_func_test_grad[i], grad_f_analytical[i], boost_close_tol<T>());
|
||||
}
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(second_derivative_and_hessian, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x = rng.next();
|
||||
T y = rng.next();
|
||||
|
||||
rvar<T, 2> x_ad = x;
|
||||
rvar<T, 2> y_ad = y;
|
||||
|
||||
T fv = f(x, y);
|
||||
rvar<T, 2> f_ad = f(x_ad, y_ad);
|
||||
gradient_tape<T, 2, BUFFER_SIZE>& tape = get_active_tape<T, 2>();
|
||||
tape.zero_grad();
|
||||
|
||||
auto hess_analytical = hess_f_a(x, y);
|
||||
auto hess_func_test = hess(f_ad, &x_ad, &y_ad);
|
||||
auto grad_nd_func_test = grad_nd<2>(f_ad, &x_ad, &y_ad);
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
BOOST_REQUIRE_CLOSE(hess_func_test[i][j], hess_analytical[i][j], boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(hess_func_test[i][j], grad_nd_func_test[i][j], boost_close_tol<T>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(order_3_der, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-1, 1};
|
||||
T x = rng.next();
|
||||
T y = rng.next();
|
||||
|
||||
rvar<T, 3> x_ad = x;
|
||||
rvar<T, 3> y_ad = y;
|
||||
|
||||
T fv = f(x, y);
|
||||
rvar<T, 3> f_ad = f(x_ad, y_ad);
|
||||
gradient_tape<T, 3, BUFFER_SIZE>& tape = get_active_tape<T, 3>();
|
||||
tape.zero_grad();
|
||||
|
||||
auto df3 = df_3_a(x, y);
|
||||
auto grad_ad = grad(f_ad, &x_ad, &y_ad);
|
||||
|
||||
std::vector<std::vector<std::vector<T>>> grad_tensor;
|
||||
for (int i = 0; i < 2; i++) {
|
||||
auto df_hess = hess(*grad_ad[i], &x_ad, &y_ad);
|
||||
grad_tensor.push_back(df_hess);
|
||||
}
|
||||
auto grad_nd_func_test = grad_nd<3>(f_ad, &x_ad, &y_ad);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
for (int k = 0; k < 2; k++) {
|
||||
BOOST_REQUIRE_CLOSE(grad_tensor[i][j][k], df3[i][j][k], boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(grad_nd_func_test[i][j][k], df3[i][j][k], boost_close_tol<T>());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(fourth_derivative, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x_val = rng.next();
|
||||
T y_val = rng.next();
|
||||
|
||||
rvar<T, 4> x_ad = x_val;
|
||||
rvar<T, 4> y_ad = y_val;
|
||||
rvar<T, 4> f_ad = f(x_ad, y_ad);
|
||||
|
||||
auto df4 = df_4_a(x_val, y_val);
|
||||
auto gf = grad(f_ad, &x_ad, &y_ad);
|
||||
std::array<std::array<std::array<std::array<T, 2>, 2>, 2>, 2> ggggf;
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
auto hess1 = grad(*gf[i], &x_ad, &y_ad);
|
||||
for (int j = 0; j < 2; ++j) {
|
||||
auto hess2 = grad(*hess1[j], &x_ad, &y_ad);
|
||||
for (int k = 0; k < 2; ++k) {
|
||||
auto hess3 = grad(*hess2[k], &x_ad, &y_ad);
|
||||
for (int l = 0; l < 2; ++l) {
|
||||
ggggf[i][j][k][l] = hess3[l];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
auto grad_nd_func_test = grad_nd<4>(f_ad, &x_ad, &y_ad);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
for (int k = 0; k < 2; k++) {
|
||||
for (int l = 0; l < 2; l++) {
|
||||
BOOST_REQUIRE_CLOSE(ggggf[i][j][k][l], df4[i][j][k][l], boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(grad_nd_func_test[i][j][k][l],
|
||||
df4[i][j][k][l],
|
||||
boost_close_tol<T>());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
154
test/test_autodiff_reverse.hpp
Normal file
154
test/test_autodiff_reverse.hpp
Normal file
@@ -0,0 +1,154 @@
|
||||
#ifndef TEST_AUTODIFF_REVERSE_HPP
|
||||
#define TEST_AUTODIFF_REVERSE_HPP
|
||||
|
||||
#ifndef BOOST_TEST_MODULE
|
||||
#define BOOST_TEST_MODULE test_autodiff
|
||||
#endif
|
||||
|
||||
#include <boost/test/included/unit_test.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/math/differentiation/autodiff_reverse.hpp>
|
||||
#include <boost/math/tools/config.hpp>
|
||||
#include <boost/mp11/function.hpp>
|
||||
#include <boost/mp11/integral.hpp>
|
||||
#include <boost/mp11/list.hpp>
|
||||
#include <boost/mp11/utility.hpp>
|
||||
#include <boost/multiprecision/cpp_bin_float.hpp>
|
||||
#include <boost/multiprecision/cpp_dec_float.hpp>
|
||||
#include <boost/test/included/unit_test.hpp>
|
||||
#include <cfenv>
|
||||
#include <cstdlib>
|
||||
#include <random>
|
||||
|
||||
namespace mp11 = boost::mp11;
|
||||
namespace bmp = boost::multiprecision;
|
||||
namespace rdiff_detail = boost::math::differentiation::reverse_mode::detail;
|
||||
namespace rdiff = boost::math::differentiation::reverse_mode;
|
||||
|
||||
#if defined(BOOST_USE_VALGRIND) || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
|
||||
using bin_float_types = mp11::mp_list<float>;
|
||||
#elif defined(__STDCPP_FLOAT32_T__) && defined(__STDCPP_FLOAT64_T__)
|
||||
using bin_float_types = mp11::mp_list<std::float32_t, std::float64_t>;
|
||||
#else
|
||||
using bin_float_types = mp11::mp_list<float, double, long double>;
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_VERSION) || BOOST_VERSION < 107000 || defined(BOOST_USE_VALGRIND) \
|
||||
|| defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) || defined(BOOST_NO_STRESS_TEST) \
|
||||
|| defined(BOOST_MATH_STANDALONE)
|
||||
using multiprecision_float_types = mp11::mp_list<>;
|
||||
#else
|
||||
#define BOOST_AUTODIFF_TESTING_INCLUDE_MULTIPRECISION
|
||||
using multiprecision_float_types = mp11::mp_list<bmp::cpp_bin_float_50>;
|
||||
#endif
|
||||
|
||||
using all_float_types
|
||||
= bin_float_types; //mp11::mp_append<bin_float_types, multiprecision_float_types>;
|
||||
|
||||
using namespace boost::math::differentiation;
|
||||
#endif // TEST_AUTODIFF_REVERSE_HPP
|
||||
template<typename T>
|
||||
using is_multiprecision_t = mp11::mp_or<bmp::is_number<T>, bmp::is_number_expression<T>>;
|
||||
|
||||
template<bool IfValue, typename ThenType, typename ElseType>
|
||||
using if_c = mp11::mp_eval_if_c<IfValue, ThenType, mp11::mp_identity_t, ElseType>;
|
||||
|
||||
template<typename IfType, typename ThenType, typename ElseType>
|
||||
using if_t = if_c<IfType::value, ThenType, ElseType>;
|
||||
/**
|
||||
* struct to emit pseudo-random values from a given interval.
|
||||
* Endpoints are closed or open depending on whether or not they're infinite).
|
||||
*/
|
||||
/**
|
||||
* Simple struct to hold constants that are used in each test
|
||||
* since BOOST_AUTO_TEST_CASE_TEMPLATE doesn't support fixtures.
|
||||
*/
|
||||
template<typename T, std::size_t OrderValue>
|
||||
struct test_constants_t
|
||||
{
|
||||
static constexpr auto n_samples
|
||||
= if_t<mp11::mp_or<bmp::is_number<T>, bmp::is_number_expression<T>>,
|
||||
mp11::mp_int<10>,
|
||||
mp11::mp_int<25>>::value;
|
||||
static constexpr auto order = OrderValue;
|
||||
static constexpr T pct_epsilon() noexcept
|
||||
{
|
||||
return (is_multiprecision_t<T>::value ? 2 : 1) * std::numeric_limits<T>::epsilon() * 100;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, std::size_t Order = 5>
|
||||
using test_constants = test_constants_t<T, Order>;
|
||||
|
||||
template<typename T>
|
||||
struct RandomSample
|
||||
{
|
||||
using numeric_limits_t = std::numeric_limits<T>;
|
||||
using is_integer_t = mp11::mp_bool<std::numeric_limits<T>::is_integer>;
|
||||
|
||||
using distribution_param_t
|
||||
= if_t<is_multiprecision_t<T>,
|
||||
if_t<is_integer_t, if_c<numeric_limits_t::is_signed, int64_t, uint64_t>, long double>,
|
||||
T>;
|
||||
static_assert((std::numeric_limits<T>::is_integer
|
||||
&& std::numeric_limits<distribution_param_t>::is_integer)
|
||||
|| (!std::numeric_limits<T>::is_integer
|
||||
&& !std::numeric_limits<distribution_param_t>::is_integer),
|
||||
"T and distribution_param_t must either both be integral or "
|
||||
"both be not integral");
|
||||
|
||||
using dist_t = if_t<is_integer_t,
|
||||
std::uniform_int_distribution<distribution_param_t>,
|
||||
std::uniform_real_distribution<distribution_param_t>>;
|
||||
|
||||
struct get_integral_endpoint
|
||||
{
|
||||
template<typename V>
|
||||
constexpr distribution_param_t operator()(V finish) const noexcept
|
||||
{
|
||||
return static_cast<distribution_param_t>(finish);
|
||||
}
|
||||
};
|
||||
|
||||
struct get_real_endpoint
|
||||
{
|
||||
template<typename V>
|
||||
constexpr distribution_param_t operator()(V finish) const noexcept
|
||||
{
|
||||
return std::nextafter(static_cast<distribution_param_t>(finish),
|
||||
(std::numeric_limits<distribution_param_t>::max)());
|
||||
}
|
||||
};
|
||||
|
||||
using get_endpoint_t = if_t<is_integer_t, get_integral_endpoint, get_real_endpoint>;
|
||||
|
||||
template<typename U, typename V>
|
||||
RandomSample(U start, V finish)
|
||||
: rng_(std::random_device{}())
|
||||
, dist_(static_cast<distribution_param_t>(start), get_endpoint_t{}(finish))
|
||||
{}
|
||||
|
||||
T next() noexcept { return static_cast<T>(dist_(rng_)); }
|
||||
T normalize(const T& x) noexcept { return x / ((dist_.max)() - (dist_.min)()); }
|
||||
|
||||
std::mt19937 rng_;
|
||||
dist_t dist_;
|
||||
};
|
||||
static_assert(
|
||||
std::is_same<RandomSample<float>::dist_t, std::uniform_real_distribution<float>>::value, "");
|
||||
static_assert(
|
||||
std::is_same<RandomSample<int64_t>::dist_t, std::uniform_int_distribution<int64_t>>::value, "");
|
||||
static_assert(std::is_same<RandomSample<bmp::uint512_t>::dist_t,
|
||||
std::uniform_int_distribution<uint64_t>>::value,
|
||||
"");
|
||||
static_assert(std::is_same<RandomSample<bmp::cpp_bin_float_50>::dist_t,
|
||||
std::uniform_real_distribution<long double>>::value,
|
||||
"");
|
||||
|
||||
template<typename T>
|
||||
constexpr double boost_close_tol(double scale_factor = 10000.0)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "T must be floating point");
|
||||
return std::numeric_limits<T>::epsilon() * scale_factor * 100.0;
|
||||
}
|
||||
113
test/test_autodiff_reverse_flat_linear_allocator.cpp
Normal file
113
test/test_autodiff_reverse_flat_linear_allocator.cpp
Normal file
@@ -0,0 +1,113 @@
|
||||
#include "test_autodiff_reverse.hpp"
|
||||
#include <vector>
|
||||
BOOST_AUTO_TEST_SUITE(test_flat_linear_allocator)
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(flat_linear_allocator_constructors, T, all_float_types)
|
||||
{
|
||||
size_t buffer_size = 16;
|
||||
RandomSample<T> rng{-1, 1};
|
||||
rdiff_detail::flat_linear_allocator<T, 16> float_allocator{};
|
||||
for (size_t i = 0; i < 2 * buffer_size - buffer_size / 2; i++) {
|
||||
float_allocator.emplace_back(rng.next());
|
||||
}
|
||||
|
||||
BOOST_CHECK_EQUAL(float_allocator.size(), 2 * buffer_size - buffer_size / 2);
|
||||
BOOST_CHECK_EQUAL(float_allocator.capacity(), 2 * buffer_size);
|
||||
|
||||
float_allocator.clear();
|
||||
BOOST_CHECK_EQUAL(float_allocator.size(), 0);
|
||||
BOOST_CHECK_EQUAL(float_allocator.capacity(), buffer_size);
|
||||
|
||||
for (size_t i = 0; i < 2 * buffer_size - buffer_size / 2; i++) {
|
||||
float_allocator.emplace_back(rng.next());
|
||||
}
|
||||
float_allocator.reset();
|
||||
BOOST_CHECK_EQUAL(float_allocator.size(), 0);
|
||||
BOOST_CHECK_EQUAL(float_allocator.capacity(), 2 * buffer_size);
|
||||
|
||||
for (size_t i = 0; i < 2 * buffer_size - buffer_size / 2; i++) {
|
||||
float_allocator.emplace_back(rng.next());
|
||||
}
|
||||
T fill_value = T(0.25);
|
||||
float_allocator.fill(fill_value);
|
||||
for (size_t i = 0; i < float_allocator.size(); i++) {
|
||||
BOOST_CHECK_EQUAL(float_allocator[i], fill_value);
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(flat_linear_allocator_test_emplace, T, all_float_types)
|
||||
{
|
||||
size_t buffer_size = 16;
|
||||
RandomSample<T> rng{-1, 1};
|
||||
rdiff_detail::flat_linear_allocator<T, 16> float_allocator{};
|
||||
std::vector<T> test_vector;
|
||||
|
||||
for (int i = 0; i < 2 * buffer_size - 1; i++) {
|
||||
test_vector.push_back(rng.next());
|
||||
float_allocator.emplace_back(test_vector[i]);
|
||||
}
|
||||
|
||||
auto it1 = float_allocator.template emplace_back_n<4>();
|
||||
for (int i = 0; i < 4; i++) {
|
||||
T literal = rng.next();
|
||||
test_vector.push_back(literal);
|
||||
*(it1 + i) = literal;
|
||||
}
|
||||
|
||||
auto it2 = float_allocator.emplace_back_n(buffer_size);
|
||||
for (int i = 0; i < buffer_size; i++) {
|
||||
T literal = rng.next();
|
||||
test_vector.push_back(literal);
|
||||
*(it2 + i) = literal;
|
||||
}
|
||||
|
||||
auto vit = test_vector.begin();
|
||||
auto alloc_it = float_allocator.begin();
|
||||
for (; vit != test_vector.end(); vit++, alloc_it++) {
|
||||
BOOST_CHECK_EQUAL(
|
||||
*vit,
|
||||
*alloc_it); // should be ok to check floats like this since they are expected to be the same.
|
||||
}
|
||||
|
||||
for (int i = 0; i < test_vector.size(); i++) {
|
||||
BOOST_CHECK_EQUAL(test_vector[i], float_allocator[i]); // check random access aswell;
|
||||
}
|
||||
|
||||
BOOST_CHECK_EQUAL(test_vector.size(), float_allocator.size());
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(flat_linear_allocator_test_checkpointing, T, all_float_types)
|
||||
{
|
||||
size_t buffer_size = 16;
|
||||
RandomSample<T> rng{-1, 1};
|
||||
rdiff_detail::flat_linear_allocator<T, 16> float_allocator{};
|
||||
std::vector<T> test_vector;
|
||||
std::vector<size_t> checkpoint_indices{2, 11, 15, 16, 17, 28};
|
||||
std::vector<T> expected_value_at_checkpoint;
|
||||
|
||||
size_t ckp_id = 0;
|
||||
for (int i = 0; i < 2 * buffer_size; i++) {
|
||||
T literal = rng.next();
|
||||
float_allocator.emplace_back(literal);
|
||||
if (ckp_id < checkpoint_indices.size() && i == checkpoint_indices[ckp_id]) {
|
||||
float_allocator.add_checkpoint();
|
||||
expected_value_at_checkpoint.push_back(literal);
|
||||
++ckp_id;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < checkpoint_indices.size(); i++) {
|
||||
auto it = float_allocator.checkpoint_at(i);
|
||||
BOOST_CHECK_EQUAL(*it, expected_value_at_checkpoint[i]);
|
||||
}
|
||||
|
||||
auto first_ckp = float_allocator.first_checkpoint();
|
||||
auto last_ckp = float_allocator.last_checkpoint();
|
||||
|
||||
BOOST_CHECK_EQUAL(*first_ckp, expected_value_at_checkpoint[0]);
|
||||
BOOST_CHECK_EQUAL(*last_ckp, expected_value_at_checkpoint.back());
|
||||
|
||||
float_allocator.rewind_to_last_checkpoint();
|
||||
BOOST_CHECK_EQUAL(float_allocator.size(), checkpoint_indices.back());
|
||||
BOOST_CHECK_EQUAL(float_allocator.capacity(), 2 * buffer_size);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
301
test/test_comparison_operators.cpp
Normal file
301
test/test_comparison_operators.cpp
Normal file
@@ -0,0 +1,301 @@
|
||||
#include "test_autodiff_reverse.hpp"
|
||||
BOOST_AUTO_TEST_SUITE(test_comparison_operators)
|
||||
using namespace rdiff;
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(equals_rvar_and_rvar, T, all_float_types)
|
||||
{
|
||||
T a = T(3.14);
|
||||
T b = T(3.14);
|
||||
T c = T(2.71);
|
||||
|
||||
rvar<T, 1> var1 = rvar<T, 1>(a);
|
||||
rvar<T, 2> var2 = rvar<T, 2>(b);
|
||||
rvar<T, 3> var3 = rvar<T, 3>(a);
|
||||
rvar<T, 4> var4 = rvar<T, 4>(c);
|
||||
|
||||
BOOST_CHECK(var1 == var2);
|
||||
BOOST_CHECK(!(var1 == var4));
|
||||
BOOST_CHECK(var2 == var3);
|
||||
BOOST_CHECK(!(var3 == var4));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(equals_rvar_and_scalar, T, all_float_types)
|
||||
{
|
||||
T a = T(3.14);
|
||||
T b = T(3.14);
|
||||
T c = T(2.71);
|
||||
|
||||
rvar<T, 1> var1 = rvar<T, 1>(a);
|
||||
rvar<T, 2> var2 = rvar<T, 2>(a);
|
||||
rvar<T, 3> var3 = rvar<T, 3>(a);
|
||||
rvar<T, 4> var4 = rvar<T, 4>(a);
|
||||
|
||||
BOOST_CHECK(var1 == b);
|
||||
BOOST_CHECK(!(var1 == c));
|
||||
BOOST_CHECK(b == var1);
|
||||
BOOST_CHECK(!(c == var1));
|
||||
|
||||
BOOST_CHECK(var2 == b);
|
||||
BOOST_CHECK(!(var2 == c));
|
||||
BOOST_CHECK(b == var2);
|
||||
BOOST_CHECK(!(c == var2));
|
||||
|
||||
BOOST_CHECK(var3 == b);
|
||||
BOOST_CHECK(!(var3 == c));
|
||||
BOOST_CHECK(b == var3);
|
||||
BOOST_CHECK(!(c == var3));
|
||||
|
||||
BOOST_CHECK(var4 == b);
|
||||
BOOST_CHECK(!(var4 == c));
|
||||
BOOST_CHECK(b == var4);
|
||||
BOOST_CHECK(!(c == var4));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(inequality_rvar_and_rvar, T, all_float_types)
|
||||
{
|
||||
T a = T(3.14);
|
||||
T b = T(3.14);
|
||||
T c = T(2.71);
|
||||
|
||||
rvar<T, 1> var1 = rvar<T, 1>(a);
|
||||
rvar<T, 2> var2 = rvar<T, 2>(b);
|
||||
rvar<T, 3> var3 = rvar<T, 3>(a);
|
||||
rvar<T, 4> var4 = rvar<T, 4>(c);
|
||||
|
||||
BOOST_CHECK(var1 != var4);
|
||||
BOOST_CHECK(!(var1 != var2));
|
||||
BOOST_CHECK(var2 != var4);
|
||||
BOOST_CHECK(!(var3 != var2));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(inequality_rvar_and_scalar, T, all_float_types)
|
||||
{
|
||||
T a = T(3.14);
|
||||
T b = T(3.14);
|
||||
T c = T(2.71);
|
||||
|
||||
rvar<T, 1> var1 = rvar<T, 1>(a);
|
||||
rvar<T, 2> var2 = rvar<T, 2>(a);
|
||||
rvar<T, 3> var3 = rvar<T, 3>(a);
|
||||
rvar<T, 4> var4 = rvar<T, 4>(a);
|
||||
|
||||
BOOST_CHECK(var1 != c);
|
||||
BOOST_CHECK(!(var1 != b));
|
||||
BOOST_CHECK(c != var1);
|
||||
BOOST_CHECK(!(b != var1));
|
||||
|
||||
BOOST_CHECK(var2 != c);
|
||||
BOOST_CHECK(!(var2 != b));
|
||||
BOOST_CHECK(c != var2);
|
||||
BOOST_CHECK(!(b != var2));
|
||||
|
||||
BOOST_CHECK(var3 != c);
|
||||
BOOST_CHECK(!(var3 != b));
|
||||
BOOST_CHECK(c != var3);
|
||||
BOOST_CHECK(!(b != var3));
|
||||
|
||||
BOOST_CHECK(var4 != c);
|
||||
BOOST_CHECK(!(var4 != b));
|
||||
BOOST_CHECK(c != var4);
|
||||
BOOST_CHECK(!(b != var4));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(less_than_rvar_and_rvar, T, all_float_types)
|
||||
{
|
||||
T a = T(3.14);
|
||||
T b = T(3.14);
|
||||
T c = T(2.71);
|
||||
|
||||
rvar<T, 1> var1 = rvar<T, 1>(a);
|
||||
rvar<T, 2> var2 = rvar<T, 2>(b);
|
||||
rvar<T, 3> var3 = rvar<T, 3>(c);
|
||||
rvar<T, 4> var4 = rvar<T, 4>(c);
|
||||
|
||||
BOOST_CHECK(var3 < var1);
|
||||
BOOST_CHECK(!(var1 < var2));
|
||||
BOOST_CHECK(!(var1 < var3));
|
||||
BOOST_CHECK(!(var3 < var4));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(greater_than_rvar_and_rvar, T, all_float_types)
|
||||
{
|
||||
T a = T(3.14);
|
||||
T b = T(3.14);
|
||||
T c = T(2.71);
|
||||
|
||||
rvar<T, 1> var1 = rvar<T, 1>(a);
|
||||
rvar<T, 2> var2 = rvar<T, 2>(b);
|
||||
rvar<T, 3> var3 = rvar<T, 3>(c);
|
||||
rvar<T, 4> var4 = rvar<T, 4>(c);
|
||||
|
||||
BOOST_CHECK(var1 > var3);
|
||||
BOOST_CHECK(!(var1 > var2));
|
||||
BOOST_CHECK(!(var3 > var1));
|
||||
BOOST_CHECK(!(var3 > var4));
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(less_than_rvar_and_scalar, T, all_float_types)
|
||||
{
|
||||
T a = T(3.14);
|
||||
T b = T(3.14);
|
||||
T c = T(2.71);
|
||||
T d = T(4.0);
|
||||
|
||||
rvar<T, 1> var1 = rvar<T, 1>(a);
|
||||
rvar<T, 2> var2 = rvar<T, 2>(a);
|
||||
rvar<T, 3> var3 = rvar<T, 3>(c);
|
||||
rvar<T, 4> var4 = rvar<T, 4>(c);
|
||||
|
||||
BOOST_CHECK(var3 < a);
|
||||
BOOST_CHECK(!(var1 < b));
|
||||
BOOST_CHECK(c < var1);
|
||||
BOOST_CHECK(!(d < var2));
|
||||
|
||||
BOOST_CHECK(var4 < a);
|
||||
BOOST_CHECK(!(var2 < b));
|
||||
BOOST_CHECK(c < var2);
|
||||
BOOST_CHECK(!(d < var1));
|
||||
|
||||
BOOST_CHECK(var3 < b);
|
||||
BOOST_CHECK(var4 < b);
|
||||
BOOST_CHECK(c < var1);
|
||||
BOOST_CHECK(!(d < var3));
|
||||
|
||||
BOOST_CHECK(var3 < a);
|
||||
BOOST_CHECK(!(var2 < a));
|
||||
BOOST_CHECK(!(c < var4));
|
||||
BOOST_CHECK(!(d < var1));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(greater_than_rvar_and_scalar, T, all_float_types)
|
||||
{
|
||||
T a = T(3.14);
|
||||
T b = T(3.14);
|
||||
T c = T(2.71);
|
||||
T d = T(4.0);
|
||||
|
||||
rvar<T, 1> var1 = rvar<T, 1>(a);
|
||||
rvar<T, 2> var2 = rvar<T, 2>(a);
|
||||
rvar<T, 3> var3 = rvar<T, 3>(c);
|
||||
rvar<T, 4> var4 = rvar<T, 4>(c);
|
||||
|
||||
BOOST_CHECK(var1 > c);
|
||||
BOOST_CHECK(!(var1 > b));
|
||||
BOOST_CHECK(b > var3);
|
||||
BOOST_CHECK(!(c > var4));
|
||||
|
||||
BOOST_CHECK(var2 > c);
|
||||
BOOST_CHECK(!(var2 > b));
|
||||
BOOST_CHECK(b > var4);
|
||||
BOOST_CHECK(!(c > var3));
|
||||
|
||||
BOOST_CHECK(var1 > c);
|
||||
BOOST_CHECK(!(var1 > b));
|
||||
BOOST_CHECK(a > var4);
|
||||
BOOST_CHECK(!(c > var3));
|
||||
|
||||
BOOST_CHECK(var2 > c);
|
||||
BOOST_CHECK(!(var2 > b));
|
||||
BOOST_CHECK(a > var4);
|
||||
BOOST_CHECK(!(c > var3));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(less_than_or_equal_rvar_and_rvar, T, all_float_types)
|
||||
{
|
||||
T a = T(3.14);
|
||||
T b = T(3.14);
|
||||
T c = T(2.71);
|
||||
|
||||
rvar<T, 1> var1 = rvar<T, 1>(a);
|
||||
rvar<T, 2> var2 = rvar<T, 2>(b);
|
||||
rvar<T, 3> var3 = rvar<T, 3>(c);
|
||||
rvar<T, 4> var4 = rvar<T, 4>(c);
|
||||
|
||||
BOOST_CHECK(var3 <= var1);
|
||||
BOOST_CHECK(var1 <= var2);
|
||||
BOOST_CHECK(!(var1 <= var3));
|
||||
BOOST_CHECK(var3 <= var4);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(less_than_or_equal_rvar_and_scalar, T, all_float_types)
|
||||
{
|
||||
T a = T(3.14);
|
||||
T b = T(3.14);
|
||||
T c = T(2.71);
|
||||
T d = T(4.0);
|
||||
|
||||
rvar<T, 1> var1 = rvar<T, 1>(a);
|
||||
rvar<T, 2> var2 = rvar<T, 2>(a);
|
||||
rvar<T, 3> var3 = rvar<T, 3>(c);
|
||||
rvar<T, 4> var4 = rvar<T, 4>(c);
|
||||
|
||||
BOOST_CHECK(var3 <= a);
|
||||
BOOST_CHECK(var1 <= b);
|
||||
BOOST_CHECK(c <= var1);
|
||||
BOOST_CHECK(!(d <= var2));
|
||||
|
||||
BOOST_CHECK(var4 <= a);
|
||||
BOOST_CHECK(var2 <= b);
|
||||
BOOST_CHECK(c <= var2);
|
||||
BOOST_CHECK(!(d <= var1));
|
||||
|
||||
BOOST_CHECK(var3 <= b);
|
||||
BOOST_CHECK(var4 <= b);
|
||||
BOOST_CHECK(c <= var1);
|
||||
BOOST_CHECK(!(d <= var3));
|
||||
|
||||
BOOST_CHECK(var3 <= a);
|
||||
BOOST_CHECK(var2 <= a);
|
||||
BOOST_CHECK(c <= var4);
|
||||
BOOST_CHECK(!(d <= var1));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(greater_than_or_equal_rvar_and_rvar, T, all_float_types)
|
||||
{
|
||||
T a = T(3.14);
|
||||
T b = T(3.14);
|
||||
T c = T(2.71);
|
||||
|
||||
rvar<T, 1> var1 = rvar<T, 1>(a);
|
||||
rvar<T, 2> var2 = rvar<T, 2>(b);
|
||||
rvar<T, 3> var3 = rvar<T, 3>(c);
|
||||
rvar<T, 4> var4 = rvar<T, 4>(c);
|
||||
|
||||
BOOST_CHECK(var1 >= var3);
|
||||
BOOST_CHECK(var1 >= var2);
|
||||
BOOST_CHECK(!(var3 >= var1));
|
||||
BOOST_CHECK(var3 >= var4);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(greater_than_or_equal_rvar_and_scalar, T, all_float_types)
|
||||
{
|
||||
T a = T(3.14);
|
||||
T b = T(3.14);
|
||||
T c = T(2.71);
|
||||
T d = T(4.0);
|
||||
|
||||
rvar<T, 1> var1 = rvar<T, 1>(a);
|
||||
rvar<T, 2> var2 = rvar<T, 2>(a);
|
||||
rvar<T, 3> var3 = rvar<T, 3>(c);
|
||||
rvar<T, 4> var4 = rvar<T, 4>(c);
|
||||
|
||||
BOOST_CHECK(var1 >= c);
|
||||
BOOST_CHECK(var1 >= b);
|
||||
BOOST_CHECK(b >= var3);
|
||||
BOOST_CHECK(c >= var4);
|
||||
|
||||
BOOST_CHECK(var2 >= c);
|
||||
BOOST_CHECK(var2 >= b);
|
||||
BOOST_CHECK(b >= var4);
|
||||
BOOST_CHECK(c >= var3);
|
||||
|
||||
BOOST_CHECK(var1 >= c);
|
||||
BOOST_CHECK(var1 >= b);
|
||||
BOOST_CHECK(a >= var4);
|
||||
BOOST_CHECK(c >= var3);
|
||||
|
||||
BOOST_CHECK(var2 >= c);
|
||||
BOOST_CHECK(var2 >= b);
|
||||
BOOST_CHECK(a >= var4);
|
||||
BOOST_CHECK(c >= var3);
|
||||
}
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
284
test/test_rvar_constructors.cpp
Normal file
284
test/test_rvar_constructors.cpp
Normal file
@@ -0,0 +1,284 @@
|
||||
#include "test_autodiff_reverse.hpp"
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(explicit_rvar_constructors)
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(rvar_constructors_and_utils, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-100, 100};
|
||||
/* raw constructors */
|
||||
T x_value = rng.next();
|
||||
rdiff::rvar<T, 1> x0(x_value);
|
||||
rdiff::rvar<T, 2> x1(x_value);
|
||||
rdiff::rvar<T, 3> x2(x_value);
|
||||
|
||||
/* raw eval */
|
||||
BOOST_CHECK_EQUAL(x_value, x0.evaluate());
|
||||
BOOST_CHECK_EQUAL(x_value, x1.evaluate().evaluate());
|
||||
BOOST_CHECK_EQUAL(x_value, x2.evaluate().evaluate().evaluate());
|
||||
|
||||
auto v = x1.item();
|
||||
/* get item helper */
|
||||
BOOST_CHECK_EQUAL(x_value, x0.item());
|
||||
BOOST_CHECK_EQUAL(x_value, x1.item());
|
||||
BOOST_CHECK_EQUAL(x_value, x2.item());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(make_rvar_constructors, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x_value = rng.next();
|
||||
|
||||
rdiff::rvar<T,1> x1 = rdiff::make_rvar<T,1>(x_value);
|
||||
rdiff::rvar<T,2> x2 = rdiff::make_rvar<T,2>(x_value);
|
||||
rdiff::rvar<T,3> x3 = rdiff::make_rvar<T,3>(x_value);
|
||||
BOOST_CHECK_EQUAL(x_value, x1.item());
|
||||
BOOST_CHECK_EQUAL(x_value, x2.item());
|
||||
BOOST_CHECK_EQUAL(x_value, x3.item());
|
||||
|
||||
T result = x_value+x_value;
|
||||
auto z1 = x1+x1;
|
||||
auto z2 = x2+x2;
|
||||
auto z3 = x3+x3;
|
||||
|
||||
rdiff::rvar<T,1> y1 = rdiff::make_rvar(z1);
|
||||
rdiff::rvar<T,2> y2 = rdiff::make_rvar(z2);
|
||||
rdiff::rvar<T,3> y3 = rdiff::make_rvar(z3);
|
||||
|
||||
BOOST_CHECK_EQUAL(y1.item(),result);
|
||||
BOOST_CHECK_EQUAL(y2.item(),result);
|
||||
BOOST_CHECK_EQUAL(y3.item(),result);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(copy_construction, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T original_value_1 = rng.next();
|
||||
|
||||
/* copy constructor checks */
|
||||
rdiff::rvar<T, 1> original_rvar_1(original_value_1);
|
||||
rdiff::rvar<T, 1> copied_rvar_1 = original_rvar_1;
|
||||
|
||||
BOOST_CHECK_EQUAL(copied_rvar_1.item(), original_value_1);
|
||||
|
||||
/* change original, copy stays same */
|
||||
T new_value_1 = rng.next();
|
||||
original_rvar_1 = new_value_1;
|
||||
BOOST_CHECK_EQUAL(copied_rvar_1.item(), original_value_1);
|
||||
BOOST_CHECK_EQUAL(original_rvar_1.item(), new_value_1);
|
||||
|
||||
T original_value_2 = rng.next();
|
||||
rdiff::rvar<T, 2> original_rvar_2(original_value_2);
|
||||
rdiff::rvar<T, 2> copied_rvar_2 = original_rvar_2;
|
||||
|
||||
BOOST_CHECK_EQUAL(copied_rvar_2.item(), original_value_2);
|
||||
|
||||
T new_value_2 = rng.next();
|
||||
original_rvar_2 = new_value_2;
|
||||
BOOST_CHECK_EQUAL(copied_rvar_2.item(), original_value_2);
|
||||
BOOST_CHECK_EQUAL(original_rvar_2.item(), new_value_2);
|
||||
|
||||
T original_value_3 = rng.next();
|
||||
rdiff::rvar<T, 3> original_rvar_3(original_value_3);
|
||||
rdiff::rvar<T, 3> copied_rvar_3 = original_rvar_3;
|
||||
|
||||
BOOST_CHECK_EQUAL(copied_rvar_3.item(), original_value_3);
|
||||
|
||||
T new_value_3 = rng.next();
|
||||
original_rvar_3 = new_value_3;
|
||||
BOOST_CHECK_EQUAL(copied_rvar_3.item(), original_value_3);
|
||||
BOOST_CHECK_EQUAL(original_rvar_3.item(), new_value_3);
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(copy_assignment, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T source_value_1 = rng.next();
|
||||
T initial_target_value_1 = rng.next();
|
||||
rdiff::rvar<T, 1> source_rvar_1(source_value_1);
|
||||
rdiff::rvar<T, 1> target_rvar_1(initial_target_value_1);
|
||||
|
||||
target_rvar_1 = source_rvar_1;
|
||||
|
||||
BOOST_CHECK_EQUAL(target_rvar_1.item(), source_value_1);
|
||||
|
||||
T new_source_value_1 = rng.next();
|
||||
source_rvar_1 = new_source_value_1;
|
||||
BOOST_CHECK_EQUAL(target_rvar_1.item(), source_value_1);
|
||||
BOOST_CHECK_EQUAL(source_rvar_1.item(), new_source_value_1);
|
||||
|
||||
rdiff::rvar<T, 1> self_assign_rvar_1(rng.next());
|
||||
T value_before_self_assign_1 = self_assign_rvar_1.item();
|
||||
self_assign_rvar_1 = self_assign_rvar_1;
|
||||
BOOST_CHECK_EQUAL(self_assign_rvar_1.item(), value_before_self_assign_1);
|
||||
|
||||
T source_value_2 = rng.next();
|
||||
T initial_target_value_2 = rng.next();
|
||||
rdiff::rvar<T, 2> source_rvar_2(source_value_2);
|
||||
rdiff::rvar<T, 2> target_rvar_2(initial_target_value_2);
|
||||
|
||||
target_rvar_2 = source_rvar_2;
|
||||
|
||||
BOOST_CHECK_EQUAL(target_rvar_2.item(), source_value_2);
|
||||
|
||||
T new_source_value_2 = rng.next();
|
||||
source_rvar_2 = new_source_value_2;
|
||||
BOOST_CHECK_EQUAL(target_rvar_2.item(), source_value_2);
|
||||
BOOST_CHECK_EQUAL(source_rvar_2.item(), new_source_value_2);
|
||||
|
||||
T source_value_3 = rng.next();
|
||||
T initial_target_value_3 = rng.next();
|
||||
rdiff::rvar<T, 3> source_rvar_3(source_value_3);
|
||||
rdiff::rvar<T, 3> target_rvar_3(initial_target_value_3);
|
||||
|
||||
target_rvar_3 = source_rvar_3;
|
||||
|
||||
BOOST_CHECK_EQUAL(target_rvar_3.item(), source_value_3);
|
||||
|
||||
T new_source_value_3 = rng.next();
|
||||
source_rvar_3 = new_source_value_3;
|
||||
BOOST_CHECK_EQUAL(target_rvar_3.item(), source_value_3);
|
||||
BOOST_CHECK_EQUAL(source_rvar_3.item(), new_source_value_3);
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(inplace_addition, T, all_float_types)
|
||||
{
|
||||
using namespace rdiff;
|
||||
RandomSample<T> rng{-1, 1};
|
||||
T x1_v = rng.next();
|
||||
T x2_v = rng.next();
|
||||
T expected = x1_v + x2_v;
|
||||
|
||||
rvar<T, 1> x1 = x1_v;
|
||||
rvar<T, 1> x2 = x2_v;
|
||||
|
||||
rvar<T, 1> orig_x1 = x1;
|
||||
rvar<T, 1> orig_x2 = x2;
|
||||
|
||||
x1 += x2;
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x1.item(), expected);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
x1.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(orig_x1.adjoint(), 1.0, 300 * std::numeric_limits<T>::epsilon());
|
||||
BOOST_REQUIRE_CLOSE(orig_x2.adjoint(), 1.0, 300 * std::numeric_limits<T>::epsilon());
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(inplace_subtraction, T, all_float_types)
|
||||
{
|
||||
using namespace rdiff;
|
||||
RandomSample<T> rng{-1, 1};
|
||||
T x1_v = rng.next();
|
||||
T x2_v = rng.next();
|
||||
T expected = x1_v - x2_v;
|
||||
|
||||
rvar<T, 1> x1 = x1_v;
|
||||
rvar<T, 1> x2 = x2_v;
|
||||
|
||||
rvar<T, 1> orig_x1 = x1;
|
||||
rvar<T, 1> orig_x2 = x2;
|
||||
|
||||
x1 -= x2;
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x1.item(), expected);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
x1.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(orig_x1.adjoint(), 1.0, 300 * std::numeric_limits<T>::epsilon());
|
||||
BOOST_REQUIRE_CLOSE(orig_x2.adjoint(), -1.0, 300 * std::numeric_limits<T>::epsilon());
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(inplace_multiplication, T, all_float_types)
|
||||
{
|
||||
using namespace rdiff;
|
||||
RandomSample<T> rng{-1, 1};
|
||||
T x1_v = rng.next();
|
||||
T x2_v = rng.next();
|
||||
T expected = x1_v * x2_v;
|
||||
|
||||
rvar<T, 1> x1 = x1_v;
|
||||
rvar<T, 1> x2 = x2_v;
|
||||
|
||||
rvar<T, 1> orig_x1 = x1;
|
||||
rvar<T, 1> orig_x2 = x2;
|
||||
|
||||
x1 *= x2;
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x1.item(), expected);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
x1.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(orig_x1.adjoint(), x2_v, 300 * std::numeric_limits<T>::epsilon());
|
||||
BOOST_REQUIRE_CLOSE(orig_x2.adjoint(), x1_v, 300 * std::numeric_limits<T>::epsilon());
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(inplace_division, T, all_float_types)
|
||||
{
|
||||
using namespace rdiff;
|
||||
RandomSample<T> rng{-1, 1};
|
||||
T x1_v = rng.next();
|
||||
T x2_v = rng.next() + 1e-2;
|
||||
|
||||
T expected = x1_v / x2_v;
|
||||
|
||||
rvar<T, 1> x1 = x1_v;
|
||||
rvar<T, 1> x2 = x2_v;
|
||||
|
||||
rvar<T, 1> orig_x1 = x1;
|
||||
rvar<T, 1> orig_x2 = x2;
|
||||
|
||||
x1 /= x2;
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x1.item(), expected);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
x1.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(orig_x1.adjoint(), 1.0 / x2_v, 300 * std::numeric_limits<T>::epsilon());
|
||||
BOOST_REQUIRE_CLOSE(orig_x2.adjoint(),
|
||||
-x1_v / (x2_v * x2_v),
|
||||
300 * std::numeric_limits<T>::epsilon());
|
||||
tape.clear();
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_rvar_ostream_output, T, all_float_types)
|
||||
{
|
||||
using namespace rdiff;
|
||||
rvar<T, 1> x = 2.0;
|
||||
rvar<T, 1> y = 3.0;
|
||||
|
||||
rvar<T, 1> z = x * y;
|
||||
z.backward();
|
||||
|
||||
std::ostringstream oss_x, oss_y, oss_z;
|
||||
oss_x << x;
|
||||
oss_y << y;
|
||||
oss_z << z;
|
||||
|
||||
BOOST_CHECK_EQUAL(oss_x.str(), "rvar<1>(2,3)");
|
||||
BOOST_CHECK_EQUAL(oss_y.str(), "rvar<1>(3,2)");
|
||||
BOOST_CHECK_EQUAL(oss_z.str(), "rvar<1>(6,1)");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(boost_math_tools_numeric_traits, T, all_float_types)
|
||||
{
|
||||
using namespace rdiff;
|
||||
using rvar_t = rvar<T, 1>;
|
||||
|
||||
BOOST_CHECK_EQUAL(boost::math::tools::digits<rvar_t>(), boost::math::tools::digits<T>());
|
||||
BOOST_CHECK_EQUAL(boost::math::tools::max_value<rvar_t>(), boost::math::tools::max_value<T>());
|
||||
BOOST_CHECK_EQUAL(boost::math::tools::min_value<rvar_t>(), boost::math::tools::min_value<T>());
|
||||
BOOST_CHECK_EQUAL(boost::math::tools::log_max_value<rvar_t>(),
|
||||
boost::math::tools::log_max_value<T>());
|
||||
BOOST_CHECK_EQUAL(boost::math::tools::log_min_value<rvar_t>(),
|
||||
boost::math::tools::log_min_value<T>());
|
||||
BOOST_CHECK_EQUAL(boost::math::tools::epsilon<rvar_t>(), boost::math::tools::epsilon<T>());
|
||||
}
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
977
test/test_stl_support.cpp
Normal file
977
test/test_stl_support.cpp
Normal file
@@ -0,0 +1,977 @@
|
||||
#include "test_autodiff_reverse.hpp"
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
BOOST_AUTO_TEST_SUITE(test_stl_supported_functions)
|
||||
|
||||
using namespace rdiff;
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_fabs, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng_neg{-10, 0};
|
||||
T x_neg_v = rng_neg.next();
|
||||
T test_fabs_neg_v = fabs(x_neg_v);
|
||||
|
||||
RandomSample<T> rng_pos{0, 10};
|
||||
T x_pos_v = rng_pos.next();
|
||||
T test_fabs_pos_v = fabs(x_pos_v);
|
||||
|
||||
rvar<T, 1> x_neg = x_neg_v;
|
||||
rvar<T, 1> x_pos = x_pos_v;
|
||||
|
||||
rvar<T, 1> fabs_neg = fabs(x_neg);
|
||||
rvar<T, 1> fabs_pos = fabs(x_pos);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(fabs_neg.item(), test_fabs_neg_v);
|
||||
BOOST_REQUIRE_EQUAL(fabs_pos.item(), test_fabs_pos_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
fabs_neg.backward();
|
||||
BOOST_REQUIRE_EQUAL(x_neg.adjoint(), -1);
|
||||
|
||||
tape.zero_grad();
|
||||
fabs_pos.backward();
|
||||
BOOST_REQUIRE_EQUAL(x_pos.adjoint(), 1);
|
||||
|
||||
rvar<T, 1> z = fabs(x_neg * x_neg * x_neg);
|
||||
tape.zero_grad();
|
||||
z.backward();
|
||||
T expected_grad = 3 * x_neg_v * x_neg_v * (-1);
|
||||
BOOST_REQUIRE_CLOSE(x_neg.adjoint(), expected_grad, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_abs, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng_neg{-100, 0};
|
||||
T x_neg_v = rng_neg.next();
|
||||
T test_abs_neg_v = fabs(x_neg_v);
|
||||
|
||||
RandomSample<T> rng_pos{0, 100};
|
||||
T x_pos_v = rng_pos.next();
|
||||
T test_abs_pos_v = abs(x_pos_v);
|
||||
|
||||
rvar<T, 1> x_neg = x_neg_v;
|
||||
rvar<T, 1> x_pos = x_pos_v;
|
||||
|
||||
rvar<T, 1> abs_neg = abs(x_neg);
|
||||
rvar<T, 1> abs_pos = abs(x_pos);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(abs_neg.item(), test_abs_neg_v);
|
||||
BOOST_REQUIRE_EQUAL(abs_pos.item(), test_abs_pos_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
abs_neg.backward();
|
||||
BOOST_REQUIRE_EQUAL(x_neg.adjoint(), -1);
|
||||
|
||||
tape.zero_grad();
|
||||
abs_pos.backward();
|
||||
BOOST_REQUIRE_EQUAL(x_pos.adjoint(), 1);
|
||||
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> z = abs(x_neg * x_neg * x_neg);
|
||||
z.backward();
|
||||
|
||||
T expected_grad = 3 * x_neg_v * x_neg_v * -1;
|
||||
BOOST_REQUIRE_CLOSE(x_neg.adjoint(), expected_grad, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_ceil, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x_v = rng.next();
|
||||
T test_ceil_v = ceil(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_ceil = ceil(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_ceil.item(), test_ceil_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
x_ceil.backward();
|
||||
BOOST_REQUIRE_EQUAL(x_rvar.adjoint(), 0.0);
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_floor, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x_v = rng.next();
|
||||
T test_ceil_v = floor(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_floor = floor(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_floor.item(), test_ceil_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
x_floor.backward();
|
||||
BOOST_REQUIRE_EQUAL(x_rvar.adjoint(), 0.0);
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_exp, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-1, 1};
|
||||
T x_v = rng.next();
|
||||
rng.next();
|
||||
T test_func_v = exp(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_func = exp(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> test_func_2 = exp(-x_rvar * x_rvar);
|
||||
T expected_deriv = -2.0 * x_v * exp(-x_v * x_v);
|
||||
test_func_2.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_pow, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> base_rng{0, 2};
|
||||
RandomSample<T> exp_rng{-5, 5};
|
||||
T x_v = 2.0;
|
||||
base_rng.next();
|
||||
T y_v = 0.5;
|
||||
exp_rng.next();
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
rvar<T, 1> y_rvar = y_v;
|
||||
|
||||
T expected_v = pow(x_v, y_v);
|
||||
rvar<T, 1> v_func = pow(x_rvar, y_rvar);
|
||||
|
||||
BOOST_REQUIRE_CLOSE(expected_v, v_func.item(), boost_close_tol<T>());
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
v_func.backward();
|
||||
|
||||
T df_dx_expected = y_v * pow(x_v, y_v - 1);
|
||||
T df_dy_expected = pow(x_v, y_v) * log(x_v);
|
||||
BOOST_REQUIRE_CLOSE(df_dx_expected, x_rvar.adjoint(), boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(df_dy_expected, y_rvar.adjoint(), boost_close_tol<T>());
|
||||
|
||||
rvar<T, 1> v_rvar_by_float = pow(x_rvar, y_v);
|
||||
rvar<T, 1> v_float_by_rvar = pow(x_v, y_rvar);
|
||||
|
||||
BOOST_REQUIRE_CLOSE(expected_v, v_rvar_by_float.item(), boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(expected_v, v_float_by_rvar.item(), boost_close_tol<T>());
|
||||
|
||||
tape.zero_grad();
|
||||
v_rvar_by_float.backward();
|
||||
BOOST_REQUIRE_CLOSE(df_dx_expected, x_rvar.adjoint(), boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(0.0, y_rvar.adjoint(), boost_close_tol<T>());
|
||||
|
||||
tape.zero_grad();
|
||||
v_float_by_rvar.backward();
|
||||
BOOST_REQUIRE_CLOSE(0.0, x_rvar.adjoint(), boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(df_dy_expected, y_rvar.adjoint(), boost_close_tol<T>());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_log, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{0.0001, 2};
|
||||
T x_v = rng.next();
|
||||
T test_func_v = log(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_func = log(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> test_func_2 = log(x_rvar * x_rvar);
|
||||
T expected_deriv = 2.0 / x_v;
|
||||
test_func_2.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_sqrt, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{0.0001, 2};
|
||||
T x_v = rng.next();
|
||||
T test_func_v = sqrt(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
rvar<T, 1> x_func = sqrt(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> test_func_2 = sqrt(x_rvar * x_rvar * x_rvar);
|
||||
T expected_deriv = 3.0 * sqrt(x_v) / 2.0;
|
||||
test_func_2.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_frexp, T, all_float_types)
|
||||
{
|
||||
/** @brief frexp(x) returns mantissa in
|
||||
* x = m * 2 ^ e
|
||||
*
|
||||
* its implemented as x/2^e, and technically has
|
||||
* a derivative except at finitely many
|
||||
* discontinuous points. In reverse mode autodiff
|
||||
* its treated as a piecewise linear funcfion.
|
||||
*/
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x_v = rng.next();
|
||||
|
||||
int i1, i2;
|
||||
T test_func_v = std::frexp(x_v, &i1);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
rvar<T, 1> x_func = frexp(x_rvar, &i2);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
x_func.backward();
|
||||
|
||||
int i3, i4;
|
||||
// T h = 0.001;
|
||||
// T f1 = frexp(x_v + h, &i3);
|
||||
T f2 = frexp(x_v, &i4);
|
||||
T expected_deriv = 1.0 / pow(2.0, i4);
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_cos, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-10, 10};
|
||||
T x_v = rng.next();
|
||||
T test_func_v = cos(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_func = cos(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> test_func_2 = cos(x_rvar * x_rvar);
|
||||
T expected_deriv = -2 * x_v * sin(x_v * x_v);
|
||||
test_func_2.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_sin, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-10, 10};
|
||||
T x_v = rng.next();
|
||||
T test_func_v = sin(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_func = sin(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> test_func_2 = sin(x_rvar * x_rvar);
|
||||
T expected_deriv = 2 * x_v * cos(x_v * x_v);
|
||||
test_func_2.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_tan, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-10, 10};
|
||||
T x_v = rng.next();
|
||||
T test_func_v = tan(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_func = tan(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> test_func_2 = tan(x_rvar * x_rvar);
|
||||
T expected_deriv = 2 * x_v * 1 / (cos(x_v * x_v) * cos(x_v * x_v));
|
||||
test_func_2.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_acos, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-1, 1};
|
||||
T x_v = rng.next();
|
||||
T test_func_v = acos(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_func = acos(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> test_func_2 = acos(x_rvar * x_rvar);
|
||||
T expected_deriv = -2 * x_v / sqrt(1 - x_v * x_v * x_v * x_v);
|
||||
test_func_2.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_asin, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-1, 1};
|
||||
T x_v = rng.next();
|
||||
T test_func_v = asin(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_func = asin(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> test_func_2 = asin(x_rvar * x_rvar);
|
||||
T expected_deriv = 2 * x_v / sqrt(1 - x_v * x_v * x_v * x_v);
|
||||
test_func_2.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_atan, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-1, 1};
|
||||
T x_v = rng.next();
|
||||
T test_func_v = atan(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_func = atan(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> test_func_2 = atan(x_rvar * x_rvar);
|
||||
T expected_deriv = 2 * x_v / (1 + x_v * x_v * x_v * x_v);
|
||||
test_func_2.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_atan2, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-10, 10};
|
||||
|
||||
T y_v = rng.next();
|
||||
T x_v = rng.next();
|
||||
|
||||
T expected = atan2(y_v, x_v);
|
||||
|
||||
rvar<T, 1> y_rvar = y_v;
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
{
|
||||
rvar<T, 1> z = atan2(y_rvar, x_rvar);
|
||||
BOOST_REQUIRE_CLOSE(z.item(), expected, boost_close_tol<T>());
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
z.backward();
|
||||
|
||||
T denom = x_v * x_v + y_v * y_v;
|
||||
T dy_expected = x_v / denom;
|
||||
T dx_expected = -y_v / denom;
|
||||
|
||||
BOOST_REQUIRE_CLOSE(y_rvar.adjoint(), dy_expected, boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), dx_expected, boost_close_tol<T>());
|
||||
}
|
||||
|
||||
{
|
||||
rvar<T, 1> y2 = y_v;
|
||||
rvar<T, 1> z = atan2(y2, x_v);
|
||||
BOOST_REQUIRE_CLOSE(z.item(), expected, boost_close_tol<T>());
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
z.backward();
|
||||
|
||||
T dy_expected = x_v / (x_v * x_v + y_v * y_v);
|
||||
|
||||
BOOST_REQUIRE_CLOSE(y2.adjoint(), dy_expected, boost_close_tol<T>());
|
||||
}
|
||||
|
||||
{
|
||||
rvar<T, 1> x2 = x_v;
|
||||
rvar<T, 1> z = atan2(y_v, x2);
|
||||
BOOST_REQUIRE_CLOSE(z.item(), expected, boost_close_tol<T>());
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
z.backward();
|
||||
|
||||
T dx_expected = -y_v / (x_v * x_v + y_v * y_v);
|
||||
|
||||
BOOST_REQUIRE_CLOSE(x2.adjoint(), dx_expected, boost_close_tol<T>());
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_trunc, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x_v = rng.next();
|
||||
T test_trunc_v = trunc(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_trunc = trunc(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_trunc.item(), test_trunc_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
x_trunc.backward();
|
||||
BOOST_REQUIRE_EQUAL(x_rvar.adjoint(), 0.0);
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_fmod, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng_x{-100, 100};
|
||||
RandomSample<T> rng_y{-100, 100};
|
||||
|
||||
T x_v = rng_x.next();
|
||||
T y_v = rng_y.next();
|
||||
while (y_v == 0.0) {
|
||||
y_v = rng_y.next();
|
||||
}
|
||||
|
||||
T expected_fmod = fmod(x_v, y_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
rvar<T, 1> y_rvar = y_v;
|
||||
|
||||
rvar<T, 1> fmod_rvar = fmod(x_rvar, y_rvar);
|
||||
BOOST_REQUIRE_CLOSE(fmod_rvar.item(), expected_fmod, boost_close_tol<T>());
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
fmod_rvar.backward();
|
||||
|
||||
T dx_expected = 1.0;
|
||||
T dy_expected = -1.0 * trunc(x_v / y_v);
|
||||
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), dx_expected, boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(y_rvar.adjoint(), dy_expected, boost_close_tol<T>());
|
||||
|
||||
rvar<T, 1> fmod_rvar_float = fmod(x_rvar, y_v);
|
||||
BOOST_REQUIRE_CLOSE(fmod_rvar_float.item(), expected_fmod, boost_close_tol<T>());
|
||||
|
||||
tape.zero_grad();
|
||||
fmod_rvar_float.backward();
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), dx_expected, boost_close_tol<T>());
|
||||
|
||||
rvar<T, 1> fmod_float_rvar = fmod(x_v, y_rvar);
|
||||
BOOST_REQUIRE_CLOSE(fmod_float_rvar.item(), expected_fmod, boost_close_tol<T>());
|
||||
|
||||
tape.zero_grad();
|
||||
fmod_float_rvar.backward();
|
||||
BOOST_REQUIRE_CLOSE(y_rvar.adjoint(), dy_expected, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_round, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x_v = rng.next();
|
||||
T test_round_v = round(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_round = round(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_round.item(), test_round_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
x_round.backward();
|
||||
BOOST_REQUIRE_EQUAL(x_rvar.adjoint(), 0.0);
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_iround, T, all_float_types)
|
||||
{
|
||||
using boost::math::iround;
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x_v = rng.next();
|
||||
int test_round_v = iround(x_v);
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
int x_round = iround(x_rvar);
|
||||
BOOST_REQUIRE_EQUAL(x_round, test_round_v);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_lround, T, all_float_types)
|
||||
{
|
||||
using boost::math::lround;
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x_v = rng.next();
|
||||
long test_round_v = lround(x_v);
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
long x_round = lround(x_rvar);
|
||||
BOOST_REQUIRE_EQUAL(x_round, test_round_v);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_llround, T, all_float_types)
|
||||
{
|
||||
using boost::math::llround;
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x_v = rng.next();
|
||||
long long test_round_v = llround(x_v);
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
long long x_round = llround(x_rvar);
|
||||
BOOST_REQUIRE_EQUAL(x_round, test_round_v);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_itrunc, T, all_float_types)
|
||||
{
|
||||
using boost::math::itrunc;
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x_v = rng.next();
|
||||
int test_trunc_v = itrunc(x_v);
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
int x_trunc = itrunc(x_rvar);
|
||||
BOOST_REQUIRE_EQUAL(x_trunc, test_trunc_v);
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_ltrunc, T, all_float_types)
|
||||
{
|
||||
using boost::math::ltrunc;
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x_v = rng.next();
|
||||
long test_trunc_v = ltrunc(x_v);
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
long x_trunc = ltrunc(x_rvar);
|
||||
BOOST_REQUIRE_EQUAL(x_trunc, test_trunc_v);
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_lltrunc, T, all_float_types)
|
||||
{
|
||||
using boost::math::lltrunc;
|
||||
RandomSample<T> rng{-100, 100};
|
||||
T x_v = rng.next();
|
||||
int test_trunc_v = lltrunc(x_v);
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
int x_trunc = lltrunc(x_rvar);
|
||||
BOOST_REQUIRE_EQUAL(x_trunc, test_trunc_v);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_sinh, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-10, 10};
|
||||
T x_v = rng.next();
|
||||
T test_func_v = sinh(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_func = sinh(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> test_func_2 = sinh(x_rvar * x_rvar);
|
||||
T expected_deriv = 2 * x_v * cosh(x_v * x_v);
|
||||
test_func_2.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_cosh, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-10, 10};
|
||||
T x_v = rng.next();
|
||||
T test_func_v = cosh(x_v);
|
||||
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
|
||||
rvar<T, 1> x_func = cosh(x_rvar);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> test_func_2 = cosh(x_rvar * x_rvar);
|
||||
T expected_deriv = 2 * x_v * sinh(x_v * x_v);
|
||||
test_func_2.backward();
|
||||
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_tanh, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{-10, 10};
|
||||
T x_v = rng.next();
|
||||
T test_func_v = tanh(x_v);
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
rvar<T, 1> x_func = tanh(x_rvar);
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> test_func_2 = tanh(x_rvar * x_rvar);
|
||||
T expected_deriv = 2 * x_v / (cosh(x_v * x_v) * cosh(x_v * x_v));
|
||||
test_func_2.backward();
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_log10, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{0.0001, 10};
|
||||
T x_v = rng.next();
|
||||
T test_func_v = log10(x_v);
|
||||
rvar<T, 1> x_rvar = x_v;
|
||||
rvar<T, 1> x_func = log10(x_rvar);
|
||||
BOOST_REQUIRE_EQUAL(x_func.item(), test_func_v);
|
||||
gradient_tape<T, 1>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
rvar<T, 1> test_func_2 = log10(x_rvar * x_rvar);
|
||||
T expected_deriv = 2 / (x_v * log(10));
|
||||
test_func_2.backward();
|
||||
BOOST_REQUIRE_CLOSE(x_rvar.adjoint(), expected_deriv, boost_close_tol<T>());
|
||||
tape.clear();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T test_function_1(const T& x, const T& y)
|
||||
{
|
||||
/** @brief test function for
|
||||
* log
|
||||
* abs
|
||||
* exp
|
||||
* pow
|
||||
* sqrt
|
||||
*/
|
||||
auto y1 = log(1 + abs(x)) * exp(y);
|
||||
auto y2 = pow(x + y, 2.5);
|
||||
auto y3 = sqrt(1 + x * y);
|
||||
return y1 + y2 - y3;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::vector<T> grad_test_func_1_analytical(T x, T y)
|
||||
{
|
||||
T f_x = static_cast<T>(-1.0 / 2.0 * y / sqrt(x * y + 1) + 2.5 * pow(x + y, 1.5)
|
||||
+ sqrt(pow(x, 2)) * exp(y) / (x * (sqrt(pow(x, 2)) + 1)));
|
||||
T f_y = static_cast<T>(-1.0 / 2.0 * x / sqrt(x * y + 1) + 2.5 * pow(x + y, 1.5)
|
||||
+ exp(y) * log(sqrt(pow(x, 2)) + 1));
|
||||
return {f_x, f_y};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::vector<std::vector<T>> grad2_test_func_1_analytical(T x, T y)
|
||||
{
|
||||
T f_xx = static_cast<T>((1.0 / 4.0) * pow(y, 2) / pow(x * y + 1, 3.0 / 2.0) + 3.75 * sqrt(x + y)
|
||||
- exp(y) / pow(sqrt(pow(x, 2)) + 1, 2));
|
||||
T f_xy = static_cast<T>((1.0 / 4.0) * x * y / pow(x * y + 1, 3.0 / 2.0) + 3.75 * sqrt(x + y)
|
||||
- (1.0 / 2.0) / sqrt(x * y + 1)
|
||||
+ sqrt(pow(x, 2)) * exp(y) / (x * (sqrt(pow(x, 2)) + 1)));
|
||||
T f_yx = static_cast<T>((1.0 / 4.0) * x * y / pow(x * y + 1, 3.0 / 2.0) + 3.75 * sqrt(x + y)
|
||||
- (1.0 / 2.0) / sqrt(x * y + 1)
|
||||
+ sqrt(pow(x, 2)) * exp(y) / (x * (sqrt(pow(x, 2)) + 1)));
|
||||
T f_yy = static_cast<T>((1.0 / 4.0) * pow(x, 2) / pow(x * y + 1, 3.0 / 2.0) + 3.75 * sqrt(x + y)
|
||||
+ exp(y) * log(sqrt(pow(x, 2)) + 1));
|
||||
return {{f_xx, f_xy}, {f_yx, f_yy}};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::vector<std::vector<std::vector<T>>> grad3_test_func_1_analytical(T x, T y)
|
||||
{
|
||||
T f_xxx = static_cast<T>(-3.0 / 8.0 * pow(y, 3) / pow(x * y + 1, 5.0 / 2.0)
|
||||
+ 1.875 * pow(x + y, -0.5)
|
||||
+ 2 * sqrt(pow(x, 2)) * exp(y) / (x * pow(sqrt(pow(x, 2)) + 1, 3)));
|
||||
T f_xxy = static_cast<T>(-3.0 / 8.0 * x * pow(y, 2) / pow(x * y + 1, 5.0 / 2.0)
|
||||
+ (1.0 / 2.0) * y / pow(x * y + 1, 3.0 / 2.0)
|
||||
+ 1.875 * pow(x + y, -0.5) - exp(y) / pow(sqrt(pow(x, 2)) + 1, 2));
|
||||
T f_xyx = static_cast<T>(-3.0 / 8.0 * x * pow(y, 2) / pow(x * y + 1, 5.0 / 2.0)
|
||||
+ (1.0 / 2.0) * y / pow(x * y + 1, 3.0 / 2.0)
|
||||
+ 1.875 * pow(x + y, -0.5) - exp(y) / pow(sqrt(pow(x, 2)) + 1, 2));
|
||||
T f_xyy = static_cast<T>(-3.0 / 8.0 * pow(x, 2) * y / pow(x * y + 1, 5.0 / 2.0)
|
||||
+ (1.0 / 2.0) * x / pow(x * y + 1, 3.0 / 2.0) + 1.875 * pow(x + y, -0.5)
|
||||
+ sqrt(pow(x, 2)) * exp(y) / (x * (sqrt(pow(x, 2)) + 1)));
|
||||
T f_yxx = static_cast<T>(-3.0 / 8.0 * x * pow(y, 2) / pow(x * y + 1, 5.0 / 2.0)
|
||||
+ (1.0 / 2.0) * y / pow(x * y + 1, 3.0 / 2.0)
|
||||
+ 1.875 * pow(x + y, -0.5) - exp(y) / pow(sqrt(pow(x, 2)) + 1, 2));
|
||||
T f_yxy = static_cast<T>(-3.0 / 8.0 * pow(x, 2) * y / pow(x * y + 1, 5.0 / 2.0)
|
||||
+ (1.0 / 2.0) * x / pow(x * y + 1, 3.0 / 2.0) + 1.875 * pow(x + y, -0.5)
|
||||
+ sqrt(pow(x, 2)) * exp(y) / (x * (sqrt(pow(x, 2)) + 1)));
|
||||
T f_yyx = static_cast<T>(-3.0 / 8.0 * pow(x, 2) * y / pow(x * y + 1, 5.0 / 2.0)
|
||||
+ (1.0 / 2.0) * x / pow(x * y + 1, 3.0 / 2.0) + 1.875 * pow(x + y, -0.5)
|
||||
+ sqrt(pow(x, 2)) * exp(y) / (x * (sqrt(pow(x, 2)) + 1)));
|
||||
T f_yyy = static_cast<T>(-3.0 / 8.0 * pow(x, 3) / pow(x * y + 1, 5.0 / 2.0)
|
||||
+ 1.875 * pow(x + y, -0.5) + exp(y) * log(sqrt(pow(x, 2)) + 1));
|
||||
return {{{f_xxx, f_xxy}, {f_xyx, f_xyy}}, {{f_yxx, f_yxy}, {f_yyx, f_yyy}}};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::vector<std::vector<std::vector<std::vector<T>>>> grad4_test_func_1_analytical(T x, T y)
|
||||
{
|
||||
T f_xxxx = static_cast<T>((15.0 / 16.0) * pow(y, 4) / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5)
|
||||
- 6 * exp(y) / pow(sqrt(pow(x, 2)) + 1, 4));
|
||||
T f_xxxy = static_cast<T>((15.0 / 16.0) * x * pow(y, 3) / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 9.0 / 8.0 * pow(y, 2) / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5)
|
||||
+ 2 * sqrt(pow(x, 2)) * exp(y) / (x * pow(sqrt(pow(x, 2)) + 1, 3)));
|
||||
T f_xxyx = static_cast<T>((15.0 / 16.0) * x * pow(y, 3) / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 9.0 / 8.0 * pow(y, 2) / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5)
|
||||
+ 2 * sqrt(pow(x, 2)) * exp(y) / (x * pow(sqrt(pow(x, 2)) + 1, 3)));
|
||||
T f_xxyy = static_cast<T>((15.0 / 16.0) * pow(x, 2) * pow(y, 2) / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 3.0 / 2.0 * x * y / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5) - exp(y) / pow(sqrt(pow(x, 2)) + 1, 2)
|
||||
+ (1.0 / 2.0) / pow(x * y + 1, 3.0 / 2.0));
|
||||
T f_xyxx = static_cast<T>((15.0 / 16.0) * x * pow(y, 3) / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 9.0 / 8.0 * pow(y, 2) / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5)
|
||||
+ 2 * sqrt(pow(x, 2)) * exp(y) / (x * pow(sqrt(pow(x, 2)) + 1, 3)));
|
||||
T f_xyxy = static_cast<T>((15.0 / 16.0) * pow(x, 2) * pow(y, 2) / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 3.0 / 2.0 * x * y / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5) - exp(y) / pow(sqrt(pow(x, 2)) + 1, 2)
|
||||
+ (1.0 / 2.0) / pow(x * y + 1, 3.0 / 2.0));
|
||||
T f_xyyx = static_cast<T>((15.0 / 16.0) * pow(x, 2) * pow(y, 2) / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 3.0 / 2.0 * x * y / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5) - exp(y) / pow(sqrt(pow(x, 2)) + 1, 2)
|
||||
+ (1.0 / 2.0) / pow(x * y + 1, 3.0 / 2.0));
|
||||
T f_xyyy = static_cast<T>((15.0 / 16.0) * pow(x, 3) * y / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 9.0 / 8.0 * pow(x, 2) / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5)
|
||||
+ sqrt(pow(x, 2)) * exp(y) / (x * (sqrt(pow(x, 2)) + 1)));
|
||||
T f_yxxx = static_cast<T>((15.0 / 16.0) * x * pow(y, 3) / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 9.0 / 8.0 * pow(y, 2) / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5)
|
||||
+ 2 * sqrt(pow(x, 2)) * exp(y) / (x * pow(sqrt(pow(x, 2)) + 1, 3)));
|
||||
T f_yxxy = static_cast<T>((15.0 / 16.0) * pow(x, 2) * pow(y, 2) / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 3.0 / 2.0 * x * y / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5) - exp(y) / pow(sqrt(pow(x, 2)) + 1, 2)
|
||||
+ (1.0 / 2.0) / pow(x * y + 1, 3.0 / 2.0));
|
||||
T f_yxyx = static_cast<T>((15.0 / 16.0) * pow(x, 2) * pow(y, 2) / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 3.0 / 2.0 * x * y / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5) - exp(y) / pow(sqrt(pow(x, 2)) + 1, 2)
|
||||
+ (1.0 / 2.0) / pow(x * y + 1, 3.0 / 2.0));
|
||||
T f_yxyy = static_cast<T>((15.0 / 16.0) * pow(x, 3) * y / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 9.0 / 8.0 * pow(x, 2) / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5)
|
||||
+ sqrt(pow(x, 2)) * exp(y) / (x * (sqrt(pow(x, 2)) + 1)));
|
||||
T f_yyxx = static_cast<T>((15.0 / 16.0) * pow(x, 2) * pow(y, 2) / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 3.0 / 2.0 * x * y / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5) - exp(y) / pow(sqrt(pow(x, 2)) + 1, 2)
|
||||
+ (1.0 / 2.0) / pow(x * y + 1, 3.0 / 2.0));
|
||||
T f_yyxy = static_cast<T>((15.0 / 16.0) * pow(x, 3) * y / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 9.0 / 8.0 * pow(x, 2) / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5)
|
||||
+ sqrt(pow(x, 2)) * exp(y) / (x * (sqrt(pow(x, 2)) + 1)));
|
||||
T f_yyyx = static_cast<T>((15.0 / 16.0) * pow(x, 3) * y / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 9.0 / 8.0 * pow(x, 2) / pow(x * y + 1, 5.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5)
|
||||
+ sqrt(pow(x, 2)) * exp(y) / (x * (sqrt(pow(x, 2)) + 1)));
|
||||
T f_yyyy = static_cast<T>((15.0 / 16.0) * pow(x, 4) / pow(x * y + 1, 7.0 / 2.0)
|
||||
- 0.9375 * pow(x + y, -1.5) + exp(y) * log(sqrt(pow(x, 2)) + 1));
|
||||
return {{{{f_xxxx, f_xxxy}, {f_xxyx, f_xxyy}}, {{f_xyxx, f_xyxy}, {f_xyyx, f_xyyy}}},
|
||||
{{{f_yxxx, f_yxxy}, {f_yxyx, f_yxyy}}, {{f_yyxx, f_yyxy}, {f_yyyx, f_yyyy}}}};
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_func_1_first_derivative, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{0.0001, 10};
|
||||
T x = rng.next();
|
||||
T y = rng.next();
|
||||
|
||||
rvar<T, 1> x_ad = x;
|
||||
rvar<T, 1> y_ad = y;
|
||||
|
||||
T fv = test_function_1(x, y);
|
||||
rvar<T, 1> f_ad = test_function_1(x_ad, y_ad);
|
||||
auto grad_f_analytical = grad_test_func_1_analytical(x, y);
|
||||
/* intended use case */
|
||||
f_ad.backward();
|
||||
BOOST_REQUIRE_CLOSE(x_ad.adjoint(), grad_f_analytical[0], boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(y_ad.adjoint(), grad_f_analytical[1], boost_close_tol<T>());
|
||||
|
||||
gradient_tape<T, 1, BUFFER_SIZE>& tape = get_active_tape<T, 1>();
|
||||
tape.zero_grad();
|
||||
|
||||
/* grad test */
|
||||
auto grad_func_test_grad = grad(f_ad, &x_ad, &y_ad);
|
||||
/* grad_nd test */
|
||||
auto grad_nd_func_test_grad = grad_nd<1>(f_ad, &x_ad, &y_ad);
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
BOOST_REQUIRE_CLOSE(grad_func_test_grad[i], grad_f_analytical[i], boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(grad_nd_func_test_grad[i], grad_f_analytical[i], boost_close_tol<T>());
|
||||
}
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_func_1_second_derivative_and_hessian, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{0.0001, 10};
|
||||
T x = rng.next();
|
||||
T y = rng.next();
|
||||
|
||||
rvar<T, 2> x_ad = x;
|
||||
rvar<T, 2> y_ad = y;
|
||||
|
||||
T fv = test_function_1(x, y);
|
||||
rvar<T, 2> f_ad = test_function_1(x_ad, y_ad);
|
||||
gradient_tape<T, 2, BUFFER_SIZE>& tape = get_active_tape<T, 2>();
|
||||
tape.zero_grad();
|
||||
|
||||
auto hess_analytical = grad2_test_func_1_analytical(x, y);
|
||||
auto hess_func_test = hess(f_ad, &x_ad, &y_ad);
|
||||
auto grad_nd_func_test = grad_nd<2>(f_ad, &x_ad, &y_ad);
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
BOOST_REQUIRE_CLOSE(hess_func_test[i][j], hess_analytical[i][j], boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(hess_func_test[i][j], grad_nd_func_test[i][j], boost_close_tol<T>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_func_1_order_3_der, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{0.0001, 10};
|
||||
T x = rng.next();
|
||||
T y = rng.next();
|
||||
|
||||
rvar<T, 3> x_ad = x;
|
||||
rvar<T, 3> y_ad = y;
|
||||
|
||||
T fv = test_function_1(x, y);
|
||||
rvar<T, 3> f_ad = test_function_1(x_ad, y_ad);
|
||||
gradient_tape<T, 3, BUFFER_SIZE>& tape = get_active_tape<T, 3>();
|
||||
tape.zero_grad();
|
||||
|
||||
auto df3 = grad3_test_func_1_analytical(x, y);
|
||||
auto grad_ad = grad(f_ad, &x_ad, &y_ad);
|
||||
|
||||
std::vector<std::vector<std::vector<T>>> grad_tensor;
|
||||
for (int i = 0; i < 2; i++) {
|
||||
auto df_hess = hess(*grad_ad[i], &x_ad, &y_ad);
|
||||
grad_tensor.push_back(df_hess);
|
||||
}
|
||||
auto grad_nd_func_test = grad_nd<3>(f_ad, &x_ad, &y_ad);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
for (int k = 0; k < 2; k++) {
|
||||
BOOST_REQUIRE_CLOSE(grad_tensor[i][j][k], df3[i][j][k], boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(grad_nd_func_test[i][j][k], df3[i][j][k], boost_close_tol<T>());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(test_func_1_fourth_derivative, T, all_float_types)
|
||||
{
|
||||
RandomSample<T> rng{0.0001, 10};
|
||||
|
||||
T x_val = rng.next();
|
||||
T y_val = rng.next();
|
||||
|
||||
rvar<T, 4> x_ad = x_val;
|
||||
rvar<T, 4> y_ad = y_val;
|
||||
rvar<T, 4> f_ad = test_function_1(x_ad, y_ad);
|
||||
|
||||
auto df4 = grad4_test_func_1_analytical(x_val, y_val);
|
||||
auto gf = grad(f_ad, &x_ad, &y_ad);
|
||||
std::array<std::array<std::array<std::array<T, 2>, 2>, 2>, 2> ggggf;
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
auto hess1 = grad(*gf[i], &x_ad, &y_ad);
|
||||
for (int j = 0; j < 2; ++j) {
|
||||
auto hess2 = grad(*hess1[j], &x_ad, &y_ad);
|
||||
for (int k = 0; k < 2; ++k) {
|
||||
auto hess3 = grad(*hess2[k], &x_ad, &y_ad);
|
||||
for (int l = 0; l < 2; ++l) {
|
||||
ggggf[i][j][k][l] = hess3[l];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
auto grad_nd_func_test = grad_nd<4>(f_ad, &x_ad, &y_ad);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
for (int k = 0; k < 2; k++) {
|
||||
for (int l = 0; l < 2; l++) {
|
||||
BOOST_REQUIRE_CLOSE(ggggf[i][j][k][l], df4[i][j][k][l], boost_close_tol<T>());
|
||||
BOOST_REQUIRE_CLOSE(grad_nd_func_test[i][j][k][l],
|
||||
df4[i][j][k][l],
|
||||
boost_close_tol<T>());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
Reference in New Issue
Block a user