Factor canBeCaptured() out of Shogi legal() check for east reuse.
[tagua/yd.git] / src / kcpuinfo.h
blob39f274fa057b71832d0df75af70c0c9359da481e
1 /*
2 * This file is part of the KDE libraries
3 * Copyright (C) 2003 Fredrik Höglund <fredrik@kde.org>
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 #ifndef __KCPUINFO_H
28 #define __KCPUINFO_H
30 #include <kdefx_export.h>
32 /**
33 * This class provides a means for applications to obtain information at
34 * runtime about processor support for certain architecture extensions,
35 * such as MMX, SSE, 3DNow and AltiVec.
37 namespace KCPUInfo
39 /**
40 * This enum contains the list of architecture extensions you
41 * can query.
43 enum Extensions {
44 IntelMMX = 1 << 0, //!< Intel's MMX instructions.
45 IntelSSE = 1 << 1, //!< Intel's SSE instructions.
46 IntelSSE2 = 1 << 2, //!< Intel's SSE2 instructions.
47 AMD3DNOW = 1 << 3, //!< AMD 3DNOW instructions
48 AltiVec = 1 << 4 //!< Motorola AltiVec instructions
51 /**
52 * Returns true if the processor supports @p extension,
53 * and false otherwise.
55 * @param extension the feature to query.
56 * @return If true, the processor supports @p extension.
57 * @see Extensions
59 KDEFX_EXPORT bool haveExtension( unsigned int extension );
62 #endif