minimap2 0.2.24.6 → 0.2.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/ext/minimap2.patch +3 -3
  3. data/lib/minimap2/aligner.rb +4 -0
  4. data/lib/minimap2/ffi/constants.rb +90 -88
  5. data/lib/minimap2/version.rb +2 -2
  6. metadata +1 -97
  7. data/ext/minimap2/lib/simde/CONTRIBUTING.md +0 -114
  8. data/ext/minimap2/lib/simde/COPYING +0 -20
  9. data/ext/minimap2/lib/simde/README.md +0 -333
  10. data/ext/minimap2/lib/simde/amalgamate.py +0 -58
  11. data/ext/minimap2/lib/simde/meson.build +0 -33
  12. data/ext/minimap2/lib/simde/netlify.toml +0 -20
  13. data/ext/minimap2/lib/simde/simde/arm/neon/float32x2.h +0 -140
  14. data/ext/minimap2/lib/simde/simde/arm/neon/float32x4.h +0 -137
  15. data/ext/minimap2/lib/simde/simde/arm/neon/float64x1.h +0 -142
  16. data/ext/minimap2/lib/simde/simde/arm/neon/float64x2.h +0 -145
  17. data/ext/minimap2/lib/simde/simde/arm/neon/int16x4.h +0 -140
  18. data/ext/minimap2/lib/simde/simde/arm/neon/int16x8.h +0 -145
  19. data/ext/minimap2/lib/simde/simde/arm/neon/int32x2.h +0 -140
  20. data/ext/minimap2/lib/simde/simde/arm/neon/int32x4.h +0 -143
  21. data/ext/minimap2/lib/simde/simde/arm/neon/int64x1.h +0 -137
  22. data/ext/minimap2/lib/simde/simde/arm/neon/int64x2.h +0 -141
  23. data/ext/minimap2/lib/simde/simde/arm/neon/int8x16.h +0 -147
  24. data/ext/minimap2/lib/simde/simde/arm/neon/int8x8.h +0 -141
  25. data/ext/minimap2/lib/simde/simde/arm/neon/uint16x4.h +0 -134
  26. data/ext/minimap2/lib/simde/simde/arm/neon/uint16x8.h +0 -138
  27. data/ext/minimap2/lib/simde/simde/arm/neon/uint32x2.h +0 -134
  28. data/ext/minimap2/lib/simde/simde/arm/neon/uint32x4.h +0 -137
  29. data/ext/minimap2/lib/simde/simde/arm/neon/uint64x1.h +0 -131
  30. data/ext/minimap2/lib/simde/simde/arm/neon/uint64x2.h +0 -135
  31. data/ext/minimap2/lib/simde/simde/arm/neon/uint8x16.h +0 -141
  32. data/ext/minimap2/lib/simde/simde/arm/neon/uint8x8.h +0 -135
  33. data/ext/minimap2/lib/simde/simde/arm/neon.h +0 -97
  34. data/ext/minimap2/lib/simde/simde/check.h +0 -267
  35. data/ext/minimap2/lib/simde/simde/debug-trap.h +0 -83
  36. data/ext/minimap2/lib/simde/simde/hedley.h +0 -1899
  37. data/ext/minimap2/lib/simde/simde/simde-arch.h +0 -445
  38. data/ext/minimap2/lib/simde/simde/simde-common.h +0 -697
  39. data/ext/minimap2/lib/simde/simde/x86/avx.h +0 -5385
  40. data/ext/minimap2/lib/simde/simde/x86/avx2.h +0 -2402
  41. data/ext/minimap2/lib/simde/simde/x86/avx512bw.h +0 -391
  42. data/ext/minimap2/lib/simde/simde/x86/avx512f.h +0 -3389
  43. data/ext/minimap2/lib/simde/simde/x86/avx512vl.h +0 -112
  44. data/ext/minimap2/lib/simde/simde/x86/fma.h +0 -659
  45. data/ext/minimap2/lib/simde/simde/x86/mmx.h +0 -2210
  46. data/ext/minimap2/lib/simde/simde/x86/sse.h +0 -3696
  47. data/ext/minimap2/lib/simde/simde/x86/sse2.h +0 -5991
  48. data/ext/minimap2/lib/simde/simde/x86/sse3.h +0 -343
  49. data/ext/minimap2/lib/simde/simde/x86/sse4.1.h +0 -1783
  50. data/ext/minimap2/lib/simde/simde/x86/sse4.2.h +0 -105
  51. data/ext/minimap2/lib/simde/simde/x86/ssse3.h +0 -1053
  52. data/ext/minimap2/lib/simde/simde/x86/svml.h +0 -543
  53. data/ext/minimap2/lib/simde/test/CMakeLists.txt +0 -166
  54. data/ext/minimap2/lib/simde/test/arm/meson.build +0 -4
  55. data/ext/minimap2/lib/simde/test/arm/neon/meson.build +0 -23
  56. data/ext/minimap2/lib/simde/test/arm/neon/skel.c +0 -871
  57. data/ext/minimap2/lib/simde/test/arm/neon/test-neon-internal.h +0 -134
  58. data/ext/minimap2/lib/simde/test/arm/neon/test-neon.c +0 -39
  59. data/ext/minimap2/lib/simde/test/arm/neon/test-neon.h +0 -10
  60. data/ext/minimap2/lib/simde/test/arm/neon/vadd.c +0 -1260
  61. data/ext/minimap2/lib/simde/test/arm/neon/vdup_n.c +0 -873
  62. data/ext/minimap2/lib/simde/test/arm/neon/vmul.c +0 -1084
  63. data/ext/minimap2/lib/simde/test/arm/neon/vsub.c +0 -1260
  64. data/ext/minimap2/lib/simde/test/arm/test-arm-internal.h +0 -18
  65. data/ext/minimap2/lib/simde/test/arm/test-arm.c +0 -20
  66. data/ext/minimap2/lib/simde/test/arm/test-arm.h +0 -8
  67. data/ext/minimap2/lib/simde/test/cmake/AddCompilerFlags.cmake +0 -171
  68. data/ext/minimap2/lib/simde/test/cmake/ExtraWarningFlags.cmake +0 -68
  69. data/ext/minimap2/lib/simde/test/meson.build +0 -64
  70. data/ext/minimap2/lib/simde/test/munit/COPYING +0 -21
  71. data/ext/minimap2/lib/simde/test/munit/Makefile +0 -55
  72. data/ext/minimap2/lib/simde/test/munit/README.md +0 -54
  73. data/ext/minimap2/lib/simde/test/munit/example.c +0 -351
  74. data/ext/minimap2/lib/simde/test/munit/meson.build +0 -37
  75. data/ext/minimap2/lib/simde/test/munit/munit.c +0 -2055
  76. data/ext/minimap2/lib/simde/test/munit/munit.h +0 -535
  77. data/ext/minimap2/lib/simde/test/run-tests.c +0 -20
  78. data/ext/minimap2/lib/simde/test/run-tests.h +0 -260
  79. data/ext/minimap2/lib/simde/test/x86/avx.c +0 -13752
  80. data/ext/minimap2/lib/simde/test/x86/avx2.c +0 -9977
  81. data/ext/minimap2/lib/simde/test/x86/avx512bw.c +0 -2664
  82. data/ext/minimap2/lib/simde/test/x86/avx512f.c +0 -10416
  83. data/ext/minimap2/lib/simde/test/x86/avx512vl.c +0 -210
  84. data/ext/minimap2/lib/simde/test/x86/fma.c +0 -2557
  85. data/ext/minimap2/lib/simde/test/x86/meson.build +0 -33
  86. data/ext/minimap2/lib/simde/test/x86/mmx.c +0 -2878
  87. data/ext/minimap2/lib/simde/test/x86/skel.c +0 -2984
  88. data/ext/minimap2/lib/simde/test/x86/sse.c +0 -5121
  89. data/ext/minimap2/lib/simde/test/x86/sse2.c +0 -9860
  90. data/ext/minimap2/lib/simde/test/x86/sse3.c +0 -486
  91. data/ext/minimap2/lib/simde/test/x86/sse4.1.c +0 -3446
  92. data/ext/minimap2/lib/simde/test/x86/sse4.2.c +0 -101
  93. data/ext/minimap2/lib/simde/test/x86/ssse3.c +0 -2084
  94. data/ext/minimap2/lib/simde/test/x86/svml.c +0 -1545
  95. data/ext/minimap2/lib/simde/test/x86/test-avx.h +0 -16
  96. data/ext/minimap2/lib/simde/test/x86/test-avx512.h +0 -25
  97. data/ext/minimap2/lib/simde/test/x86/test-mmx.h +0 -13
  98. data/ext/minimap2/lib/simde/test/x86/test-sse.h +0 -13
  99. data/ext/minimap2/lib/simde/test/x86/test-sse2.h +0 -13
  100. data/ext/minimap2/lib/simde/test/x86/test-x86-internal.h +0 -196
  101. data/ext/minimap2/lib/simde/test/x86/test-x86.c +0 -48
  102. data/ext/minimap2/lib/simde/test/x86/test-x86.h +0 -8
@@ -1,137 +0,0 @@
1
- /* Copyright (c) 2018-2019 Evan Nemerson <evan@nemerson.com>
2
- *
3
- * Permission is hereby granted, free of charge, to any person
4
- * obtaining a copy of this software and associated documentation
5
- * files (the "Software"), to deal in the Software without
6
- * restriction, including without limitation the rights to use, copy,
7
- * modify, merge, publish, distribute, sublicense, and/or sell copies
8
- * of the Software, and to permit persons to whom the Software is
9
- * furnished to do so, subject to the following conditions:
10
- *
11
- * The above copyright notice and this permission notice shall be
12
- * included in all copies or substantial portions of the Software.
13
- *
14
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
18
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- * SOFTWARE.
22
- */
23
-
24
- #if !defined(SIMDE__INSIDE_NEON_H)
25
- # error Do not include simde/arm/neon/float32x4.h directly; use simde/arm/neon.h.
26
- #endif
27
-
28
- #if !defined(SIMDE__NEON_FLOAT32X4_H)
29
- #define SIMDE__NEON_FLOAT32X4_H
30
-
31
- typedef union {
32
- #if defined(SIMDE_VECTOR_SUBSCRIPT)
33
- simde_float32 f32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
34
- #else
35
- simde_float32 f32[4];
36
- #endif
37
-
38
- #if defined(SIMDE_NEON_NATIVE)
39
- float32x4_t n;
40
- #endif
41
-
42
- #if defined(SIMDE_NEON_MMX)
43
- __m64 mmx[2];
44
- #endif
45
- #if defined(SIMDE_NEON_SSE)
46
- __m128 sse;
47
- #endif
48
- } simde_float32x4_t;
49
-
50
- #if defined(SIMDE_NEON_NATIVE)
51
- HEDLEY_STATIC_ASSERT(sizeof(float32x4_t) == sizeof(simde_float32x4_t), "float32x4_t size doesn't match simde_float32x4_t size");
52
- #endif
53
- HEDLEY_STATIC_ASSERT(16 == sizeof(simde_float32x4_t), "simde_float32x4_t size incorrect");
54
-
55
- SIMDE__FUNCTION_ATTRIBUTES
56
- simde_float32x4_t
57
- simde_vaddq_f32(simde_float32x4_t a, simde_float32x4_t b) {
58
- simde_float32x4_t r;
59
- #if defined(SIMDE_NEON_NATIVE)
60
- r.n = vaddq_f32(a.n, b.n);
61
- #else
62
- SIMDE__VECTORIZE
63
- for (size_t i = 0 ; i < (sizeof(r.f32) / sizeof(r.f32[0])) ; i++) {
64
- r.f32[i] = a.f32[i] + b.f32[i];
65
- }
66
- #endif
67
- return r;
68
- }
69
-
70
- SIMDE__FUNCTION_ATTRIBUTES
71
- simde_float32x4_t
72
- simde_vld1q_f32 (simde_float32 const ptr[4]) {
73
- simde_float32x4_t r;
74
- #if defined(SIMDE_NEON_NATIVE)
75
- r.n = vld1q_f32(ptr);
76
- #else
77
- SIMDE__VECTORIZE
78
- for (size_t i = 0 ; i < (sizeof(r.f32) / sizeof(r.f32[0])) ; i++) {
79
- r.f32[i] = ptr[i];
80
- }
81
- #endif
82
- return r;
83
- }
84
-
85
- SIMDE__FUNCTION_ATTRIBUTES
86
- simde_float32x4_t
87
- simde_x_vloadq_f32 (simde_float32 l0, simde_float32 l1, simde_float32 l2, simde_float32 l3) {
88
- simde_float32 v[] = { l0, l1, l2, l3 };
89
- return simde_vld1q_f32(v);
90
- }
91
-
92
- SIMDE__FUNCTION_ATTRIBUTES
93
- simde_float32x4_t
94
- simde_vdupq_n_f32 (simde_float32 value) {
95
- simde_float32x4_t r;
96
- #if defined(SIMDE_NEON_NATIVE)
97
- r.n = vdupq_n_f32(value);
98
- #else
99
- SIMDE__VECTORIZE
100
- for (size_t i = 0 ; i < (sizeof(r.f32) / sizeof(r.f32[0])) ; i++) {
101
- r.f32[i] = value;
102
- }
103
- #endif
104
- return r;
105
- }
106
-
107
- SIMDE__FUNCTION_ATTRIBUTES
108
- simde_float32x4_t
109
- simde_vmulq_f32(simde_float32x4_t a, simde_float32x4_t b) {
110
- simde_float32x4_t r;
111
- #if defined(SIMDE_NEON_NATIVE)
112
- r.n = vmulq_f32(a.n, b.n);
113
- #else
114
- SIMDE__VECTORIZE
115
- for (size_t i = 0 ; i < (sizeof(r.f32) / sizeof(r.f32[0])) ; i++) {
116
- r.f32[i] = a.f32[i] * b.f32[i];
117
- }
118
- #endif
119
- return r;
120
- }
121
-
122
- SIMDE__FUNCTION_ATTRIBUTES
123
- simde_float32x4_t
124
- simde_vsubq_f32(simde_float32x4_t a, simde_float32x4_t b) {
125
- simde_float32x4_t r;
126
- #if defined(SIMDE_NEON_NATIVE)
127
- r.n = vsubq_f32(a.n, b.n);
128
- #else
129
- SIMDE__VECTORIZE
130
- for (size_t i = 0 ; i < (sizeof(r.f32) / sizeof(r.f32[0])) ; i++) {
131
- r.f32[i] = a.f32[i] - b.f32[i];
132
- }
133
- #endif
134
- return r;
135
- }
136
-
137
- #endif
@@ -1,142 +0,0 @@
1
- /* Copyright (c) 2018-2019 Evan Nemerson <evan@nemerson.com>
2
- *
3
- * Permission is hereby granted, free of charge, to any person
4
- * obtaining a copy of this software and associated documentation
5
- * files (the "Software"), to deal in the Software without
6
- * restriction, including without limitation the rights to use, copy,
7
- * modify, merge, publish, distribute, sublicense, and/or sell copies
8
- * of the Software, and to permit persons to whom the Software is
9
- * furnished to do so, subject to the following conditions:
10
- *
11
- * The above copyright notice and this permission notice shall be
12
- * included in all copies or substantial portions of the Software.
13
- *
14
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
18
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- * SOFTWARE.
22
- */
23
-
24
- #if !defined(SIMDE__INSIDE_NEON_H)
25
- # error Do not include simde/arm/neon/float64x1.h directly; use simde/arm/neon.h.
26
- #endif
27
-
28
- #if !defined(SIMDE__NEON_FLOAT64X1_H)
29
- #define SIMDE__NEON_FLOAT64X1_H
30
-
31
- #if defined(SIMDE_NEON64_NATIVE)
32
- # if defined(HEDLEY_GCC_VERSION) && !HEDLEY_GCC_VERSION_CHECK(4,9,0)
33
- # elif defined(HEDLEY_MSVC_VERSION)
34
- # else
35
- # define SIMDE_NEON_HAVE_FLOAT64X1
36
- # endif
37
- #endif
38
-
39
- typedef union {
40
- #if defined(SIMDE_VECTOR_SUBSCRIPT)
41
- simde_float64 f64 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
42
- #else
43
- simde_float64 f64[1];
44
- #endif
45
-
46
- #if defined(SIMDE_NEON_HAVE_FLOAT64X1)
47
- float64x1_t n;
48
- #endif
49
-
50
- #if defined(SIMDE_NEON_MMX)
51
- __m64 mmx;
52
- #endif
53
- } simde_float64x1_t;
54
-
55
- #if defined(SIMDE_NEON_HAVE_FLOAT64X1)
56
- HEDLEY_STATIC_ASSERT(sizeof(float64x1_t) == sizeof(simde_float64x1_t), "float64x1_t size doesn't match simde_float64x1_t size");
57
- #endif
58
- HEDLEY_STATIC_ASSERT(8 == sizeof(simde_float64x1_t), "simde_float64x1_t size incorrect");
59
-
60
- SIMDE__FUNCTION_ATTRIBUTES
61
- simde_float64x1_t
62
- simde_vadd_f64(simde_float64x1_t a, simde_float64x1_t b) {
63
- simde_float64x1_t r;
64
- #if defined(SIMDE_NEON_HAVE_FLOAT64X1)
65
- r.n = vadd_f64(a.n, b.n);
66
- #else
67
- SIMDE__VECTORIZE
68
- for (size_t i = 0 ; i < (sizeof(r.f64) / sizeof(r.f64[0])) ; i++) {
69
- r.f64[i] = a.f64[i] + b.f64[i];
70
- }
71
- #endif
72
- return r;
73
- }
74
-
75
- SIMDE__FUNCTION_ATTRIBUTES
76
- simde_float64x1_t
77
- simde_vld1_f64 (simde_float64 const ptr[1]) {
78
- simde_float64x1_t r;
79
- #if defined(SIMDE_NEON_HAVE_FLOAT64X1)
80
- r.n = vld1_f64(ptr);
81
- #else
82
- SIMDE__VECTORIZE
83
- for (size_t i = 0 ; i < (sizeof(r.f64) / sizeof(r.f64[0])) ; i++) {
84
- r.f64[i] = ptr[i];
85
- }
86
- #endif
87
- return r;
88
- }
89
-
90
- SIMDE__FUNCTION_ATTRIBUTES
91
- simde_float64x1_t
92
- simde_x_vload_f64 (simde_float64 l0) {
93
- simde_float64 v[] = { l0 };
94
- return simde_vld1_f64(v);
95
- }
96
-
97
- SIMDE__FUNCTION_ATTRIBUTES
98
- simde_float64x1_t
99
- simde_vdup_n_f64 (simde_float64 value) {
100
- simde_float64x1_t r;
101
- #if defined(SIMDE_NEON_HAVE_FLOAT64X1)
102
- r.n = vdup_n_f64(value);
103
- #else
104
- SIMDE__VECTORIZE
105
- for (size_t i = 0 ; i < (sizeof(r.f64) / sizeof(r.f64[0])) ; i++) {
106
- r.f64[i] = value;
107
- }
108
- #endif
109
- return r;
110
- }
111
-
112
- SIMDE__FUNCTION_ATTRIBUTES
113
- simde_float64x1_t
114
- simde_vmul_f64(simde_float64x1_t a, simde_float64x1_t b) {
115
- simde_float64x1_t r;
116
- #if defined(SIMDE_NEON_HAVE_FLOAT64X1)
117
- r.n = vmul_f64(a.n, b.n);
118
- #else
119
- SIMDE__VECTORIZE
120
- for (size_t i = 0 ; i < (sizeof(r.f64) / sizeof(r.f64[0])) ; i++) {
121
- r.f64[i] = a.f64[i] * b.f64[i];
122
- }
123
- #endif
124
- return r;
125
- }
126
-
127
- SIMDE__FUNCTION_ATTRIBUTES
128
- simde_float64x1_t
129
- simde_vsub_f64(simde_float64x1_t a, simde_float64x1_t b) {
130
- simde_float64x1_t r;
131
- #if defined(SIMDE_NEON_HAVE_FLOAT64X1)
132
- r.n = vsub_f64(a.n, b.n);
133
- #else
134
- SIMDE__VECTORIZE
135
- for (size_t i = 0 ; i < (sizeof(r.f64) / sizeof(r.f64[0])) ; i++) {
136
- r.f64[i] = a.f64[i] - b.f64[i];
137
- }
138
- #endif
139
- return r;
140
- }
141
-
142
- #endif
@@ -1,145 +0,0 @@
1
- /* Copyright (c) 2018-2019 Evan Nemerson <evan@nemerson.com>
2
- *
3
- * Permission is hereby granted, free of charge, to any person
4
- * obtaining a copy of this software and associated documentation
5
- * files (the "Software"), to deal in the Software without
6
- * restriction, including without limitation the rights to use, copy,
7
- * modify, merge, publish, distribute, sublicense, and/or sell copies
8
- * of the Software, and to permit persons to whom the Software is
9
- * furnished to do so, subject to the following conditions:
10
- *
11
- * The above copyright notice and this permission notice shall be
12
- * included in all copies or substantial portions of the Software.
13
- *
14
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
18
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- * SOFTWARE.
22
- */
23
-
24
- #if !defined(SIMDE__INSIDE_NEON_H)
25
- # error Do not include simde/arm/neon/float64x2.h directly; use simde/arm/neon.h.
26
- #endif
27
-
28
- #if !defined(SIMDE__NEON_FLOAT64X2_H)
29
- #define SIMDE__NEON_FLOAT64X2_H
30
-
31
- #if defined(SIMDE_NEON64_NATIVE)
32
- # if defined(HEDLEY_GCC_VERSION) && !HEDLEY_GCC_VERSION_CHECK(4,9,0)
33
- # elif defined(HEDLEY_MSVC_VERSION)
34
- # else
35
- # define SIMDE_NEON_HAVE_FLOAT64X2
36
- # endif
37
- #endif
38
-
39
- typedef union {
40
- #if defined(SIMDE_VECTOR_SUBSCRIPT)
41
- simde_float64 f64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
42
- #else
43
- simde_float64 f64[2];
44
- #endif
45
-
46
- #if defined(SIMDE_NEON_HAVE_FLOAT64X2)
47
- float64x2_t n;
48
- #endif
49
-
50
- #if defined(SIMDE_NEON_MMX)
51
- __m64 mmx[2];
52
- #endif
53
- #if defined(SIMDE_NEON_SSE2)
54
- __m128i sse;
55
- #endif
56
- } simde_float64x2_t;
57
-
58
- #if defined(SIMDE_NEON_HAVE_FLOAT64X2)
59
- HEDLEY_STATIC_ASSERT(sizeof(float64x2_t) == sizeof(simde_float64x2_t), "float64x2_t size doesn't match simde_float64x2_t size");
60
- #endif
61
- HEDLEY_STATIC_ASSERT(16 == sizeof(simde_float64x2_t), "simde_float64x2_t size incorrect");
62
-
63
- SIMDE__FUNCTION_ATTRIBUTES
64
- simde_float64x2_t
65
- simde_vaddq_f64(simde_float64x2_t a, simde_float64x2_t b) {
66
- simde_float64x2_t r;
67
- #if defined(SIMDE_NEON_HAVE_FLOAT64X2)
68
- r.n = vaddq_f64(a.n, b.n);
69
- #else
70
- SIMDE__VECTORIZE
71
- for (size_t i = 0 ; i < (sizeof(r.f64) / sizeof(r.f64[0])) ; i++) {
72
- r.f64[i] = a.f64[i] + b.f64[i];
73
- }
74
- #endif
75
- return r;
76
- }
77
-
78
- SIMDE__FUNCTION_ATTRIBUTES
79
- simde_float64x2_t
80
- simde_vld1q_f64 (simde_float64 const ptr[2]) {
81
- simde_float64x2_t r;
82
- #if defined(SIMDE_NEON_HAVE_FLOAT64X2)
83
- r.n = vld1q_f64(ptr);
84
- #else
85
- SIMDE__VECTORIZE
86
- for (size_t i = 0 ; i < (sizeof(r.f64) / sizeof(r.f64[0])) ; i++) {
87
- r.f64[i] = ptr[i];
88
- }
89
- #endif
90
- return r;
91
- }
92
-
93
- SIMDE__FUNCTION_ATTRIBUTES
94
- simde_float64x2_t
95
- simde_x_vloadq_f64 (simde_float64 l0, simde_float64 l1) {
96
- simde_float64 v[] = { l0, l1 };
97
- return simde_vld1q_f64(v);
98
- }
99
-
100
- SIMDE__FUNCTION_ATTRIBUTES
101
- simde_float64x2_t
102
- simde_vdupq_n_f64 (simde_float64 value) {
103
- simde_float64x2_t r;
104
- #if defined(SIMDE_NEON_HAVE_FLOAT64X2)
105
- r.n = vdupq_n_f64(value);
106
- #else
107
- SIMDE__VECTORIZE
108
- for (size_t i = 0 ; i < (sizeof(r.f64) / sizeof(r.f64[0])) ; i++) {
109
- r.f64[i] = value;
110
- }
111
- #endif
112
- return r;
113
- }
114
-
115
- SIMDE__FUNCTION_ATTRIBUTES
116
- simde_float64x2_t
117
- simde_vmulq_f64(simde_float64x2_t a, simde_float64x2_t b) {
118
- simde_float64x2_t r;
119
- #if defined(SIMDE_NEON_HAVE_FLOAT64X2)
120
- r.n = vmulq_f64(a.n, b.n);
121
- #else
122
- SIMDE__VECTORIZE
123
- for (size_t i = 0 ; i < (sizeof(r.f64) / sizeof(r.f64[0])) ; i++) {
124
- r.f64[i] = a.f64[i] * b.f64[i];
125
- }
126
- #endif
127
- return r;
128
- }
129
-
130
- SIMDE__FUNCTION_ATTRIBUTES
131
- simde_float64x2_t
132
- simde_vsubq_f64(simde_float64x2_t a, simde_float64x2_t b) {
133
- simde_float64x2_t r;
134
- #if defined(SIMDE_NEON_HAVE_FLOAT64X2)
135
- r.n = vsubq_f64(a.n, b.n);
136
- #else
137
- SIMDE__VECTORIZE
138
- for (size_t i = 0 ; i < (sizeof(r.f64) / sizeof(r.f64[0])) ; i++) {
139
- r.f64[i] = a.f64[i] - b.f64[i];
140
- }
141
- #endif
142
- return r;
143
- }
144
-
145
- #endif
@@ -1,140 +0,0 @@
1
- /* Copyright (c) 2018-2019 Evan Nemerson <evan@nemerson.com>
2
- *
3
- * Permission is hereby granted, free of charge, to any person
4
- * obtaining a copy of this software and associated documentation
5
- * files (the "Software"), to deal in the Software without
6
- * restriction, including without limitation the rights to use, copy,
7
- * modify, merge, publish, distribute, sublicense, and/or sell copies
8
- * of the Software, and to permit persons to whom the Software is
9
- * furnished to do so, subject to the following conditions:
10
- *
11
- * The above copyright notice and this permission notice shall be
12
- * included in all copies or substantial portions of the Software.
13
- *
14
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
18
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- * SOFTWARE.
22
- */
23
-
24
- #if !defined(SIMDE__INSIDE_NEON_H)
25
- # error Do not include simde/arm/neon/int16x4.h directly; use simde/arm/neon.h.
26
- #endif
27
-
28
- #if !defined(SIMDE__NEON_INT16X4_H)
29
- #define SIMDE__NEON_INT16X4_H
30
-
31
- typedef union {
32
- #if defined(SIMDE_VECTOR_SUBSCRIPT)
33
- int16_t i16 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
34
- #else
35
- int16_t i16[4];
36
- #endif
37
-
38
- #if defined(SIMDE_NEON_NATIVE)
39
- int16x4_t n;
40
- #endif
41
-
42
- #if defined(SIMDE_NEON_MMX)
43
- __m64 mmx;
44
- #endif
45
- } simde_int16x4_t;
46
-
47
- #if defined(SIMDE_NEON_NATIVE)
48
- HEDLEY_STATIC_ASSERT(sizeof(int16x4_t) == sizeof(simde_int16x4_t), "int16x4_t size doesn't match simde_int16x4_t size");
49
- #endif
50
- HEDLEY_STATIC_ASSERT(8 == sizeof(simde_int16x4_t), "simde_int16x4_t size incorrect");
51
-
52
- SIMDE__FUNCTION_ATTRIBUTES
53
- simde_int16x4_t
54
- simde_vadd_s16(simde_int16x4_t a, simde_int16x4_t b) {
55
- simde_int16x4_t r;
56
- #if defined(SIMDE_NEON_NATIVE)
57
- r.n = vadd_s16(a.n, b.n);
58
- #elif defined(SIMDE_MMX_NATIVE)
59
- r.mmx = _mm_add_pi16(a.mmx, b.mmx);
60
- #else
61
- SIMDE__VECTORIZE
62
- for (size_t i = 0 ; i < (sizeof(r.i16) / sizeof(r.i16[0])) ; i++) {
63
- r.i16[i] = a.i16[i] + b.i16[i];
64
- }
65
- #endif
66
- return r;
67
- }
68
-
69
- SIMDE__FUNCTION_ATTRIBUTES
70
- simde_int16x4_t
71
- simde_vld1_s16 (int16_t const ptr[4]) {
72
- simde_int16x4_t r;
73
- #if defined(SIMDE_NEON_NATIVE)
74
- r.n = vld1_s16(ptr);
75
- #else
76
- SIMDE__VECTORIZE
77
- for (size_t i = 0 ; i < (sizeof(r.i16) / sizeof(r.i16[0])) ; i++) {
78
- r.i16[i] = ptr[i];
79
- }
80
- #endif
81
- return r;
82
- }
83
-
84
- SIMDE__FUNCTION_ATTRIBUTES
85
- simde_int16x4_t
86
- simde_x_vload_s16 (int16_t l0, int16_t l1, int16_t l2, int16_t l3) {
87
- int16_t v[] = { l0, l1, l2, l3 };
88
- return simde_vld1_s16(v);
89
- }
90
-
91
- SIMDE__FUNCTION_ATTRIBUTES
92
- simde_int16x4_t
93
- simde_vdup_n_s16 (int16_t value) {
94
- simde_int16x4_t r;
95
- #if defined(SIMDE_NEON_NATIVE)
96
- r.n = vdup_n_s16(value);
97
- #else
98
- SIMDE__VECTORIZE
99
- for (size_t i = 0 ; i < (sizeof(r.i16) / sizeof(r.i16[0])) ; i++) {
100
- r.i16[i] = value;
101
- }
102
- #endif
103
- return r;
104
- }
105
-
106
- SIMDE__FUNCTION_ATTRIBUTES
107
- simde_int16x4_t
108
- simde_vmul_s16(simde_int16x4_t a, simde_int16x4_t b) {
109
- simde_int16x4_t r;
110
- #if defined(SIMDE_NEON_NATIVE)
111
- r.n = vmul_s16(a.n, b.n);
112
- #elif defined(SIMDE_MMX_NATIVE)
113
- r.mmx = _mm_mul_pi16(a.mmx, b.mmx);
114
- #else
115
- SIMDE__VECTORIZE
116
- for (size_t i = 0 ; i < (sizeof(r.i16) / sizeof(r.i16[0])) ; i++) {
117
- r.i16[i] = a.i16[i] * b.i16[i];
118
- }
119
- #endif
120
- return r;
121
- }
122
-
123
- SIMDE__FUNCTION_ATTRIBUTES
124
- simde_int16x4_t
125
- simde_vsub_s16(simde_int16x4_t a, simde_int16x4_t b) {
126
- simde_int16x4_t r;
127
- #if defined(SIMDE_NEON_NATIVE)
128
- r.n = vsub_s16(a.n, b.n);
129
- #elif defined(SIMDE_MMX_NATIVE)
130
- r.mmx = _mm_sub_pi16(a.mmx, b.mmx);
131
- #else
132
- SIMDE__VECTORIZE
133
- for (size_t i = 0 ; i < (sizeof(r.i16) / sizeof(r.i16[0])) ; i++) {
134
- r.i16[i] = a.i16[i] - b.i16[i];
135
- }
136
- #endif
137
- return r;
138
- }
139
-
140
- #endif
@@ -1,145 +0,0 @@
1
- /* Copyright (c) 2018-2019 Evan Nemerson <evan@nemerson.com>
2
- *
3
- * Permission is hereby granted, free of charge, to any person
4
- * obtaining a copy of this software and associated documentation
5
- * files (the "Software"), to deal in the Software without
6
- * restriction, including without limitation the rights to use, copy,
7
- * modify, merge, publish, distribute, sublicense, and/or sell copies
8
- * of the Software, and to permit persons to whom the Software is
9
- * furnished to do so, subject to the following conditions:
10
- *
11
- * The above copyright notice and this permission notice shall be
12
- * included in all copies or substantial portions of the Software.
13
- *
14
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
18
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- * SOFTWARE.
22
- */
23
-
24
- #if !defined(SIMDE__INSIDE_NEON_H)
25
- # error Do not include simde/arm/neon/int16x8.h directly; use simde/arm/neon.h.
26
- #endif
27
-
28
- #if !defined(SIMDE__NEON_INT16X8_H)
29
- #define SIMDE__NEON_INT16X8_H
30
-
31
- typedef union {
32
- #if defined(SIMDE_VECTOR_SUBSCRIPT)
33
- int16_t i16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
34
- #else
35
- int16_t i16[8];
36
- #endif
37
-
38
- #if defined(SIMDE_NEON_NATIVE)
39
- int16x8_t n;
40
- #endif
41
-
42
- #if defined(SIMDE_NEON_MMX)
43
- __m64 mmx[2];
44
- #endif
45
- #if defined(SIMDE_NEON_SSE2)
46
- __m128i sse;
47
- #endif
48
- } simde_int16x8_t;
49
-
50
- #if defined(SIMDE_NEON_NATIVE)
51
- HEDLEY_STATIC_ASSERT(sizeof(int16x8_t) == sizeof(simde_int16x8_t), "int16x8_t size doesn't match simde_int16x8_t size");
52
- #endif
53
- HEDLEY_STATIC_ASSERT(16 == sizeof(simde_int16x8_t), "simde_int16x8_t size incorrect");
54
-
55
- SIMDE__FUNCTION_ATTRIBUTES
56
- simde_int16x8_t
57
- simde_vaddq_s16(simde_int16x8_t a, simde_int16x8_t b) {
58
- simde_int16x8_t r;
59
- #if defined(SIMDE_NEON_NATIVE)
60
- r.n = vaddq_s16(a.n, b.n);
61
- #elif defined(SIMDE_SSE2_NATIVE)
62
- r.sse = _mm_add_epi16(a.sse, b.sse);
63
- #else
64
- SIMDE__VECTORIZE
65
- for (size_t i = 0 ; i < (sizeof(r.i16) / sizeof(r.i16[0])) ; i++) {
66
- r.i16[i] = a.i16[i] + b.i16[i];
67
- }
68
- #endif
69
- return r;
70
- }
71
-
72
- SIMDE__FUNCTION_ATTRIBUTES
73
- simde_int16x8_t
74
- simde_vld1q_s16 (int16_t const ptr[8]) {
75
- simde_int16x8_t r;
76
- #if defined(SIMDE_NEON_NATIVE)
77
- r.n = vld1q_s16(ptr);
78
- #else
79
- SIMDE__VECTORIZE
80
- for (size_t i = 0 ; i < (sizeof(r.i16) / sizeof(r.i16[0])) ; i++) {
81
- r.i16[i] = ptr[i];
82
- }
83
- #endif
84
- return r;
85
- }
86
-
87
- SIMDE__FUNCTION_ATTRIBUTES
88
- simde_int16x8_t
89
- simde_x_vloadq_s16 (int16_t l0, int16_t l1, int16_t l2, int16_t l3,
90
- int16_t l4, int16_t l5, int16_t l6, int16_t l7) {
91
- int16_t v[] = { l0, l1, l2, l3,
92
- l4, l5, l6, l7 };
93
- return simde_vld1q_s16(v);
94
- }
95
-
96
- SIMDE__FUNCTION_ATTRIBUTES
97
- simde_int16x8_t
98
- simde_vdupq_n_s16 (int16_t value) {
99
- simde_int16x8_t r;
100
- #if defined(SIMDE_NEON_NATIVE)
101
- r.n = vdupq_n_s16(value);
102
- #else
103
- SIMDE__VECTORIZE
104
- for (size_t i = 0 ; i < (sizeof(r.i16) / sizeof(r.i16[0])) ; i++) {
105
- r.i16[i] = value;
106
- }
107
- #endif
108
- return r;
109
- }
110
-
111
- SIMDE__FUNCTION_ATTRIBUTES
112
- simde_int16x8_t
113
- simde_vmulq_s16(simde_int16x8_t a, simde_int16x8_t b) {
114
- simde_int16x8_t r;
115
- #if defined(SIMDE_NEON_NATIVE)
116
- r.n = vmulq_s16(a.n, b.n);
117
- #elif defined(SIMDE_SSE2_NATIVE)
118
- r.sse = _mm_mul_epi16(a.sse, b.sse);
119
- #else
120
- SIMDE__VECTORIZE
121
- for (size_t i = 0 ; i < (sizeof(r.i16) / sizeof(r.i16[0])) ; i++) {
122
- r.i16[i] = a.i16[i] * b.i16[i];
123
- }
124
- #endif
125
- return r;
126
- }
127
-
128
- SIMDE__FUNCTION_ATTRIBUTES
129
- simde_int16x8_t
130
- simde_vsubq_s16(simde_int16x8_t a, simde_int16x8_t b) {
131
- simde_int16x8_t r;
132
- #if defined(SIMDE_NEON_NATIVE)
133
- r.n = vsubq_s16(a.n, b.n);
134
- #elif defined(SIMDE_SSE2_NATIVE)
135
- r.sse = _mm_sub_epi16(a.sse, b.sse);
136
- #else
137
- SIMDE__VECTORIZE
138
- for (size_t i = 0 ; i < (sizeof(r.i16) / sizeof(r.i16[0])) ; i++) {
139
- r.i16[i] = a.i16[i] - b.i16[i];
140
- }
141
- #endif
142
- return r;
143
- }
144
-
145
- #endif