float myfunction ( P b1, P b2, int dimention )
{
__m128 v_b1,v_b2,v_b3;
int j=0;
for (int i=0; i<dimention/4; i++) {
v_b1=_mm_load_ps(b1.c +j);
v_b2=_mm_load_ps(b2.c +j);
v_b3=_mm_sub_ps(v_b1,v_b2);
j+=4;
}
}
我真正想做的是:
for (int i=0; i<dimention; i++ ) {
result += b1.c[i] - b2.c[i];
}
我想回来result
。你能帮助我吗?