From f4caf1e82718bb1ea4a47a5487729ea5b28883d4 Mon Sep 17 00:00:00 2001 From: Vaibhav Thakkar Date: Fri, 27 Oct 2023 02:49:01 +0530 Subject: [PATCH] include algorithm --- .github/workflows/ci.yml | 2 +- include/clad/Differentiator/BuiltinDerivatives.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c1689bde..27fb8b2a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -748,7 +748,7 @@ jobs: if: ${{ failure() }} uses: mxschmitt/action-tmate@v3 # When debugging increase to a suitable value! - timeout-minutes: ${{ github.event.pull_request && 1 || 20 }} + timeout-minutes: ${{ github.event.pull_request && 20 || 20 }} - name: Prepare code coverage report if: ${{ success() && (matrix.coverage == true) }} run: | diff --git a/include/clad/Differentiator/BuiltinDerivatives.h b/include/clad/Differentiator/BuiltinDerivatives.h index d7dd9d859..f61afb550 100644 --- a/include/clad/Differentiator/BuiltinDerivatives.h +++ b/include/clad/Differentiator/BuiltinDerivatives.h @@ -13,6 +13,7 @@ namespace custom_derivatives{} #include "clad/Differentiator/ArrayRef.h" #include "clad/Differentiator/CladConfig.h" +#include #include namespace clad { @@ -171,7 +172,7 @@ CUDA_HOST_DEVICE void max_pullback(const T& a, const T& b, U d_y, *d_a += d_y; } -#if __cplusplus >= 201703L +#ifdef __cpp_lib_clamp template CUDA_HOST_DEVICE ValueAndPushforward clamp_pushforward(const T& v, const T& lo, const T& hi, const T& d_v,