Skip to content

Fix o-voxel compilation on Windows (MSVC narrowing conversions)#107

Open
Unk-Cody wants to merge 1 commit intomicrosoft:mainfrom
Unk-Cody:fix/windows-ovoxel-build
Open

Fix o-voxel compilation on Windows (MSVC narrowing conversions)#107
Unk-Cody wants to merge 1 commit intomicrosoft:mainfrom
Unk-Cody:fix/windows-ovoxel-build

Conversation

@Unk-Cody
Copy link

Description This PR fixes compilation errors encountered when building on Windows using MSVC (Visual Studio 2022).

The Issue MSVC is stricter than GCC/Clang regarding brace initialization. It flagged error C2398 (narrowing conversion) because size_t (unsigned) was being passed into PyTorch tensor lists that expect int64_t (signed).

The Fix

Explicitly cast size_t variables to int64_t in src/io/svo.cpp, src/io/filter_parent.cpp, and src/io/filter_neighbor.cpp.

Minor float literal adjustments in flexible_dual_grid.cpp to prevent truncation warnings.

Verification Verified to compile and run successfully on Windows 11 / CUDA 12.4.

Note: Debugging assistance provided by LLM to identify platform-specific MSVC flags.

@Unk-Cody
Copy link
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant