Skip to content

Fixing compile errors when compiling with clang++#29

Open
daniela-hase wants to merge 1 commit intoNVIDIA:mainfrom
daniela-hase:dev/clang-build-fix
Open

Fixing compile errors when compiling with clang++#29
daniela-hase wants to merge 1 commit intoNVIDIA:mainfrom
daniela-hase:dev/clang-build-fix

Conversation

@daniela-hase
Copy link

This PR fixes compile errors when compiling cuBQL with clang++.

Original error messages were:

cuBQL/builder/cuda/sah_builder.h:68:20: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
   68 |       float rAreas[sah.numBins];
cuBQL/builder/cuda/radix.h:588:11: error: no matching function for call to 'min'
  588 |         ? min(buildConfig.makeLeafThreshold,buildConfig.maxAllowedLeafSize)
cuBQL/builder/cuda/builder_common.h:166:45: error: array index 3 is past the end of the array (that has type 'const typename int_type_of<scalar_t>::type[3]' (aka 'const int[3]')) [-Werror,-Warray-bounds]
  166 |                                   ?((dim>2)?lower[3]:lower[2])
      |                                             ^     ~
cuBQL/builder/cuda/builder_common.h:97:22: error: no matching function for call to '__float_as_int'
   97 |       int32_t bits = __float_as_int(f);
      |                      ^~~~~~~~~~~~~~

Signed-off-by: Daniela Hasenbring <dhasenbring@nvidia.com>
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