mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Remove chunk shuffle in multithreaded SchurEliminator
std::random_shuffle() is deprecated since C++14 and was removed in C++17. At least MSVC with C++17 fails to compile this code, I assume other compilers fail as well. In a Github discussion (#373) Sameer Agarwal states this line can likely be dropped and asks for a PR/CL. https://github.com/ceres-solver/ceres-solver/issues/373 Change-Id: I78e04f36cba398769b8f90916edbdaf33884e7e1
This commit is contained in:
@@ -151,9 +151,6 @@ void SchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::Init(
|
||||
const Chunk& chunk = chunks_.back();
|
||||
|
||||
uneliminated_row_begins_ = chunk.start + chunk.size;
|
||||
if (num_threads_ > 1) {
|
||||
random_shuffle(chunks_.begin(), chunks_.end());
|
||||
}
|
||||
|
||||
buffer_.reset(new double[buffer_size_ * num_threads_]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user