comparison libvisual/lv_cpu.h @ 23:0db4a1dc75c4 trunk

[svn] libvisual. P3 detection appears to be borked. I'll work on it later.
author nenolod
date Mon, 24 Oct 2005 23:13:56 -0700
parents
children
comparison
equal deleted inserted replaced
22:696f87ed66e2 23:0db4a1dc75c4
1 /* Libvisual - The audio visualisation framework.
2 *
3 * Copyright (C) 2004, 2005 Dennis Smit <ds@nerds-incorporated.org>
4 *
5 * Authors: Dennis Smit <ds@nerds-incorporated.org>
6 * Chong Kai Xiong <descender@phreaker.net>
7 *
8 * $Id:
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License as
12 * published by the Free Software Foundation; either version 2.1
13 * of the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24
25 #ifndef _LV_CPU_H
26 #define _LV_CPU_H
27
28 #include <libvisual/lvconfig.h>
29 #include <libvisual/lv_common.h>
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
34
35 typedef enum {
36 VISUAL_CPU_TYPE_MIPS,
37 VISUAL_CPU_TYPE_ALPHA,
38 VISUAL_CPU_TYPE_SPARC,
39 VISUAL_CPU_TYPE_X86,
40 VISUAL_CPU_TYPE_POWERPC,
41 VISUAL_CPU_TYPE_OTHER
42 } VisCPUType;
43
44 typedef struct _VisCPU VisCPU;
45
46 /**
47 * This VisCPU structure contains information regarding the processor.
48 *
49 * @see visual_cpu_get_info
50 */
51 struct _VisCPU {
52 VisObject object; /**< The VisObject data. */
53 VisCPUType type; /**< Contains the CPU/arch type. */
54 int nrcpu; /**< Contains the number of CPUs in the system. */
55
56 /* Feature flags */
57 int x86cpuType;
58 int cacheline;
59 int hasTSC;
60 int hasMMX;
61 int hasMMX2;
62 int hasSSE;
63 int hasSSE2;
64 int has3DNow;
65 int has3DNowExt;
66
67 int hasAltiVec;
68 };
69
70 void visual_cpu_initialize (void);
71 VisCPU *visual_cpu_get_caps (void);
72
73 #ifdef __cplusplus
74 }
75 #endif /* __cplusplus */
76
77 #endif /* _LV_CPU_H */