Manual dispatch on pentium_4_sse3 *not* working on MACTEL Intel core duo

Manual dispatch on pentium_4_sse3 *not* working on MACTEL Intel core duo

Hi All,

I have following code

__declspec(cpu_specific(pentium_MMX))
void MyFnc(int *result, const int *a, int *b, size_t len)
{
printf("pentium_MMX
");
}

__declspec(cpu_specific(pentium_4_sse3))
void MyFnc(int *result, const int *a, int *b, size_t len)
{
printf("pentium_4_sse3
");
}

__declspec(cpu_dispatch(pentium_MMX, pentium_4_sse3))
void MyFnc(int *result, int const *a, int *b, size_t len)
{

/* Empty function body informs the compiler to generate the

CPU-dispatch function listed in the cpu_dispatch clause. */

}
int main (int argc, const char * argv[]) {
// insert code here...
const size_t MAXLENGTH = 10;
int dest[MAXLENGTH];
int s1[]= { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
int s2[]= { 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };

MyFnc(dest,s1,s2,MAXLENGTH);
return 0;
}

It prints "pentium_MMX" on my iMac machine which has "Intel core due processors" 1.83 Ghz.

The intel MAC OS compiler documentation says that pentium_4_sse3 can be used for Intel Core Duo processors.

What wrong could i be doing here?

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.