1 // cl_N equal_hashcode().
7 #include "cl_complex.h"
16 uint32 cl_equal_hashcode (const cl_N& x)
20 return cl_equal_hashcode(x);
23 var const cl_R& a = realpart(x);
24 var const cl_R& b = imagpart(x);
25 var uint32 code1 = cl_equal_hashcode(a);
26 var uint32 code2 = cl_equal_hashcode(b);
27 // Wichtig beim Kombinieren, wegen "complex canonicalization":
28 // Ist imagpart=0.0, so ist der Hashcode = cl_equal_hashcode(a).
29 return code1 ^ ((code2 << 5) | (code2 >> 27));