Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/isa-l/isal_api.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /**********************************************************************
0002   Copyright(c) 2026 Intel Corporation All rights reserved.
0003 
0004   Redistribution and use in source and binary forms, with or without
0005   modification, are permitted provided that the following conditions
0006   are met:
0007     * Redistributions of source code must retain the above copyright
0008       notice, this list of conditions and the following disclaimer.
0009     * Redistributions in binary form must reproduce the above copyright
0010       notice, this list of conditions and the following disclaimer in
0011       the documentation and/or other materials provided with the
0012       distribution.
0013     * Neither the name of Intel Corporation nor the names of its
0014       contributors may be used to endorse or promote products derived
0015       from this software without specific prior written permission.
0016 
0017   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0018   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0019   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0020   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0021   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0022   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0023   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0024   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0025   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0026   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0027   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0028 **********************************************************************/
0029 
0030 #ifndef _ISAL_API_H
0031 #define _ISAL_API_H
0032 
0033 #define ISAL_LIB_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
0034 
0035 #ifndef __has_extension
0036 #define __has_extension(x) 0
0037 #endif
0038 
0039 #if (defined(__ICC) || defined(__GNUC__) || defined(__clang__)) && !defined(ISAL_UNIT_TEST) &&     \
0040         !defined(ISAL_DEPRECATED_INTERNAL)
0041 #if __has_extension(attribute_deprecated_with_message) || (ISAL_LIB_GCC_VERSION >= 40500) ||       \
0042         (__INTEL_COMPILER >= 1100)
0043 #define ISAL_LIB_DEPRECATED(message) __attribute__((deprecated(message)))
0044 #else
0045 #define ISAL_LIB_DEPRECATED(message) __attribute__((deprecated))
0046 #endif
0047 #elif (defined(__ICL) || defined(_MSC_VER))
0048 #if (__INTEL_COMPILER >= 1100) || (_MSC_FULL_VER >= 140050727)
0049 #define ISAL_LIB_DEPRECATED(message) __declspec(deprecated(message))
0050 #else
0051 #define ISAL_LIB_DEPRECATED(message) __declspec(deprecated)
0052 #endif
0053 #else
0054 #define ISAL_LIB_DEPRECATED(message)
0055 #endif
0056 
0057 #ifdef __cplusplus
0058 extern "C" {
0059 #endif
0060 
0061 /* Utility macros */
0062 #define CONCAT_VERSION_(a, b, c) a##.##b##.##c
0063 #define CONCAT_VERSION(a, b, c)  CONCAT_VERSION_(a, b, c)
0064 #define TO_STRING_(a)            #a
0065 #define TO_STRING(a)             TO_STRING_(a)
0066 
0067 /* Library version numbers */
0068 #ifndef ISAL_MAJOR_VERSION
0069 #define ISAL_MAJOR_VERSION 2
0070 #endif
0071 #ifndef ISAL_MINOR_VERSION
0072 #define ISAL_MINOR_VERSION 32
0073 #endif
0074 #ifndef ISAL_PATCH_VERSION
0075 #define ISAL_PATCH_VERSION 1
0076 #endif
0077 
0078 #ifndef ISAL_MAKE_VERSION
0079 #define ISAL_MAKE_VERSION(maj, min, patch) ((maj) * 0x10000 + (min) * 0x100 + (patch))
0080 #endif
0081 #ifndef ISAL_VERSION
0082 #define ISAL_VERSION ISAL_MAKE_VERSION(ISAL_MAJOR_VERSION, ISAL_MINOR_VERSION, ISAL_PATCH_VERSION)
0083 #endif
0084 #define ISAL_VERSION_STR                                                                           \
0085         TO_STRING(CONCAT_VERSION(ISAL_MAJOR_VERSION, ISAL_MINOR_VERSION, ISAL_PATCH_VERSION))
0086 
0087 /**
0088  * @brief Get library version in string format
0089  *
0090  * @return library version string
0091  */
0092 const char *
0093 isal_get_version_str(void);
0094 
0095 /**
0096  * @brief Get library version in numerical format
0097  *
0098  * Use ISAL_MAKE_VERSION macro to compare this
0099  * numerical version against known library version.
0100  *
0101  * @return library version number
0102  */
0103 unsigned
0104 isal_get_version(void);
0105 
0106 #ifdef __cplusplus
0107 }
0108 #endif //__cplusplus
0109 #endif // ifndef _ISAL_API_H