I started playing with AVX instructions on the new Intel Sandy Bridge processor. I am using GCC 4.5.2, TDM-GCC 64 bit version of MinGW64.
I want to overload the <<operator for ostream to be able to print vector types __m256, __m128etc. on the console. But I ran into an overloaded conflict. The second function in the following code generates a "conflict with previous declaration void f(__vector(8) float)" error :
void f(__m128 v) {
cout << 4;
}
void f(__m256 v) {
cout << 8;
}
It seems that the compiler cannot distinguish between the two types and treats them like that f(float __vector).
Is there any way around this? I could not find anything on the Internet. Any help is appreciated.
source
share