blob: 811a3a9267f5128baaff3669996a77f5c30234b5 [file] [log] [blame]
Bill Yi4e213d52015-06-23 13:53:11 -07001/* Switch to appropriate version of peakval routine
2 * Copyright 2004, Phil Karn, KA9Q
3 */
4
5#include <stdlib.h>
6#include "fec.h"
7
8int peakval_port(signed short *b,int cnt);
9#ifdef __i386__
10int peakval_mmx(signed short *b,int cnt);
11int peakval_sse(signed short *b,int cnt);
12int peakval_sse2(signed short *b,int cnt);
13#endif
14
15#ifdef __VEC__
16int peakval_av(signed short *b,int cnt);
17#endif
18
19int peakval(signed short *b,int cnt){
20 find_cpu_mode();
21
22 switch(Cpu_mode){
23 case PORT:
24 default:
25 return peakval_port(b,cnt);
26#ifdef __i386__
27 case MMX:
28 return peakval_mmx(b,cnt);
29 case SSE:
30 return peakval_sse(b,cnt);
31 case SSE2:
32 return peakval_sse2(b,cnt);
33#endif
34#ifdef __VEC__
35 case ALTIVEC:
36 return peakval_av(b,cnt);
37#endif
38 }
39}