This is my first posting here, so I apologize if this isn't quite the right place for this question.
So I just got very interested in multiversioning in order to do some performance comparisons of instruction sets between Haswell and SandyBridge, and with functions it's a breeze, but when I tried to do the same with operators I received the following error:
internal error: assertion failed: mangled_operator_name: bad kind (shared/cfe/edgcpfe/lower_name.c, line 10192)
__attribute__ ((target("default")))
IntVec& operator+=(IntVec& v1, const IntVec& v2) {
v1.data()[0:v1.size()] += v2.data()[0:v2.size()];
return v1;
}
//IntVec is just short for std::vector<int>
I can't seem to find any information as to why this is invalid on the web, so I assume there must be some way to accomplish this, though everything I've tried has failed or created overhead I know shouldn't be necessary. Is it valid to try this? If so, what's the proper course? Otherwise, why is it invalid to have multiple versions of an operator for various instruction sets?
Also, if I wanted to specifically target a Xeon Phi, how would I best go about this?