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
+5 -4
View File
@@ -35,7 +35,8 @@
#include <array>
#include <vector>
#include "ceres/internal/fixed_array.h"
#include "absl/container/fixed_array.h"
#include "absl/log/check.h"
#include "ceres/types.h"
namespace ceres::internal {
@@ -47,7 +48,7 @@ namespace ceres::internal {
// Three different containers are selected in different scenarios:
//
// num_elements == DYNAMIC:
// -> ceres::internal::FixedArray<T, max_stack_size>(size)
// -> absl::FixedArray<T, max_stack_size>(size)
// num_elements != DYNAMIC && num_elements <= max_stack_size
// -> std::array<T,num_elements>
@@ -71,9 +72,9 @@ struct ArraySelector<T,
max_num_elements_on_stack,
true,
fits_on_stack>
: ceres::internal::FixedArray<T, max_num_elements_on_stack> {
: absl::FixedArray<T, max_num_elements_on_stack> {
explicit ArraySelector(int s)
: ceres::internal::FixedArray<T, max_num_elements_on_stack>(s) {}
: absl::FixedArray<T, max_num_elements_on_stack>(s) {}
};
template <typename T, int num_elements, int max_num_elements_on_stack>