ceres::internal::FixedArray -> absl::FixedArray

Ceres Solver was using an old forked version of FixedArray,
now that we are using absl, we can use the official version
that ships with it.

Change-Id: Ic88d7f6e8a49b928d611f7cbb04172452b322b01
This commit is contained in:
Sameer Agarwal
2024-07-23 12:02:33 -07:00
parent c181b6dbc4
commit ebb66e655f
20 changed files with 57 additions and 1361 deletions
+3 -3
View File
@@ -35,7 +35,7 @@
#include <type_traits>
#include <vector>
#include "ceres/internal/fixed_array.h"
#include "absl/container/fixed_array.h"
#include "ceres/types.h"
#include "gtest/gtest.h"
@@ -47,12 +47,12 @@ namespace ceres::internal {
TEST(ArraySelector, FixedArray) {
ArraySelector<int, DYNAMIC, 20> array1(10);
static_assert(
std::is_base_of<internal::FixedArray<int, 20>, decltype(array1)>::value);
std::is_base_of<absl::FixedArray<int, 20>, decltype(array1)>::value);
EXPECT_EQ(array1.size(), 10);
ArraySelector<int, DYNAMIC, 10> array2(20);
static_assert(
std::is_base_of<internal::FixedArray<int, 10>, decltype(array2)>::value);
std::is_base_of<absl::FixedArray<int, 10>, decltype(array2)>::value);
EXPECT_EQ(array2.size(), 20);
}