Skip to content

Conversation

@olayasturias
Copy link

Summary

This PR fixes a compilation issue in the CUDA droid_kernels.cu file that occurs when running setup.py on different operating systems. Previously, the build failed because long is 64-bit on Linux but not necessarily on Windows. This change ensures compatibility by defining LongType as:

  • int64_t on Windows
  • long on Linux

Changes

  • Added preprocessor directives to differentiate between Windows (_WIN32) and other platforms.
  • Used int64_t for Windows and long for Linux to ensure LongType remains 64-bit.
  • Updated the kernel function to use LongType.

Why This Fix?

The previous implementation led to setup.py compilation failures on Windows due to type mismatches, as seen in #39 . Using #ifdef ensures consistency across platforms.

Testing

  • Compiled and tested on Linux (Ubuntu 22.04)
  • Compiled and tested on Windows 10 with MSVC
  • Verified the generated binary runs without issues on both platforms

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.

2 participants