minimap2 0.2.25.1 → 0.2.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/ext/Rakefile +2 -2
- data/ext/minimap2/NEWS.md +9 -0
- data/ext/minimap2/README.md +2 -2
- data/ext/minimap2/cookbook.md +2 -2
- data/ext/minimap2/minimap.h +1 -1
- data/ext/minimap2/minimap2.1 +1 -1
- data/ext/minimap2/misc/paftools.js +1 -1
- data/ext/minimap2/python/mappy.pyx +1 -1
- data/ext/minimap2/setup.py +22 -32
- data/lib/minimap2/version.rb +1 -1
- metadata +1 -97
- data/ext/minimap2/lib/simde/CONTRIBUTING.md +0 -114
- data/ext/minimap2/lib/simde/COPYING +0 -20
- data/ext/minimap2/lib/simde/README.md +0 -333
- data/ext/minimap2/lib/simde/amalgamate.py +0 -58
- data/ext/minimap2/lib/simde/meson.build +0 -33
- data/ext/minimap2/lib/simde/netlify.toml +0 -20
- data/ext/minimap2/lib/simde/simde/arm/neon/float32x2.h +0 -140
- data/ext/minimap2/lib/simde/simde/arm/neon/float32x4.h +0 -137
- data/ext/minimap2/lib/simde/simde/arm/neon/float64x1.h +0 -142
- data/ext/minimap2/lib/simde/simde/arm/neon/float64x2.h +0 -145
- data/ext/minimap2/lib/simde/simde/arm/neon/int16x4.h +0 -140
- data/ext/minimap2/lib/simde/simde/arm/neon/int16x8.h +0 -145
- data/ext/minimap2/lib/simde/simde/arm/neon/int32x2.h +0 -140
- data/ext/minimap2/lib/simde/simde/arm/neon/int32x4.h +0 -143
- data/ext/minimap2/lib/simde/simde/arm/neon/int64x1.h +0 -137
- data/ext/minimap2/lib/simde/simde/arm/neon/int64x2.h +0 -141
- data/ext/minimap2/lib/simde/simde/arm/neon/int8x16.h +0 -147
- data/ext/minimap2/lib/simde/simde/arm/neon/int8x8.h +0 -141
- data/ext/minimap2/lib/simde/simde/arm/neon/uint16x4.h +0 -134
- data/ext/minimap2/lib/simde/simde/arm/neon/uint16x8.h +0 -138
- data/ext/minimap2/lib/simde/simde/arm/neon/uint32x2.h +0 -134
- data/ext/minimap2/lib/simde/simde/arm/neon/uint32x4.h +0 -137
- data/ext/minimap2/lib/simde/simde/arm/neon/uint64x1.h +0 -131
- data/ext/minimap2/lib/simde/simde/arm/neon/uint64x2.h +0 -135
- data/ext/minimap2/lib/simde/simde/arm/neon/uint8x16.h +0 -141
- data/ext/minimap2/lib/simde/simde/arm/neon/uint8x8.h +0 -135
- data/ext/minimap2/lib/simde/simde/arm/neon.h +0 -97
- data/ext/minimap2/lib/simde/simde/check.h +0 -267
- data/ext/minimap2/lib/simde/simde/debug-trap.h +0 -83
- data/ext/minimap2/lib/simde/simde/hedley.h +0 -1899
- data/ext/minimap2/lib/simde/simde/simde-arch.h +0 -445
- data/ext/minimap2/lib/simde/simde/simde-common.h +0 -697
- data/ext/minimap2/lib/simde/simde/x86/avx.h +0 -5385
- data/ext/minimap2/lib/simde/simde/x86/avx2.h +0 -2402
- data/ext/minimap2/lib/simde/simde/x86/avx512bw.h +0 -391
- data/ext/minimap2/lib/simde/simde/x86/avx512f.h +0 -3389
- data/ext/minimap2/lib/simde/simde/x86/avx512vl.h +0 -112
- data/ext/minimap2/lib/simde/simde/x86/fma.h +0 -659
- data/ext/minimap2/lib/simde/simde/x86/mmx.h +0 -2210
- data/ext/minimap2/lib/simde/simde/x86/sse.h +0 -3696
- data/ext/minimap2/lib/simde/simde/x86/sse2.h +0 -5991
- data/ext/minimap2/lib/simde/simde/x86/sse3.h +0 -343
- data/ext/minimap2/lib/simde/simde/x86/sse4.1.h +0 -1783
- data/ext/minimap2/lib/simde/simde/x86/sse4.2.h +0 -105
- data/ext/minimap2/lib/simde/simde/x86/ssse3.h +0 -1053
- data/ext/minimap2/lib/simde/simde/x86/svml.h +0 -543
- data/ext/minimap2/lib/simde/test/CMakeLists.txt +0 -166
- data/ext/minimap2/lib/simde/test/arm/meson.build +0 -4
- data/ext/minimap2/lib/simde/test/arm/neon/meson.build +0 -23
- data/ext/minimap2/lib/simde/test/arm/neon/skel.c +0 -871
- data/ext/minimap2/lib/simde/test/arm/neon/test-neon-internal.h +0 -134
- data/ext/minimap2/lib/simde/test/arm/neon/test-neon.c +0 -39
- data/ext/minimap2/lib/simde/test/arm/neon/test-neon.h +0 -10
- data/ext/minimap2/lib/simde/test/arm/neon/vadd.c +0 -1260
- data/ext/minimap2/lib/simde/test/arm/neon/vdup_n.c +0 -873
- data/ext/minimap2/lib/simde/test/arm/neon/vmul.c +0 -1084
- data/ext/minimap2/lib/simde/test/arm/neon/vsub.c +0 -1260
- data/ext/minimap2/lib/simde/test/arm/test-arm-internal.h +0 -18
- data/ext/minimap2/lib/simde/test/arm/test-arm.c +0 -20
- data/ext/minimap2/lib/simde/test/arm/test-arm.h +0 -8
- data/ext/minimap2/lib/simde/test/cmake/AddCompilerFlags.cmake +0 -171
- data/ext/minimap2/lib/simde/test/cmake/ExtraWarningFlags.cmake +0 -68
- data/ext/minimap2/lib/simde/test/meson.build +0 -64
- data/ext/minimap2/lib/simde/test/munit/COPYING +0 -21
- data/ext/minimap2/lib/simde/test/munit/Makefile +0 -55
- data/ext/minimap2/lib/simde/test/munit/README.md +0 -54
- data/ext/minimap2/lib/simde/test/munit/example.c +0 -351
- data/ext/minimap2/lib/simde/test/munit/meson.build +0 -37
- data/ext/minimap2/lib/simde/test/munit/munit.c +0 -2055
- data/ext/minimap2/lib/simde/test/munit/munit.h +0 -535
- data/ext/minimap2/lib/simde/test/run-tests.c +0 -20
- data/ext/minimap2/lib/simde/test/run-tests.h +0 -260
- data/ext/minimap2/lib/simde/test/x86/avx.c +0 -13752
- data/ext/minimap2/lib/simde/test/x86/avx2.c +0 -9977
- data/ext/minimap2/lib/simde/test/x86/avx512bw.c +0 -2664
- data/ext/minimap2/lib/simde/test/x86/avx512f.c +0 -10416
- data/ext/minimap2/lib/simde/test/x86/avx512vl.c +0 -210
- data/ext/minimap2/lib/simde/test/x86/fma.c +0 -2557
- data/ext/minimap2/lib/simde/test/x86/meson.build +0 -33
- data/ext/minimap2/lib/simde/test/x86/mmx.c +0 -2878
- data/ext/minimap2/lib/simde/test/x86/skel.c +0 -2984
- data/ext/minimap2/lib/simde/test/x86/sse.c +0 -5121
- data/ext/minimap2/lib/simde/test/x86/sse2.c +0 -9860
- data/ext/minimap2/lib/simde/test/x86/sse3.c +0 -486
- data/ext/minimap2/lib/simde/test/x86/sse4.1.c +0 -3446
- data/ext/minimap2/lib/simde/test/x86/sse4.2.c +0 -101
- data/ext/minimap2/lib/simde/test/x86/ssse3.c +0 -2084
- data/ext/minimap2/lib/simde/test/x86/svml.c +0 -1545
- data/ext/minimap2/lib/simde/test/x86/test-avx.h +0 -16
- data/ext/minimap2/lib/simde/test/x86/test-avx512.h +0 -25
- data/ext/minimap2/lib/simde/test/x86/test-mmx.h +0 -13
- data/ext/minimap2/lib/simde/test/x86/test-sse.h +0 -13
- data/ext/minimap2/lib/simde/test/x86/test-sse2.h +0 -13
- data/ext/minimap2/lib/simde/test/x86/test-x86-internal.h +0 -196
- data/ext/minimap2/lib/simde/test/x86/test-x86.c +0 -48
- data/ext/minimap2/lib/simde/test/x86/test-x86.h +0 -8
@@ -1,267 +0,0 @@
|
|
1
|
-
/* Check (assertions)
|
2
|
-
* Portable Snippets - https://gitub.com/nemequ/portable-snippets
|
3
|
-
* Created by Evan Nemerson <evan@nemerson.com>
|
4
|
-
*
|
5
|
-
* To the extent possible under law, the authors have waived all
|
6
|
-
* copyright and related or neighboring rights to this code. For
|
7
|
-
* details, see the Creative Commons Zero 1.0 Universal license at
|
8
|
-
* https://creativecommons.org/publicdomain/zero/1.0/
|
9
|
-
*/
|
10
|
-
|
11
|
-
#if !defined(SIMDE_CHECK_H)
|
12
|
-
#define SIMDE_CHECK_H
|
13
|
-
|
14
|
-
#if !defined(SIMDE_NDEBUG) && !defined(SIMDE_DEBUG)
|
15
|
-
# define SIMDE_NDEBUG 1
|
16
|
-
#endif
|
17
|
-
|
18
|
-
#include <stdint.h>
|
19
|
-
|
20
|
-
#if !defined(_WIN32)
|
21
|
-
# define SIMDE_SIZE_MODIFIER "z"
|
22
|
-
# define SIMDE_CHAR_MODIFIER "hh"
|
23
|
-
# define SIMDE_SHORT_MODIFIER "h"
|
24
|
-
#else
|
25
|
-
# if defined(_M_X64) || defined(__amd64__)
|
26
|
-
# define SIMDE_SIZE_MODIFIER "I64"
|
27
|
-
# else
|
28
|
-
# define SIMDE_SIZE_MODIFIER ""
|
29
|
-
# endif
|
30
|
-
# define SIMDE_CHAR_MODIFIER ""
|
31
|
-
# define SIMDE_SHORT_MODIFIER ""
|
32
|
-
#endif
|
33
|
-
|
34
|
-
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
35
|
-
# define SIMDE__PUSH_DISABLE_MSVC_C4127 __pragma(warning(push)) __pragma(warning(disable:4127))
|
36
|
-
# define SIMDE__POP_DISABLE_MSVC_C4127 __pragma(warning(pop))
|
37
|
-
#else
|
38
|
-
# define SIMDE__PUSH_DISABLE_MSVC_C4127
|
39
|
-
# define SIMDE__POP_DISABLE_MSVC_C4127
|
40
|
-
#endif
|
41
|
-
|
42
|
-
#if !defined(simde_errorf)
|
43
|
-
# if defined(__has_include)
|
44
|
-
# if __has_include(<stdio.h>)
|
45
|
-
# include <stdio.h>
|
46
|
-
# endif
|
47
|
-
# elif defined(SIMDE_STDC_HOSTED)
|
48
|
-
# if SIMDE_STDC_HOSTED == 1
|
49
|
-
# include <stdio.h>
|
50
|
-
# endif
|
51
|
-
# elif defined(__STDC_HOSTED__)
|
52
|
-
# if __STDC_HOSTETD__ == 1
|
53
|
-
# include <stdio.h>
|
54
|
-
# endif
|
55
|
-
# endif
|
56
|
-
|
57
|
-
# include "debug-trap.h"
|
58
|
-
|
59
|
-
# if defined(EOF)
|
60
|
-
# define simde_errorf(format, ...) (fprintf(stderr, format, __VA_ARGS__), abort())
|
61
|
-
# else
|
62
|
-
# define simde_errorf(format, ...) (simde_trap())
|
63
|
-
# endif
|
64
|
-
#endif
|
65
|
-
|
66
|
-
#define simde_error(msg) simde_errorf("%s", msg)
|
67
|
-
|
68
|
-
#if defined(SIMDE_NDEBUG)
|
69
|
-
# if defined(SIMDE_CHECK_FAIL_DEFINED)
|
70
|
-
# define simde_assert(expr)
|
71
|
-
# else
|
72
|
-
# if defined(HEDLEY_ASSUME)
|
73
|
-
# define simde_assert(expr) HEDLEY_ASSUME(expr)
|
74
|
-
# elif HEDLEY_GCC_VERSION_CHECK(4,5,0)
|
75
|
-
# define simde_assert(expr) ((void) (!!(expr) ? 1 : (__builtin_unreachable(), 1)))
|
76
|
-
# elif HEDLEY_MSVC_VERSION_CHECK(13,10,0)
|
77
|
-
# define simde_assert(expr) __assume(expr)
|
78
|
-
# else
|
79
|
-
# define simde_assert(expr)
|
80
|
-
# endif
|
81
|
-
# endif
|
82
|
-
# define simde_assert_true(expr) simde_assert(expr)
|
83
|
-
# define simde_assert_false(expr) simde_assert(!(expr))
|
84
|
-
# define simde_assert_type_full(prefix, suffix, T, fmt, a, op, b) simde_assert(((a) op (b)))
|
85
|
-
# define simde_assert_double_equal(a, b, precision)
|
86
|
-
# define simde_assert_string_equal(a, b)
|
87
|
-
# define simde_assert_string_not_equal(a, b)
|
88
|
-
# define simde_assert_memory_equal(size, a, b)
|
89
|
-
# define simde_assert_memory_not_equal(size, a, b)
|
90
|
-
#else
|
91
|
-
# define simde_assert(expr) \
|
92
|
-
do { \
|
93
|
-
if (!HEDLEY_LIKELY(expr)) { \
|
94
|
-
simde_error("assertion failed: " #expr "\n"); \
|
95
|
-
} \
|
96
|
-
SIMDE__PUSH_DISABLE_MSVC_C4127 \
|
97
|
-
} while (0) \
|
98
|
-
SIMDE__POP_DISABLE_MSVC_C4127
|
99
|
-
|
100
|
-
# define simde_assert_true(expr) \
|
101
|
-
do { \
|
102
|
-
if (!HEDLEY_LIKELY(expr)) { \
|
103
|
-
simde_error("assertion failed: " #expr " is not true\n"); \
|
104
|
-
} \
|
105
|
-
SIMDE__PUSH_DISABLE_MSVC_C4127 \
|
106
|
-
} while (0) \
|
107
|
-
SIMDE__POP_DISABLE_MSVC_C4127
|
108
|
-
|
109
|
-
# define simde_assert_false(expr) \
|
110
|
-
do { \
|
111
|
-
if (!HEDLEY_LIKELY(!(expr))) { \
|
112
|
-
simde_error("assertion failed: " #expr " is not false\n"); \
|
113
|
-
} \
|
114
|
-
SIMDE__PUSH_DISABLE_MSVC_C4127 \
|
115
|
-
} while (0) \
|
116
|
-
SIMDE__POP_DISABLE_MSVC_C4127
|
117
|
-
|
118
|
-
# define simde_assert_type_full(prefix, suffix, T, fmt, a, op, b) \
|
119
|
-
do { \
|
120
|
-
T simde_tmp_a_ = (a); \
|
121
|
-
T simde_tmp_b_ = (b); \
|
122
|
-
if (!(simde_tmp_a_ op simde_tmp_b_)) { \
|
123
|
-
simde_errorf("assertion failed: %s %s %s (" prefix "%" fmt suffix " %s " prefix "%" fmt suffix ")\n", \
|
124
|
-
#a, #op, #b, simde_tmp_a_, #op, simde_tmp_b_); \
|
125
|
-
} \
|
126
|
-
SIMDE__PUSH_DISABLE_MSVC_C4127 \
|
127
|
-
} while (0) \
|
128
|
-
SIMDE__POP_DISABLE_MSVC_C4127
|
129
|
-
|
130
|
-
# define simde_assert_double_equal(a, b, precision) \
|
131
|
-
do { \
|
132
|
-
const double simde_tmp_a_ = (a); \
|
133
|
-
const double simde_tmp_b_ = (b); \
|
134
|
-
const double simde_tmp_diff_ = ((simde_tmp_a_ - simde_tmp_b_) < 0) ? \
|
135
|
-
-(simde_tmp_a_ - simde_tmp_b_) : \
|
136
|
-
(simde_tmp_a_ - simde_tmp_b_); \
|
137
|
-
if (HEDLEY_UNLIKELY(simde_tmp_diff_ > 1e-##precision)) { \
|
138
|
-
simde_errorf("assertion failed: %s == %s (%0." #precision "g == %0." #precision "g)\n", \
|
139
|
-
#a, #b, simde_tmp_a_, simde_tmp_b_); \
|
140
|
-
} \
|
141
|
-
SIMDE__PUSH_DISABLE_MSVC_C4127 \
|
142
|
-
} while (0) \
|
143
|
-
SIMDE__POP_DISABLE_MSVC_C4127
|
144
|
-
|
145
|
-
# include <string.h>
|
146
|
-
# define simde_assert_string_equal(a, b) \
|
147
|
-
do { \
|
148
|
-
const char* simde_tmp_a_ = a; \
|
149
|
-
const char* simde_tmp_b_ = b; \
|
150
|
-
if (HEDLEY_UNLIKELY(strcmp(simde_tmp_a_, simde_tmp_b_) != 0)) { \
|
151
|
-
simde_errorf("assertion failed: string %s == %s (\"%s\" == \"%s\")\n", \
|
152
|
-
#a, #b, simde_tmp_a_, simde_tmp_b_); \
|
153
|
-
} \
|
154
|
-
SIMDE__PUSH_DISABLE_MSVC_C4127 \
|
155
|
-
} while (0) \
|
156
|
-
SIMDE__POP_DISABLE_MSVC_C4127
|
157
|
-
|
158
|
-
# define simde_assert_string_not_equal(a, b) \
|
159
|
-
do { \
|
160
|
-
const char* simde_tmp_a_ = a; \
|
161
|
-
const char* simde_tmp_b_ = b; \
|
162
|
-
if (HEDLEY_UNLIKELY(strcmp(simde_tmp_a_, simde_tmp_b_) == 0)) { \
|
163
|
-
simde_errorf("assertion failed: string %s != %s (\"%s\" == \"%s\")\n", \
|
164
|
-
#a, #b, simde_tmp_a_, simde_tmp_b_); \
|
165
|
-
} \
|
166
|
-
SIMDE__PUSH_DISABLE_MSVC_C4127 \
|
167
|
-
} while (0) \
|
168
|
-
SIMDE__POP_DISABLE_MSVC_C4127
|
169
|
-
|
170
|
-
# define simde_assert_memory_equal(size, a, b) \
|
171
|
-
do { \
|
172
|
-
const unsigned char* simde_tmp_a_ = (const unsigned char*) (a); \
|
173
|
-
const unsigned char* simde_tmp_b_ = (const unsigned char*) (b); \
|
174
|
-
const size_t simde_tmp_size_ = (size); \
|
175
|
-
if (HEDLEY_UNLIKELY(memcmp(simde_tmp_a_, simde_tmp_b_, simde_tmp_size_)) != 0) { \
|
176
|
-
size_t simde_tmp_pos_; \
|
177
|
-
for (simde_tmp_pos_ = 0 ; simde_tmp_pos_ < simde_tmp_size_ ; simde_tmp_pos_++) { \
|
178
|
-
if (simde_tmp_a_[simde_tmp_pos_] != simde_tmp_b_[simde_tmp_pos_]) { \
|
179
|
-
simde_errorf("assertion failed: memory %s == %s, at offset %" SIMDE_SIZE_MODIFIER "u\n", \
|
180
|
-
#a, #b, simde_tmp_pos_); \
|
181
|
-
break; \
|
182
|
-
} \
|
183
|
-
} \
|
184
|
-
} \
|
185
|
-
SIMDE__PUSH_DISABLE_MSVC_C4127 \
|
186
|
-
} while (0) \
|
187
|
-
SIMDE__POP_DISABLE_MSVC_C4127
|
188
|
-
|
189
|
-
# define simde_assert_memory_not_equal(size, a, b) \
|
190
|
-
do { \
|
191
|
-
const unsigned char* simde_tmp_a_ = (const unsigned char*) (a); \
|
192
|
-
const unsigned char* simde_tmp_b_ = (const unsigned char*) (b); \
|
193
|
-
const size_t simde_tmp_size_ = (size); \
|
194
|
-
if (HEDLEY_UNLIKELY(memcmp(simde_tmp_a_, simde_tmp_b_, simde_tmp_size_)) == 0) { \
|
195
|
-
simde_errorf("assertion failed: memory %s != %s (%" SIMDE_SIZE_MODIFIER "u bytes)\n", \
|
196
|
-
#a, #b, simde_tmp_size_); \
|
197
|
-
} \
|
198
|
-
SIMDE__PUSH_DISABLE_MSVC_C4127 \
|
199
|
-
} while (0) \
|
200
|
-
SIMDE__POP_DISABLE_MSVC_C4127
|
201
|
-
#endif
|
202
|
-
|
203
|
-
#define simde_assert_type(T, fmt, a, op, b) \
|
204
|
-
simde_assert_type_full("", "", T, fmt, a, op, b)
|
205
|
-
|
206
|
-
#define simde_assert_char(a, op, b) \
|
207
|
-
simde_assert_type_full("'\\x", "'", char, "02" SIMDE_CHAR_MODIFIER "x", a, op, b)
|
208
|
-
#define simde_assert_uchar(a, op, b) \
|
209
|
-
simde_assert_type_full("'\\x", "'", unsigned char, "02" SIMDE_CHAR_MODIFIER "x", a, op, b)
|
210
|
-
#define simde_assert_short(a, op, b) \
|
211
|
-
simde_assert_type(short, SIMDE_SHORT_MODIFIER "d", a, op, b)
|
212
|
-
#define simde_assert_ushort(a, op, b) \
|
213
|
-
simde_assert_type(unsigned short, SIMDE_SHORT_MODIFIER "u", a, op, b)
|
214
|
-
#define simde_assert_int(a, op, b) \
|
215
|
-
simde_assert_type(int, "d", a, op, b)
|
216
|
-
#define simde_assert_uint(a, op, b) \
|
217
|
-
simde_assert_type(unsigned int, "u", a, op, b)
|
218
|
-
#define simde_assert_long(a, op, b) \
|
219
|
-
simde_assert_type(long int, "ld", a, op, b)
|
220
|
-
#define simde_assert_ulong(a, op, b) \
|
221
|
-
simde_assert_type(unsigned long int, "lu", a, op, b)
|
222
|
-
#define simde_assert_llong(a, op, b) \
|
223
|
-
simde_assert_type(long long int, "lld", a, op, b)
|
224
|
-
#define simde_assert_ullong(a, op, b) \
|
225
|
-
simde_assert_type(unsigned long long int, "llu", a, op, b)
|
226
|
-
|
227
|
-
#define simde_assert_size(a, op, b) \
|
228
|
-
simde_assert_type(size_t, SIMDE_SIZE_MODIFIER "u", a, op, b)
|
229
|
-
|
230
|
-
#define simde_assert_float(a, op, b) \
|
231
|
-
simde_assert_type(float, "f", a, op, b)
|
232
|
-
#define simde_assert_double(a, op, b) \
|
233
|
-
simde_assert_type(double, "g", a, op, b)
|
234
|
-
#define simde_assert_ptr(a, op, b) \
|
235
|
-
simde_assert_type(const void*, "p", a, op, b)
|
236
|
-
|
237
|
-
#define simde_assert_int8(a, op, b) \
|
238
|
-
simde_assert_type(int8_t, PRIi8, a, op, b)
|
239
|
-
#define simde_assert_uint8(a, op, b) \
|
240
|
-
simde_assert_type(uint8_t, PRIu8, a, op, b)
|
241
|
-
#define simde_assert_int16(a, op, b) \
|
242
|
-
simde_assert_type(int16_t, PRIi16, a, op, b)
|
243
|
-
#define simde_assert_uint16(a, op, b) \
|
244
|
-
simde_assert_type(uint16_t, PRIu16, a, op, b)
|
245
|
-
#define simde_assert_int32(a, op, b) \
|
246
|
-
simde_assert_type(int32_t, PRIi32, a, op, b)
|
247
|
-
#define simde_assert_uint32(a, op, b) \
|
248
|
-
simde_assert_type(uint32_t, PRIu32, a, op, b)
|
249
|
-
#define simde_assert_int64(a, op, b) \
|
250
|
-
simde_assert_type(int64_t, PRIi64, a, op, b)
|
251
|
-
#define simde_assert_uint64(a, op, b) \
|
252
|
-
simde_assert_type(uint64_t, PRIu64, a, op, b)
|
253
|
-
|
254
|
-
#define simde_assert_ptr_equal(a, b) \
|
255
|
-
simde_assert_ptr(a, ==, b)
|
256
|
-
#define simde_assert_ptr_not_equal(a, b) \
|
257
|
-
simde_assert_ptr(a, !=, b)
|
258
|
-
#define simde_assert_null(ptr) \
|
259
|
-
simde_assert_ptr(ptr, ==, NULL)
|
260
|
-
#define simde_assert_not_null(ptr) \
|
261
|
-
simde_assert_ptr(ptr, !=, NULL)
|
262
|
-
#define simde_assert_ptr_null(ptr) \
|
263
|
-
simde_assert_ptr(ptr, ==, NULL)
|
264
|
-
#define simde_assert_ptr_not_null(ptr) \
|
265
|
-
simde_assert_ptr(ptr, !=, NULL)
|
266
|
-
|
267
|
-
#endif /* !defined(SIMDE_CHECK_H) */
|
@@ -1,83 +0,0 @@
|
|
1
|
-
/* Debugging assertions and traps
|
2
|
-
* Portable Snippets - https://gitub.com/nemequ/portable-snippets
|
3
|
-
* Created by Evan Nemerson <evan@nemerson.com>
|
4
|
-
*
|
5
|
-
* To the extent possible under law, the authors have waived all
|
6
|
-
* copyright and related or neighboring rights to this code. For
|
7
|
-
* details, see the Creative Commons Zero 1.0 Universal license at
|
8
|
-
* https://creativecommons.org/publicdomain/zero/1.0/
|
9
|
-
*/
|
10
|
-
|
11
|
-
#if !defined(SIMDE_DEBUG_TRAP_H)
|
12
|
-
#define SIMDE_DEBUG_TRAP_H
|
13
|
-
|
14
|
-
#if !defined(SIMDE_NDEBUG) && defined(NDEBUG) && !defined(SIMDE_DEBUG)
|
15
|
-
# define SIMDE_NDEBUG 1
|
16
|
-
#endif
|
17
|
-
|
18
|
-
#if defined(__has_builtin) && !defined(__ibmxl__)
|
19
|
-
# if __has_builtin(__builtin_debugtrap)
|
20
|
-
# define simde_trap() __builtin_debugtrap()
|
21
|
-
# elif __has_builtin(__debugbreak)
|
22
|
-
# define simde_trap() __debugbreak()
|
23
|
-
# endif
|
24
|
-
#endif
|
25
|
-
#if !defined(simde_trap)
|
26
|
-
# if defined(_MSC_VER) || defined(__INTEL_COMPILER)
|
27
|
-
# define simde_trap() __debugbreak()
|
28
|
-
# elif defined(__ARMCC_VERSION)
|
29
|
-
# define simde_trap() __breakpoint(42)
|
30
|
-
# elif defined(__ibmxl__) || defined(__xlC__)
|
31
|
-
# include <builtins.h>
|
32
|
-
# define simde_trap() __trap(42)
|
33
|
-
# elif defined(__DMC__) && defined(_M_IX86)
|
34
|
-
static inline void simde_trap(void) { __asm int 3h; }
|
35
|
-
# elif defined(__i386__) || defined(__x86_64__)
|
36
|
-
static inline void simde_trap(void) { __asm__ __volatile__("int $03"); }
|
37
|
-
# elif defined(__thumb__)
|
38
|
-
static inline void simde_trap(void) { __asm__ __volatile__(".inst 0xde01"); }
|
39
|
-
# elif defined(__aarch64__)
|
40
|
-
static inline void simde_trap(void) { __asm__ __volatile__(".inst 0xd4200000"); }
|
41
|
-
# elif defined(__arm__)
|
42
|
-
static inline void simde_trap(void) { __asm__ __volatile__(".inst 0xe7f001f0"); }
|
43
|
-
# elif defined (__alpha__) && !defined(__osf__)
|
44
|
-
static inline void simde_trap(void) { __asm__ __volatile__("bpt"); }
|
45
|
-
# elif defined(_54_)
|
46
|
-
static inline void simde_trap(void) { __asm__ __volatile__("ESTOP"); }
|
47
|
-
# elif defined(_55_)
|
48
|
-
static inline void simde_trap(void) { __asm__ __volatile__(";\n .if (.MNEMONIC)\n ESTOP_1\n .else\n ESTOP_1()\n .endif\n NOP"); }
|
49
|
-
# elif defined(_64P_)
|
50
|
-
static inline void simde_trap(void) { __asm__ __volatile__("SWBP 0"); }
|
51
|
-
# elif defined(_6x_)
|
52
|
-
static inline void simde_trap(void) { __asm__ __volatile__("NOP\n .word 0x10000000"); }
|
53
|
-
# elif defined(__STDC_HOSTED__) && (__STDC_HOSTED__ == 0) && defined(__GNUC__)
|
54
|
-
# define simde_trap() __builtin_trap()
|
55
|
-
# else
|
56
|
-
# include <signal.h>
|
57
|
-
# if defined(SIGTRAP)
|
58
|
-
# define simde_trap() raise(SIGTRAP)
|
59
|
-
# else
|
60
|
-
# define simde_trap() raise(SIGABRT)
|
61
|
-
# endif
|
62
|
-
# endif
|
63
|
-
#endif
|
64
|
-
|
65
|
-
#if defined(HEDLEY_LIKELY)
|
66
|
-
# define SIMDE_DBG_LIKELY(expr) HEDLEY_LIKELY(expr)
|
67
|
-
#elif defined(__GNUC__) && (__GNUC__ >= 3)
|
68
|
-
# define SIMDE_DBG_LIKELY(expr) __builtin_expect(!!(expr), 1)
|
69
|
-
#else
|
70
|
-
# define SIMDE_DBG_LIKELY(expr) (!!(expr))
|
71
|
-
#endif
|
72
|
-
|
73
|
-
#if !defined(SIMDE_NDEBUG) || (SIMDE_NDEBUG == 0)
|
74
|
-
# define simde_dbg_assert(expr) do { \
|
75
|
-
if (!SIMDE_DBG_LIKELY(expr)) { \
|
76
|
-
simde_trap(); \
|
77
|
-
} \
|
78
|
-
} while (0)
|
79
|
-
#else
|
80
|
-
# define simde_dbg_assert(expr)
|
81
|
-
#endif
|
82
|
-
|
83
|
-
#endif /* !defined(SIMDE_DEBUG_TRAP_H) */
|