Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ustring.h): Address ignored annotation nvcc warnings on explicitl…
…y-defaulted functions (#4291) We're seeing nvcc compilation warnings like the following: ``` ustring.h(869): warning #20012-D: __device__ annotation is ignored on a function("operator=") that is explicitly defaulted on its first declaration __attribute__((host)) __attribute__((device)) ``` According to nvidia's documentation (https://docs.nvidia.com/cuda/archive/10.1/cuda-c-programming-guide/index.html#compiler-generated-functions), functions that are explicitly-defaulted should not have execution space specifiers like \_\_device\_\_ or \_\_host\_\_. Instead the compiler will determine the annotations from the functions that invoke it. This patch goes through the ustring and typedesc headers and removes OIIO_HOSTDEVICE from all defaulted functions. Signed-off-by: Chris Hellmuth <chellmuth@gmail.com>
- Loading branch information