File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -237,6 +237,7 @@ hunter_default_version(cpp-statsd-client VERSION 1.0.1-42f02b4-p0)
237237hunter_default_version (cpp_redis VERSION 3.5.0-h1 )
238238hunter_default_version (cppast VERSION 0.0.0-b155d6a-p0 )
239239hunter_default_version (cppcodec VERSION 0.2-p0 )
240+ hunter_default_version (cppduals VERSION 0.9.2 )
240241hunter_default_version (cppfs VERSION 1.3.0 )
241242hunter_default_version (cpr VERSION 1.3.0 )
242243hunter_default_version (cpuinfo VERSION 0.0.0-d5e37ad-p0 )
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2026, Michael Tesch
2+ # All rights reserved.
3+
4+ # !!! DO NOT PLACE HEADER GUARDS HERE !!!
5+
6+ include (hunter_add_version )
7+ include (hunter_cacheable )
8+ include (hunter_cmake_args )
9+ include (hunter_download )
10+ include (hunter_pick_scheme )
11+
12+ hunter_add_version (
13+ PACKAGE_NAME
14+ cppduals
15+ VERSION
16+ 0.9.2
17+ URL
18+ "https://gitlab.com/tesch1/cppduals/-/archive/v0.9.2/cppduals-v0.9.2.tar.gz"
19+ SHA1
20+ 1478c1fe45269470182f0222056c27ab0e22dda8
21+ )
22+
23+ hunter_cmake_args (
24+ cppduals
25+ CMAKE_ARGS
26+ CPPDUALS_TESTING=OFF
27+ CPPDUALS_BENCHMARK=OFF
28+ )
29+
30+ hunter_pick_scheme (DEFAULT url_sha1_cmake )
31+ hunter_cacheable (cppduals )
32+ hunter_download (PACKAGE_NAME cppduals )
Original file line number Diff line number Diff line change 1010 - :ref: `pkg.GSL ` - GNU Scientific Library
1111 - :ref: `pkg.HastyNoise ` - SIMD open source noise generation library with a large collection of different noise algorithms.
1212 - :ref: `pkg.OpenBLAS ` - OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version
13+ - :ref: `pkg.cppduals ` - header-only dual number library for exact forward-mode automatic differentiation.
1314 - :ref: `pkg.double-conversion ` - provides binary-decimal and decimal-binary routines for IEEE doubles.
1415 - :ref: `pkg.gemmlowp ` - Low-precision matrix multiplication.
1516 - :ref: `pkg.glm ` - header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specifications.
Original file line number Diff line number Diff line change 1+ .. spelling :word-list ::
2+
3+ cppduals
4+ autodiff
5+
6+ .. index :: math ; cppduals
7+
8+ .. _pkg.cppduals :
9+
10+ cppduals
11+ ========
12+
13+ - https://gitlab.com/tesch1/cppduals
14+ - `Documentation <https://tesch1.gitlab.io/cppduals/ >`__
15+ - Maintainer: https://github.com/tesch1
16+
17+ Header-only dual number library for exact forward-mode automatic
18+ differentiation, with optional Eigen integration.
19+
20+ If you use this in research, please cite
21+ `doi:10.21105/joss.01487 <https://doi.org/10.21105/joss.01487 >`__
22+ (Tesch, JOSS 4(43):1487, 2019).
23+
24+ .. literalinclude :: /../examples/cppduals/CMakeLists.txt
25+ :language: cmake
26+ :start-after: # DOCUMENTATION_START {
27+ :end-before: # DOCUMENTATION_END }
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2026, Michael Tesch
2+ # All rights reserved.
3+
4+ cmake_minimum_required (VERSION 3.10 )
5+
6+ # Emulate HunterGate:
7+ # * https://github.com/hunter-packages/gate
8+ include ("../common.cmake" )
9+
10+ project (download-cppduals)
11+
12+ # DOCUMENTATION_START {
13+ hunter_add_package (cppduals )
14+ find_package (cppduals CONFIG REQUIRED )
15+
16+ add_executable (foo foo.cpp )
17+ target_link_libraries (foo cppduals::duals )
18+ # DOCUMENTATION_END }
19+
20+ set_target_properties (foo PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED YES )
Original file line number Diff line number Diff line change 1+ #include < duals/dual> // duals::dual
2+ #include < iostream> // std::cout
3+
4+ int main () {
5+ using namespace duals ::literals;
6+ auto y = (2.0 + 1 .0_e) * sin (2.0 + 1 .0_e);
7+ std::cout << " f(2) = " << rpart (y) << " , f'(2) = " << dpart (y) << std::endl;
8+ }
You can’t perform that action at this time.
0 commit comments