stop & detach driver when exiting due to -T/--temporary flag
[jack.git] / jack / intsimd.h
blob2377bd1f8e1261c6303514184e9cd0402dd7cc68
1 /*
2 Copyright (C) 2005-2007 Jussi Laako
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __jack_intsimd_h__
21 #define __jack_intsimd_h__
23 #ifdef USE_DYNSIMD
24 #if (defined(__i386__) || defined(__x86_64__))
25 #define ARCH_X86
26 #endif /* __i386__ || __x86_64__ */
27 #endif /* USE_DYNSIMD */
29 #ifdef ARCH_X86
30 #define ARCH_X86_SSE(x) ((x) & 0xff)
31 #define ARCH_X86_HAVE_SSE2(x) (ARCH_X86_SSE(x) >= 2)
32 #define ARCH_X86_3DNOW(x) ((x) >> 8)
33 #define ARCH_X86_HAVE_3DNOW(x) (ARCH_X86_3DNOW(x))
35 typedef float v2sf __attribute__((vector_size(8)));
36 typedef float v4sf __attribute__((vector_size(16)));
37 typedef v2sf * pv2sf;
38 typedef v4sf * pv4sf;
40 extern int cpu_type;
42 int have_3dnow (void);
43 int have_sse (void);
44 void x86_3dnow_copyf (float *, const float *, int);
45 void x86_3dnow_add2f (float *, const float *, int);
46 void x86_sse_copyf (float *, const float *, int);
47 void x86_sse_add2f (float *, const float *, int);
48 void x86_sse_f2i (int *, const float *, int, float);
49 void x86_sse_i2f (float *, const int *, int, float);
51 #endif /* ARCH_X86 */
53 void jack_port_set_funcs (void);
55 #endif /* __jack_intsimd_h__ */