1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/* Switch to appropriate version of peakval routine
* Copyright 2004, Phil Karn, KA9Q
*/
#include <stdlib.h>
#include "fec.h"
int peakval_port(signed short *b,int cnt);
#ifdef __i386__
int peakval_mmx(signed short *b,int cnt);
int peakval_sse(signed short *b,int cnt);
int peakval_sse2(signed short *b,int cnt);
#endif
#ifdef __x86_64__
int peakval_sse2(signed short *b,int cnt);
#endif
#ifdef __VEC__
int peakval_av(signed short *b,int cnt);
#endif
int peakval(signed short *b,int cnt){
find_cpu_mode();
switch(Cpu_mode){
case PORT:
default:
return peakval_port(b,cnt);
#ifdef __i386__
case MMX:
return peakval_mmx(b,cnt);
case SSE:
return peakval_sse(b,cnt);
case SSE2:
return peakval_sse2(b,cnt);
#endif
#ifdef __x86_64__
case SSE2:
return peakval_port(b,cnt);
//return peakval_sse2(b,cnt);
#endif
#ifdef __VEC__
case ALTIVEC:
return peakval_av(b,cnt);
#endif
}
}
|