mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Switch to FixedArray implementation from abseil.
This PR changes the implementation of the current fixed array to the abseil one, which has proper allocator support. Some minor changes are made to make the fixed array implementation self-contained (no dependent to abseil): - No address sanitizer support (red zones, etc.) - Remove of noexecpt specified for copy and move constructor. - Remove of 'at' function as Ceres does not use exceptions. - Use std::tuple instead of absl::CompressedTuple as it uses the abseil utility header which includes a whole bunch of other headers. Change-Id: I43445b42c37f944509b5353a587d0efce74cbccf
This commit is contained in:
@@ -125,7 +125,7 @@ struct NumericDiff {
|
||||
// compute the derivative for that parameter.
|
||||
FixedArray<double> temp_residual_array(num_residuals_internal);
|
||||
FixedArray<double> residual_array(num_residuals_internal);
|
||||
Map<ResidualVector> residuals(residual_array.get(),
|
||||
Map<ResidualVector> residuals(residual_array.data(),
|
||||
num_residuals_internal);
|
||||
|
||||
for (int j = 0; j < parameter_block_size_internal; ++j) {
|
||||
@@ -140,8 +140,8 @@ struct NumericDiff {
|
||||
residuals_at_eval_point,
|
||||
parameters,
|
||||
x_plus_delta.data(),
|
||||
temp_residual_array.get(),
|
||||
residual_array.get())) {
|
||||
temp_residual_array.data(),
|
||||
residual_array.data())) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
@@ -152,8 +152,8 @@ struct NumericDiff {
|
||||
residuals_at_eval_point,
|
||||
parameters,
|
||||
x_plus_delta.data(),
|
||||
temp_residual_array.get(),
|
||||
residual_array.get())) {
|
||||
temp_residual_array.data(),
|
||||
residual_array.data())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user