title: operator overloading in Cuda
body: <p>I successfully created an operator+ between two float4 by doing :</p>
  
  <pre><code>__device__ float4 operator+(float4 a, float4 b) {
   // ...
  }
  </code></pre>
  
  <p>However, if in addition, I want to have an  operator+ for uchar4, by doing the same thing with uchar4, i get the following error:
  "error: more than one instance of overloaded function "operator+" has "C" linkage" "</p>
  
  <p>I get a similar error message when I declare multiple functions with the same name but different arguments.
  So, two questions :</p>
  
  <ul>
  <li><strong>Polymorphism</strong> : Is-it possible to have multiple functions with the same name and different arguments in Cuda ? If so, why do I have this error message ?</li>
  <li><strong>operator+ for float4</strong> : it seems that this feature is already included by including "cutil_math.h", but when I include that (<code>#include &lt;cutil_math.h&gt;</code>) it complains that there is no such file or directory... anything particular I should do ? Note: I am using pycuda, which is a cuda for python.</li>
  </ul>
  
  <p>Thanks!</p>