2 This file is a part of libcds - Concurrent Data Structures library
4 (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
6 Source code repo: http://github.com/khizmax/libcds/
7 Download: http://sourceforge.net/projects/libcds/files/
9 Redistribution and use in source and binary forms, with or without
10 modification, are permitted provided that the following conditions are met:
12 * Redistributions of source code must retain the above copyright notice, this
13 list of conditions and the following disclaimer.
15 * Redistributions in binary form must reproduce the above copyright notice,
16 this list of conditions and the following disclaimer in the documentation
17 and/or other materials provided with the distribution.
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #ifndef CDSLIB_COMPILER_ICL_DEFS_H
32 #define CDSLIB_COMPILER_ICL_DEFS_H
37 # define CDS_COMPILER_VERSION __ICL
39 # define CDS_COMPILER_VERSION __INTEL_COMPILER
43 // Supported compilers: MS VC 2008, 2010, 2012
45 # define CDS_COMPILER__NAME "Intel C++"
46 # define CDS_COMPILER__NICK "icl"
50 # define CDS_OS_INTERFACE CDS_OSI_WINDOWS
51 # define CDS_OS_TYPE CDS_OS_WIN64
52 # define CDS_OS__NAME "Win64"
53 # define CDS_OS__NICK "Win64"
55 # define CDS_OS_INTERFACE CDS_OSI_WINDOWS
56 # define CDS_OS_TYPE CDS_OS_WIN32
57 # define CDS_OS__NAME "Win32"
58 # define CDS_OS__NICK "Win32"
59 #elif defined( __linux__ )
60 # define CDS_OS_INTERFACE CDS_OSI_UNIX
61 # define CDS_OS_TYPE CDS_OS_LINUX
62 # define CDS_OS__NAME "linux"
63 # define CDS_OS__NICK "linux"
66 // Processor architecture
67 #if defined(_M_X64) || defined(_M_AMD64) || defined(__amd64__) || defined(__amd64)
68 # define CDS_BUILD_BITS 64
69 # define CDS_PROCESSOR_ARCH CDS_PROCESSOR_AMD64
70 # define CDS_PROCESSOR__NAME "AMD64"
71 # define CDS_PROCESSOR__NICK "amd64"
72 #elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
73 # define CDS_BUILD_BITS 32
74 # define CDS_PROCESSOR_ARCH CDS_PROCESSOR_X86
75 # define CDS_PROCESSOR__NAME "Intel x86"
76 # define CDS_PROCESSOR__NICK "x86"
78 # define CDS_BUILD_BITS -1
79 # define CDS_PROCESSOR_ARCH CDS_PROCESSOR_UNKNOWN
80 # define CDS_PROCESSOR__NAME "<<Undefined>>"
81 # error Intel C++ compiler is supported for x86 only
84 #if CDS_OS_INTERFACE == CDS_OSI_WINDOWS
85 # define __attribute__( _x )
86 # define CDS_STDCALL __stdcall
88 # if CDS_PROCESSOR_ARCH == CDS_PROCESSOR_X86
89 # define CDS_STDCALL __attribute__((stdcall))
95 #if CDS_OS_INTERFACE == CDS_OSI_WINDOWS
97 # define CDS_EXPORT_API __declspec(dllexport)
99 # define CDS_EXPORT_API __declspec(dllimport)
103 #if CDS_OS_INTERFACE == CDS_OSI_WINDOWS
104 # define alignof __alignof
106 # define alignof __alignof__
109 #define CDS_CONSTEXPR constexpr
111 #define CDS_NOEXCEPT_SUPPORT noexcept
112 #define CDS_NOEXCEPT_SUPPORT_(expr) noexcept(expr)
114 // C++11 inline namespace
115 #define CDS_CXX11_INLINE_NAMESPACE_SUPPORT
117 // Inheriting constructors
118 #define CDS_CXX11_INHERITING_CTOR
120 // *************************************************
123 #if CDS_OS_INTERFACE == CDS_OSI_WINDOWS
124 # define CDS_TYPE_ALIGNMENT(n) __declspec( align(n) )
125 # define CDS_DATA_ALIGNMENT(n) __declspec( align(n) )
126 # define CDS_CLASS_ALIGNMENT(n) __declspec( align(n) )
128 # define CDS_TYPE_ALIGNMENT(n) __attribute__ ((aligned (n)))
129 # define CDS_CLASS_ALIGNMENT(n) __attribute__ ((aligned (n)))
130 # define CDS_DATA_ALIGNMENT(n) __attribute__ ((aligned (n)))
134 #if CDS_OS_INTERFACE == CDS_OSI_WINDOWS
135 # define CDS_DEPRECATED( reason ) __declspec(deprecated( reason ))
137 # define CDS_DEPRECATED( reason ) __attribute__((deprecated( reason )))
140 #include <cds/compiler/icl/compiler_barriers.h>
143 #endif // #ifndef CDSLIB_COMPILER_VC_DEFS_H