Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:25

0001 /**********************************************************************
0002   Copyright(c) 2011-2015 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 
0031 /**
0032  *  @file  types.h
0033  *  @brief Defines standard width types.
0034  *
0035  */
0036 
0037 #ifndef __TYPES_H
0038 #define __TYPES_H
0039 
0040 #ifdef __cplusplus
0041 extern "C" {
0042 #endif
0043 
0044 #ifdef _WIN32
0045 #ifdef __MINGW32__
0046 # include <_mingw.h>
0047 #endif
0048 #endif
0049 
0050 
0051 #if defined  __unix__ || defined __APPLE__
0052 # define DECLARE_ALIGNED(decl, alignval) decl __attribute__((aligned(alignval)))
0053 # define __forceinline static inline
0054 # define aligned_free(x) free(x)
0055 #else
0056 # ifdef __MINGW32__
0057 #   define DECLARE_ALIGNED(decl, alignval) decl __attribute__((aligned(alignval)))
0058 #   define posix_memalign(p, algn, len) (NULL == (*((char**)(p)) = (void*) _aligned_malloc(len, algn)))
0059 #   define aligned_free(x) _aligned_free(x)
0060 # else
0061 #   define DECLARE_ALIGNED(decl, alignval) __declspec(align(alignval)) decl
0062 #   define posix_memalign(p, algn, len) (NULL == (*((char**)(p)) = (void*) _aligned_malloc(len, algn)))
0063 #   define aligned_free(x) _aligned_free(x)
0064 # endif
0065 #endif
0066 
0067 #ifdef DEBUG
0068 # define DEBUG_PRINT(x) printf x
0069 #else
0070 # define DEBUG_PRINT(x) do {} while (0)
0071 #endif
0072 
0073 #ifdef __cplusplus
0074 }
0075 #endif
0076 
0077 #endif  //__TYPES_H