1/*
2 * Copyright 2010-2013 Intel Corporation.
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation, version 2.1.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 * 02110-1301 USA.
17 *
18 * Disclaimer: The codes contained in these modules may be specific
19 * to the Intel Software Development Platform codenamed Knights Ferry,
20 * and the Intel product codenamed Knights Corner, and are not backward
21 * compatible with other Intel products. Additionally, Intel will NOT
22 * support the codes or instruction set in future products.
23 *
24 * Intel offers no warranty of any kind regarding the code. This code is
25 * licensed on an "AS IS" basis and Intel is not obligated to provide
26 * any support, assistance, installation, training, or other services
27 * of any kind. Intel is also not obligated to provide any updates,
28 * enhancements or extensions. Intel specifically disclaims any warranty
29 * of merchantability, non-infringement, fitness for any particular
30 * purpose, and any other warranty.
31 *
32 * Further, Intel disclaims all liability of any kind, including but
33 * not limited to liability for infringement of any proprietary rights,
34 * relating to the use of the code, even if Intel is notified of the
35 * possibility of such liability. Except as expressly stated in an Intel
36 * license agreement provided with this code and agreed upon with Intel,
37 * no license, express or implied, by estoppel or otherwise, to any
38 * intellectual property rights is granted herein.
39 */
40
41#ifndef _COIENGINE_COMMON_H
42#define _COIENGINE_COMMON_H
43
44/** @ingroup COIEngine
45 *  @addtogroup COIEnginecommon
46@{
47* @file common/COIEngine_common.h
48*/
49#ifndef DOXYGEN_SHOULD_SKIP_THIS
50
51#include "../common/COITypes_common.h"
52#include "../common/COIResult_common.h"
53
54#ifdef __cplusplus
55extern "C" {
56#endif
57#endif // DOXYGEN_SHOULD_SKIP_THIS
58
59#define COI_MAX_ISA_x86_64_DEVICES 1
60#define COI_MAX_ISA_MIC_DEVICES 128
61#define COI_MAX_ISA_KNF_DEVICES COI_MAX_ISA_MIC_DEVICES
62#define COI_MAX_ISA_KNC_DEVICES COI_MAX_ISA_MIC_DEVICES
63
64
65///////////////////////////////////////////////////////////////////////////////
66///
67///  List of ISA types of supported engines.
68///
69typedef enum
70{
71    COI_ISA_INVALID = 0,        ///< Represents an invalid ISA.
72    COI_ISA_x86_64,             ///< The ISA for an x86_64 host engine.
73    COI_ISA_MIC,                ///< Special value used to represent any device
74                                ///< in the Intel(R) Many Integrated Core
75                                ///< architecture family.
76    COI_ISA_KNF,                ///< ISA for L1OM devices.
77    COI_ISA_KNC                 ///< ISA for K1OM devices.
78} COI_ISA_TYPE;
79
80
81///////////////////////////////////////////////////////////////////////////////
82///
83/// Get the information about the COIEngine executing this function call.
84///
85/// @param  out_pType
86///         [out] The COI_ISA_TYPE of the engine.
87///
88/// @param  out_pIndex
89///         [out] The zero-based index of this engine in the collection of
90///         engines of the ISA returned in out_pType.
91///
92/// @return COI_INVALID_POINTER if the any of the parameters are NULL.
93///
94/// @return COI_SUCCESS
95///
96COIACCESSAPI
97COIRESULT
98COIEngineGetIndex(
99            COI_ISA_TYPE*       out_pType,
100            uint32_t*           out_pIndex);
101
102#ifdef __cplusplus
103} /* extern "C" */
104#endif
105
106#endif /* _COIENGINE_COMMON_H */
107
108/*! @} */
109