Replace deprecated VTK and thrust functions, fix other problems with thrust - #6460
Open
mvieth wants to merge 2 commits into
Open
Replace deprecated VTK and thrust functions, fix other problems with thrust#6460mvieth wants to merge 2 commits into
mvieth wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.
Suppressed comments (3)
gpu/surface/src/cuda/convex_hull.cu:55
- THRUST_VERSION and cuda::std::distance are used below, but the required headers are not included explicitly. Add <thrust/version.h> to guarantee THRUST_VERSION is defined, and include <cuda/std/iterator> (or equivalent) for cuda::std::distance to avoid relying on transitive includes.
#include <thrust/distance.h>
#include <thrust/tuple.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/transform_reduce.h>
#include <thrust/functional.h>
#include <thrust/sequence.h>
#include "thrust/device_ptr.h"
#include <thrust/transform.h>
visualization/src/point_cloud_handlers.cpp:625
- This file now uses VTK_MAJOR_VERSION/VTK_MINOR_VERSION for conditional compilation, but it doesn't include <vtkVersion.h> anywhere in this translation unit. Relying on transitive includes for these macros is brittle and can break compilation when include order changes; include <vtkVersion.h> explicitly (typically in the includes section near the top of the file).
#if (VTK_MAJOR_VERSION > 9) || (VTK_MAJOR_VERSION == 9 && VTK_MINOR_VERSION >= 7)
if (!data->ReserveTuples(nr_points))
#else
if (!data->Resize(nr_points))
#endif
tools/virtual_scanner.cpp:247
- This new VTK version guard uses VTK_MAJOR_VERSION/VTK_MINOR_VERSION, but the file does not include <vtkVersion.h>. To avoid compilation depending on transitive includes, add #include <vtkVersion.h> in the file's include list.
#if (VTK_MAJOR_VERSION < 9) || (VTK_MAJOR_VERSION == 9 && VTK_MINOR_VERSION < 7)
// deprecated because it is a no-op, starting with VTK 9.7.0
tree->SetTolerance (0.0);
#endif
mvieth
force-pushed
the
replace_deprecated2
branch
from
August 9, 2026 12:19
9a2bc23 to
0d3867e
Compare
mvieth
marked this pull request as ready for review
August 10, 2026 09:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vtkTransformPolyDataFilterwithvtkTransformFilterthrust::namespace totransformfunctions to resolve ambiguitythrust::maximumwithcuda::maximumthrust:distancewithcuda::std::distanceAllocatewithReserveValuesandResizewithReserveTuples(VTK)