2
Copyright 2010-2011, D. E. Shaw Research.
5
Redistribution and use in source and binary forms, with or without
6
modification, are permitted provided that the following conditions are
9
* Redistributions of source code must retain the above copyright
10
notice, this list of conditions, and the following disclaimer.
12
* Redistributions in binary form must reproduce the above copyright
13
notice, this list of conditions, and the following disclaimer in the
14
documentation and/or other materials provided with the distribution.
16
* Neither the name of D. E. Shaw Research nor the names of its
17
contributors may be used to endorse or promote products derived from
18
this software without specific prior written permission.
20
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
#ifndef __sunprofeatures_dot_hpp
33
#define __sunprofeatures_dot_hpp
35
#ifndef R123_STATIC_INLINE
36
#define R123_STATIC_INLINE static inline
39
#ifndef R123_FORCE_INLINE
40
#define R123_FORCE_INLINE(decl) decl
43
#ifndef R123_CUDA_DEVICE
44
#define R123_CUDA_DEVICE
49
#define R123_ASSERT(x) assert(x)
52
#ifndef R123_BUILTIN_EXPECT
53
#define R123_BUILTIN_EXPECT(expr,likely) expr
56
// The basic idiom is:
57
// #ifndef R123_SOMETHING
59
// #define R123_SOMETHING 1
61
// #define R123_SOMETHING 0
64
// This idiom allows an external user to override any decision
65
// in this file with a command-line -DR123_SOMETHING=1 or -DR123_SOMETHINE=0
67
// An alternative idiom is:
68
// #ifndef R123_SOMETHING
69
// #define R123_SOMETHING (some boolean expression)
71
// where the boolean expression might contain previously-defined R123_SOMETHING_ELSE
74
#ifndef R123_USE_AES_NI
75
#define R123_USE_AES_NI 0
78
#ifndef R123_USE_SSE4_2
79
#define R123_USE_SSE4_2 0
82
#ifndef R123_USE_SSE4_1
83
#define R123_USE_SSE4_1 0
87
#define R123_USE_SSE 0
90
#ifndef R123_USE_AES_OPENSSL
91
#define R123_USE_AES_OPENSSL 0
94
#ifndef R123_USE_GNU_UINT128
95
#define R123_USE_GNU_UINT128 0
98
#ifndef R123_USE_ASM_GNU
99
#define R123_USE_ASM_GNU 0
102
#ifndef R123_USE_CPUID_MSVC
103
#define R123_USE_CPUID_MSVC 0
106
#ifndef R123_USE_X86INTRIN_H
107
#define R123_USE_X86INTRIN_H 0
110
#ifndef R123_USE_IA32INTRIN_H
111
#define R123_USE_IA32INTRIN_H 0
114
#ifndef R123_USE_XMMINTRIN_H
115
#define R123_USE_XMMINTRIN_H 0
118
#ifndef R123_USE_EMMINTRIN_H
119
#define R123_USE_EMMINTRIN_H 0
122
#ifndef R123_USE_SMMINTRIN_H
123
#define R123_USE_SMMINTRIN_H 0
126
#ifndef R123_USE_WMMINTRIN_H
127
#define R123_USE_WMMINTRIN_H 0
130
#ifndef R123_USE_INTRIN_H
131
#define R123_USE_INTRIN_H 0
134
#ifndef R123_USE_MULHILO16_ASM
135
#define R123_USE_MULHILO16_ASM 0
138
#ifndef R123_USE_MULHILO32_ASM
139
#define R123_USE_MULHILO32_ASM 0
142
#ifndef R123_USE_MULHILO64_ASM
143
#define R123_USE_MULHILO64_ASM 0
146
#ifndef R123_USE_MULHILO64_MSVC_INTRIN
147
#define R123_USE_MULHILO64_MSVC_INTRIN 0
150
#ifndef R123_USE_MULHILO64_CUDA_INTRIN
151
#define R123_USE_MULHILO64_CUDA_INTRIN 0
154
#ifndef R123_USE_MULHILO64_OPENCL_INTRIN
155
#define R123_USE_MULHILO64_OPENCL_INTRIN 0
158
#ifndef R123_USE_PHILOX_64BIT
159
#define R123_USE_PHILOX_64BIT 0
162
#ifndef __STDC_CONSTANT_MACROS
163
#define __STDC_CONSTANT_MACROS
167
#error UINT64_C not defined. You must define __STDC_CONSTANT_MACROS before you #include <stdint.h>
170
// If you add something, it must go in all the other XXfeatures.hpp
171
// and in ../ut_features.cpp