1 /* 2 * Copyright 2010-2016 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 55 extern "C" { 56 #endif 57 #endif // DOXYGEN_SHOULD_SKIP_THIS 58 59 #define COI_MAX_ISA_x86_64_DEVICES 128 60 #define COI_MAX_ISA_MIC_DEVICES 128 61 #define COI_MAX_ISA_KNF_DEVICES 0 62 #define COI_MAX_ISA_KNC_DEVICES COI_MAX_ISA_MIC_DEVICES 63 #define COI_MAX_ISA_KNL_DEVICES COI_MAX_ISA_MIC_DEVICES 64 65 /////////////////////////////////////////////////////////////////////////////// 66 /// 67 /// List of ISA types of supported engines. 68 /// 69 typedef enum 70 { 71 COI_DEVICE_INVALID = 0, ///< Represents an invalid device type. 72 COI_DEVICE_SOURCE, ///< The engine from which offload originates 73 COI_DEVICE_MIC, ///< Special value used to represent any device 74 ///< in the Intel(R) Many Integrated Core family. 75 COI_DEVICE_DEPRECATED_0, ///< Placeholder for L1OM devices (deprecated). 76 COI_DEVICE_KNC, ///< K1OM devices (Knigts Corner). 77 COI_DEVICE_KNL, ///< Knights Landing devices 78 COI_DEVICE_MAX, 79 COI_DEVICE_KNF = COI_DEVICE_DEPRECATED_0 80 } COI_DEVICE_TYPE; 81 82 /////////////////////////////////////////////////////////////////////////////// 83 /// 84 /// List of deprecated device types for backward compatibility 85 /// 86 #define COI_ISA_INVALID COI_DEVICE_INVALID 87 #define COI_ISA_x86_64 COI_DEVICE_SOURCE 88 #define COI_ISA_MIC COI_DEVICE_MIC 89 #define COI_ISA_KNF COI_DEVICE_KNF 90 #define COI_ISA_KNC COI_DEVICE_KNC 91 92 typedef COI_DEVICE_TYPE COI_ISA_TYPE; 93 94 /////////////////////////////////////////////////////////////////////////////// 95 /// 96 /// Get the information about the COIEngine executing this function call. 97 /// 98 /// @param out_pType 99 /// [out] The COI_DEVICE_TYPE of the engine. 100 /// 101 /// @param out_pIndex 102 /// [out] The zero-based index of this engine in the collection of 103 /// engines of the ISA returned in out_pType. 104 /// 105 /// @return COI_INVALID_POINTER if any of the parameters are NULL. 106 /// 107 /// @return COI_SUCCESS 108 /// 109 COIACCESSAPI 110 COIRESULT 111 COIEngineGetIndex( 112 COI_DEVICE_TYPE *out_pType, 113 uint32_t *out_pIndex); 114 115 #ifdef __cplusplus 116 } /* extern "C" */ 117 #endif 118 119 #endif /* _COIENGINE_COMMON_H */ 120 121 /*! @} */ 122