Skip to content

Fix build with modern toolchains by including <cstdint> in rasterizer_impl.h#36

Open
filippocastelli wants to merge 1 commit intohbb1:mainfrom
filippocastelli:main
Open

Fix build with modern toolchains by including <cstdint> in rasterizer_impl.h#36
filippocastelli wants to merge 1 commit intohbb1:mainfrom
filippocastelli:main

Conversation

@filippocastelli
Copy link

Summary

cuda_rasterizer/rasterizer_impl.h uses fixed-width integer types
(uint32_t, uint64_t) and std::uintptr_t, but does not explicitly
include <cstdint> (or <stdint.h>).

Older toolchains compiled successfully due to indirect includes,
but recent environments (e.g. Ubuntu 24.04 + GCC 13 + CUDA 12.6)
fail with errors such as:

  • "namespace std has no member uintptr_t"
  • "identifier uint32_t is undefined"
  • "identifier uint64_t is undefined"

This patch adds #include <cstdint> to make the header self-contained
and restore compatibility with modern compilers.

std::uintptr_t and fixed-width integer types are defined in <cstdint>.
Relying on transitive includes is not guaranteed by the standard.

This change does not alter behavior, ABI, or performance — it only
ensures correct compilation.

Tested on

  • Ubuntu 24.04
  • GCC 13
  • CUDA 12.6
  • PyTorch CUDA extension build

Build succeeds after this change.

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

Comments