File: intsimd.h

package info (click to toggle)
jack-audio-connection-kit 1%3A0.125.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 3,368 kB
  • sloc: ansic: 40,493; cpp: 1,426; makefile: 678; python: 327; sh: 89
file content (56 lines) | stat: -rw-r--r-- 1,780 bytes parent folder | download | duplicates (3)
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
51
52
53
54
55
56
/*
    Copyright (C) 2005-2007 Jussi Laako

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

 */

#ifndef __jack_intsimd_h__
#define __jack_intsimd_h__

#ifdef USE_DYNSIMD
#if (defined(__i386__) || defined(__x86_64__))
#define ARCH_X86
#endif  /* __i386__ || __x86_64__ */
#endif  /* USE_DYNSIMD */

#ifdef ARCH_X86
#define ARCH_X86_SSE(x)         ((x) & 0xff)
#define ARCH_X86_HAVE_SSE2(x)   (ARCH_X86_SSE (x) >= 2)
#define ARCH_X86_3DNOW(x)       ((x) >> 8)
#define ARCH_X86_HAVE_3DNOW(x)  (ARCH_X86_3DNOW (x))

typedef float v2sf __attribute__((vector_size (8)));
typedef float v4sf __attribute__((vector_size (16)));
typedef v2sf * pv2sf;
typedef v4sf * pv4sf;

extern int cpu_type;

int have_3dnow(void);
int have_sse(void);
void x86_3dnow_copyf(float *, const float *, int);
void x86_3dnow_add2f(float *, const float *, int);
void x86_sse_copyf(float *, const float *, int);
void x86_sse_add2f(float *, const float *, int);
void x86_sse_f2i(int *, const float *, int, float);
void x86_sse_i2f(float *, const int *, int, float);

#endif /* ARCH_X86 */

void jack_port_set_funcs(void);

#endif /* __jack_intsimd_h__ */