I tried to compile code with this union
union PrecomputedBlob
{
struct
{
uint8_t
minX, minY, maxX, maxY,
perimeter, area,
vertices, edges,
sumX, sumY,
sumX2, sumY2, sumXY;
};
uint4 v;
};
It compiles fine, but when compiling for emulation mode, the host compiler (not NVCC) complains that the union is illegal
because uint4 has a non-trivial assignment operator, which is against the C++ standard. This problem goes away when I remove the
line __cuda_assign_operators(uint4) from vector_types.h.
What’s the purpose of __cuda_assign_operators and can this be resolved in the future?