Resolve "warning: copying an object of non-trivial type" #403
Labels
bug
Something isn't working
cuda.bindings
Everything related to the cuda.bindings module
P1
Medium priority - Should do
Today when building
cuda.bindings
there are two types of warnings and we should conclude on how they are to be handled.(1) We should ignore this because this is consistent with CUDA Runtime source and this file will be removed anyways in #100
(2) This one is tricky. What's happening is that we are trying to use memcpy on a type that has a non-trivial member (i.e.
dim3
). There's only one instance of this warning and we could do an simple WAR for this specific case:What is tricky is how we should be approach these types of errors in the future. Worst case scenario is when you have a non-trivial type that's nested under many layers. Applying the same WAR in this multi-nested scenario would result in each Extension Type interacting with their members across multiple layers, is easier to make a mistake and updating the bindings generator is non-trivial.
A long term solution would perhaps have each Extension Type have a dedicated copy method.
For this issue I suggest we apply the WAR for this warning and any future warnings as long as they remain simple and are rare. The long term solution can be re-investigated when that is no longer the case.
The text was updated successfully, but these errors were encountered: