mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
[upstream_utils] Upgrade to Sleipnir 0.6.3 (#9030)
Also drop patches since we're now on C++23.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Sun, 16 Jun 2024 12:08:49 -0700
|
||||
Subject: [PATCH 1/2] Use wpi::SmallVector
|
||||
|
||||
---
|
||||
include/sleipnir/autodiff/expression.hpp | 4 ++--
|
||||
include/sleipnir/autodiff/variable.hpp | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/include/sleipnir/autodiff/expression.hpp b/include/sleipnir/autodiff/expression.hpp
|
||||
index 1e0a57bd78bdd6a41d87539c1e4536aed8bfc42d..8b1c520934580ccc94d0a7e46ab500e6bdd65207 100644
|
||||
--- a/include/sleipnir/autodiff/expression.hpp
|
||||
+++ b/include/sleipnir/autodiff/expression.hpp
|
||||
@@ -34,7 +34,7 @@ struct Expression;
|
||||
template <typename Scalar>
|
||||
constexpr void inc_ref_count(Expression<Scalar>* expr);
|
||||
template <typename Scalar>
|
||||
-constexpr void dec_ref_count(Expression<Scalar>* expr);
|
||||
+void dec_ref_count(Expression<Scalar>* expr);
|
||||
|
||||
/// Typedef for intrusive shared pointer to Expression.
|
||||
///
|
||||
@@ -727,7 +727,7 @@ constexpr void inc_ref_count(Expression<Scalar>* expr) {
|
||||
/// @tparam Scalar Scalar type.
|
||||
/// @param expr The shared pointer's managed object.
|
||||
template <typename Scalar>
|
||||
-constexpr void dec_ref_count(Expression<Scalar>* expr) {
|
||||
+void dec_ref_count(Expression<Scalar>* expr) {
|
||||
// If a deeply nested tree is being deallocated all at once, calling the
|
||||
// Expression destructor when expr's refcount reaches zero can cause a stack
|
||||
// overflow. Instead, we iterate over its children to decrement their
|
||||
diff --git a/include/sleipnir/autodiff/variable.hpp b/include/sleipnir/autodiff/variable.hpp
|
||||
index a6b054494a18eacbcae10c0e88648550a39ed48e..ad8baa3b58047f5257c210b88446324cca121d4a 100644
|
||||
--- a/include/sleipnir/autodiff/variable.hpp
|
||||
+++ b/include/sleipnir/autodiff/variable.hpp
|
||||
@@ -58,7 +58,7 @@ class Variable : public SleipnirBase {
|
||||
Variable() = default;
|
||||
|
||||
/// Constructs an empty Variable.
|
||||
- explicit constexpr Variable(std::nullptr_t) : expr{nullptr} {}
|
||||
+ explicit Variable(std::nullptr_t) : expr{nullptr} {}
|
||||
|
||||
/// Constructs a Variable from a scalar type.
|
||||
///
|
||||
@@ -101,7 +101,7 @@ class Variable : public SleipnirBase {
|
||||
/// Constructs a Variable pointing to the specified expression.
|
||||
///
|
||||
/// @param expr The autodiff variable.
|
||||
- explicit constexpr Variable(detail::ExpressionPtr<Scalar>&& expr)
|
||||
+ explicit Variable(detail::ExpressionPtr<Scalar>&& expr)
|
||||
: expr{std::move(expr)} {}
|
||||
|
||||
/// Assignment operator for scalar.
|
||||
Reference in New Issue
Block a user