Bill Yi | 4e213d5 | 2015-06-23 13:53:11 -0700 | [diff] [blame] | 1 | /* Switch to appropriate version of peakval routine |
| 2 | * Copyright 2004, Phil Karn, KA9Q |
| 3 | */ |
| 4 | |
| 5 | #include <stdlib.h> |
| 6 | #include "fec.h" |
| 7 | |
| 8 | int peakval_port(signed short *b,int cnt); |
| 9 | #ifdef __i386__ |
| 10 | int peakval_mmx(signed short *b,int cnt); |
| 11 | int peakval_sse(signed short *b,int cnt); |
| 12 | int peakval_sse2(signed short *b,int cnt); |
| 13 | #endif |
| 14 | |
| 15 | #ifdef __VEC__ |
| 16 | int peakval_av(signed short *b,int cnt); |
| 17 | #endif |
| 18 | |
| 19 | int 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 | } |