/perf/kseta

To get this branch, use:
bzr branch http://darksoft.org/webbzr/perf/kseta

« back to all changes in this revision

Viewing changes to tutorials/4_pi/random123/features/sunprofeatures.h

  • Committer: Suren A. Chilingaryan
  • Date: 2013-10-08 23:53:50 UTC
  • Revision ID: csa@dside.dyndns.org-20131008235350-hsu8oukzkh05gtcm
Add tutorials

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright 2010-2011, D. E. Shaw Research.
 
3
All rights reserved.
 
4
 
 
5
Redistribution and use in source and binary forms, with or without
 
6
modification, are permitted provided that the following conditions are
 
7
met:
 
8
 
 
9
* Redistributions of source code must retain the above copyright
 
10
  notice, this list of conditions, and the following disclaimer.
 
11
 
 
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.
 
15
 
 
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.
 
19
 
 
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.
 
31
*/
 
32
#ifndef __sunprofeatures_dot_hpp
 
33
#define __sunprofeatures_dot_hpp
 
34
 
 
35
#ifndef R123_STATIC_INLINE
 
36
#define R123_STATIC_INLINE static inline
 
37
#endif
 
38
 
 
39
#ifndef R123_FORCE_INLINE
 
40
#define R123_FORCE_INLINE(decl) decl
 
41
#endif
 
42
 
 
43
#ifndef R123_CUDA_DEVICE
 
44
#define R123_CUDA_DEVICE
 
45
#endif
 
46
 
 
47
#ifndef R123_ASSERT
 
48
#include <assert.h>
 
49
#define R123_ASSERT(x) assert(x)
 
50
#endif
 
51
 
 
52
#ifndef R123_BUILTIN_EXPECT
 
53
#define R123_BUILTIN_EXPECT(expr,likely) expr
 
54
#endif
 
55
 
 
56
// The basic idiom is:
 
57
// #ifndef R123_SOMETHING
 
58
// #if some condition
 
59
// #define R123_SOMETHING 1
 
60
// #else
 
61
// #define R123_SOMETHING 0
 
62
// #endif
 
63
// #endif
 
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
 
66
 
 
67
// An alternative idiom is:
 
68
// #ifndef R123_SOMETHING
 
69
// #define R123_SOMETHING (some boolean expression)
 
70
// #endif
 
71
// where the boolean expression might contain previously-defined R123_SOMETHING_ELSE
 
72
// pp-symbols.
 
73
 
 
74
#ifndef R123_USE_AES_NI
 
75
#define R123_USE_AES_NI 0
 
76
#endif
 
77
 
 
78
#ifndef R123_USE_SSE4_2
 
79
#define R123_USE_SSE4_2 0
 
80
#endif
 
81
 
 
82
#ifndef R123_USE_SSE4_1
 
83
#define R123_USE_SSE4_1 0
 
84
#endif
 
85
 
 
86
#ifndef R123_USE_SSE
 
87
#define R123_USE_SSE 0
 
88
#endif
 
89
 
 
90
#ifndef R123_USE_AES_OPENSSL
 
91
#define R123_USE_AES_OPENSSL 0
 
92
#endif
 
93
 
 
94
#ifndef R123_USE_GNU_UINT128
 
95
#define R123_USE_GNU_UINT128 0
 
96
#endif
 
97
 
 
98
#ifndef R123_USE_ASM_GNU
 
99
#define R123_USE_ASM_GNU 0
 
100
#endif
 
101
 
 
102
#ifndef R123_USE_CPUID_MSVC
 
103
#define R123_USE_CPUID_MSVC 0
 
104
#endif
 
105
 
 
106
#ifndef R123_USE_X86INTRIN_H
 
107
#define R123_USE_X86INTRIN_H 0
 
108
#endif
 
109
 
 
110
#ifndef R123_USE_IA32INTRIN_H
 
111
#define R123_USE_IA32INTRIN_H 0
 
112
#endif
 
113
 
 
114
#ifndef R123_USE_XMMINTRIN_H
 
115
#define R123_USE_XMMINTRIN_H 0
 
116
#endif
 
117
 
 
118
#ifndef R123_USE_EMMINTRIN_H
 
119
#define R123_USE_EMMINTRIN_H 0
 
120
#endif
 
121
 
 
122
#ifndef R123_USE_SMMINTRIN_H
 
123
#define R123_USE_SMMINTRIN_H 0
 
124
#endif
 
125
 
 
126
#ifndef R123_USE_WMMINTRIN_H
 
127
#define R123_USE_WMMINTRIN_H 0
 
128
#endif
 
129
 
 
130
#ifndef R123_USE_INTRIN_H
 
131
#define R123_USE_INTRIN_H 0
 
132
#endif
 
133
 
 
134
#ifndef R123_USE_MULHILO16_ASM
 
135
#define R123_USE_MULHILO16_ASM 0
 
136
#endif
 
137
 
 
138
#ifndef R123_USE_MULHILO32_ASM
 
139
#define R123_USE_MULHILO32_ASM 0
 
140
#endif
 
141
 
 
142
#ifndef R123_USE_MULHILO64_ASM
 
143
#define R123_USE_MULHILO64_ASM 0
 
144
#endif
 
145
 
 
146
#ifndef R123_USE_MULHILO64_MSVC_INTRIN
 
147
#define R123_USE_MULHILO64_MSVC_INTRIN 0
 
148
#endif
 
149
 
 
150
#ifndef R123_USE_MULHILO64_CUDA_INTRIN
 
151
#define R123_USE_MULHILO64_CUDA_INTRIN 0
 
152
#endif
 
153
 
 
154
#ifndef R123_USE_MULHILO64_OPENCL_INTRIN
 
155
#define R123_USE_MULHILO64_OPENCL_INTRIN 0
 
156
#endif
 
157
 
 
158
#ifndef R123_USE_PHILOX_64BIT
 
159
#define R123_USE_PHILOX_64BIT 0
 
160
#endif
 
161
 
 
162
#ifndef __STDC_CONSTANT_MACROS
 
163
#define __STDC_CONSTANT_MACROS
 
164
#endif
 
165
#include <stdint.h>
 
166
#ifndef UINT64_C
 
167
#error UINT64_C not defined.  You must define __STDC_CONSTANT_MACROS before you #include <stdint.h>
 
168
#endif
 
169
 
 
170
// If you add something, it must go in all the other XXfeatures.hpp
 
171
// and in ../ut_features.cpp
 
172
#endif