does CUDA support vector operation?

I want to do something such as

float4 a, b;

a = a+b;

When I used CUDA 3.0 to compile it, it report

error error: no operator “+” matches these operands

Is there function in CUDA which support this vector operation?

I do not think it comes with this operation but it is easy to define it yourself or use the cutil_math.h header which I think has some convenient functions described for such operations.


Indeed cutil_math.h has overloads of the basic operators and some other vector functions (dot, length, normalize…)