Skip to content

Commit 2b656bf

Browse files
authored
Merge pull request #531 from JohanMabille/refactoring
Switched to new implementation of xsimd
2 parents 1487a28 + 8fb4ff0 commit 2b656bf

File tree

201 files changed

+16585
-39062
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+16585
-39062
lines changed

.azure-pipelines/azure-pipelines-linux-gcc.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ jobs:
2020
gcc_version: '4.9'
2121
arm_arch_dir: 'aarch64-linux-gnu'
2222
arm_arch_target: 'armv8-a'
23-
gcc_8_enable_fallback:
23+
#gcc_8_enable_fallback:
24+
#gcc_version: '8'
25+
#enable_xtl_complex: 1
26+
#enable_fallback: 1
27+
gcc_8:
2428
gcc_version: '8'
2529
enable_xtl_complex: 1
26-
enable_fallback: 1
2730
gcc_9:
2831
gcc_version: '9'
2932
pool:

.azure-pipelines/azure-pipelines-win.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
-DCMAKE_C_COMPILER=clang-cl ^
6161
-DCMAKE_CXX_COMPILER=clang-cl ^
6262
-DDOWNLOAD_GTEST=ON ^
63+
-DXSIMD_REFACTORING=ON ^
6364
$(Build.SourcesDirectory)
6465
displayName: "Configure xsimd"
6566
workingDirectory: $(Build.BinariesDirectory)

.azure-pipelines/unix-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ steps:
5151
workingDirectory: $(Build.BinariesDirectory)/build
5252
5353
- script: |
54+
cd test
5455
source activate xsimd
5556
if [[ $(avx512) == 1 ]]; then
5657
../../sde-external-8.56.0-2020-07-05-lin/sde64 -skx -- ./test_xsimd
@@ -65,4 +66,4 @@ steps:
6566
./test_xsimd
6667
fi
6768
displayName: Test xsimd
68-
workingDirectory: $(Build.BinariesDirectory)/build/test
69+
workingDirectory: $(Build.BinariesDirectory)/build

CMakeLists.txt

Lines changed: 38 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
cmake_minimum_required(VERSION 3.1)
1212
project(xsimd)
13+
option(XSIMD_REFACTORING ON)
1314

1415
set(XSIMD_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
1516

@@ -31,83 +32,43 @@ message(STATUS "xsimd v${${PROJECT_NAME}_VERSION}")
3132
# =====
3233

3334
set(XSIMD_HEADERS
34-
${XSIMD_INCLUDE_DIR}/xsimd/xsimd.hpp
35-
${XSIMD_INCLUDE_DIR}/xsimd/config/xsimd_align.hpp
36-
${XSIMD_INCLUDE_DIR}/xsimd/config/xsimd_config.hpp
37-
${XSIMD_INCLUDE_DIR}/xsimd/config/xsimd_include.hpp
38-
${XSIMD_INCLUDE_DIR}/xsimd/config/xsimd_instruction_set.hpp
39-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_basic_math.hpp
40-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_error.hpp
41-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_exp_reduction.hpp
42-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_exponential.hpp
43-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_fp_manipulation.hpp
44-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_fp_sign.hpp
45-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_gamma.hpp
46-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_horner.hpp
47-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_hyperbolic.hpp
48-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_invtrigo.hpp
49-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_logarithm.hpp
50-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_math.hpp
51-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_math_complex.hpp
52-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_numerical_constant.hpp
53-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_power.hpp
54-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_rem_pio2.hpp
55-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_rounding.hpp
56-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_trigo_reduction.hpp
57-
${XSIMD_INCLUDE_DIR}/xsimd/math/xsimd_trigonometric.hpp
58-
${XSIMD_INCLUDE_DIR}/xsimd/memory/xsimd_aligned_allocator.hpp
59-
${XSIMD_INCLUDE_DIR}/xsimd/memory/xsimd_aligned_stack_buffer.hpp
60-
${XSIMD_INCLUDE_DIR}/xsimd/memory/xsimd_alignment.hpp
61-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx_complex.hpp
62-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx_conversion.hpp
63-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx_double.hpp
64-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx_float.hpp
65-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx_int8.hpp
66-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx_int16.hpp
67-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx_int32.hpp
68-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx_int64.hpp
69-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx_int_base.hpp
70-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx512_bool.hpp
71-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx512_complex.hpp
72-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx512_conversion.hpp
73-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx512_double.hpp
74-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx512_float.hpp
75-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx512_int8.hpp
76-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx512_int16.hpp
77-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx512_int32.hpp
78-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx512_int64.hpp
79-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx512_int_base.hpp
80-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_bool.hpp
81-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_complex.hpp
82-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_conversion.hpp
83-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_double.hpp
84-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_float.hpp
85-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_int8.hpp
86-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_int16.hpp
87-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_int32.hpp
88-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_int64.hpp
89-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_uint8.hpp
90-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_uint16.hpp
91-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_uint32.hpp
92-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_uint64.hpp
93-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_utils.hpp
94-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_base.hpp
95-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_base_bool.hpp
96-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_complex_base.hpp
97-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_fallback.hpp
98-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_int_conversion.hpp
99-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_sse_complex.hpp
100-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_sse_conversion.hpp
101-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_sse_double.hpp
102-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_sse_float.hpp
103-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_sse_int8.hpp
104-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_sse_int16.hpp
105-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_sse_int32.hpp
106-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_sse_int64.hpp
107-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_sse_int_base.hpp
108-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_traits.hpp
109-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_types_include.hpp
110-
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_utils.hpp
35+
${XSIMD_INCLUDE_DIR}/xsimd/arch/xsimd_constants.hpp
36+
${XSIMD_INCLUDE_DIR}/xsimd/arch/xsimd_fma3.hpp
37+
${XSIMD_INCLUDE_DIR}/xsimd/arch/xsimd_fma4.hpp
38+
${XSIMD_INCLUDE_DIR}/xsimd/arch/xsimd_generic.hpp
39+
${XSIMD_INCLUDE_DIR}/xsimd/arch/xsimd_isa.hpp
40+
${XSIMD_INCLUDE_DIR}/xsimd/arch/xsimd_neon.hpp
41+
${XSIMD_INCLUDE_DIR}/xsimd/arch/xsimd_neon64.hpp
42+
${XSIMD_INCLUDE_DIR}/xsimd/arch/xsimd_scalar.hpp
43+
${XSIMD_INCLUDE_DIR}/xsimd/arch/xsimd_sse2.hpp
44+
${XSIMD_INCLUDE_DIR}/xsimd/arch/xsimd_sse3.hpp
45+
${XSIMD_INCLUDE_DIR}/xsimd/arch/xsimd_sse4_1.hpp
46+
${XSIMD_INCLUDE_DIR}/xsimd/arch/xsimd_sse4_2.hpp
47+
${XSIMD_INCLUDE_DIR}/xsimd/arch/xsimd_ssse3.hpp
48+
${XSIMD_INCLUDE_DIR}/xsimd/config/xsimd_arch.hpp
49+
${XSIMD_INCLUDE_DIR}/xsimd/config/xsimd_config.hpp
50+
${XSIMD_INCLUDE_DIR}/xsimd/config/xsimd_cpuid.hpp
51+
${XSIMD_INCLUDE_DIR}/xsimd/memory/xsimd_aligned_allocator.hpp
52+
${XSIMD_INCLUDE_DIR}/xsimd/memory/xsimd_alignment.hpp
53+
${XSIMD_INCLUDE_DIR}/xsimd/stl/algorithms.hpp
54+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_all_registers.hpp
55+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_api.hpp
56+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon_register.hpp
57+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_neon64_register.hpp
58+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx2_register.hpp
59+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx512f_register.hpp
60+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_avx_register.hpp
61+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_batch.hpp
62+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_batch_constant.hpp
63+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_generic_arch.hpp
64+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_register.hpp
65+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_sse2_register.hpp
66+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_sse3_register.hpp
67+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_sse4_1_register.hpp
68+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_sse4_2_register.hpp
69+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_ssse3_register.hpp
70+
${XSIMD_INCLUDE_DIR}/xsimd/types/xsimd_utils.hpp
71+
${XSIMD_INCLUDE_DIR}/xsimd/xsimd.hpp
11172
)
11273

11374
add_library(xsimd INTERFACE)

docs/Doxyfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
PROJECT_NAME = "xsimd"
22
XML_OUTPUT = xml
3-
INPUT = ../include source/api/xsimd_batch.hpp
3+
INPUT = ../include-refactoring/xsimd/types/xsimd_api.hpp \
4+
../include-refactoring/xsimd/types/xsimd_batch.hpp \
5+
../include-refactoring/xsimd/config/xsimd_config.hpp \
6+
../include-refactoring/xsimd/memory/xsimd_aligned_allocator.hpp
47
GENERATE_LATEX = NO
58
GENERATE_MAN = NO
69
GENERATE_RTF = NO

docs/source/api/aligned_allocator.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,3 @@ Aligned memory allocator
1010
.. doxygenclass:: xsimd::aligned_allocator
1111
:project: xsimd
1212
:members:
13-
14-
Comparison operators
15-
--------------------
16-
17-
.. doxygengroup:: allocator_comparison
18-
:project: xsimd
19-
:content-only:
20-

docs/source/api/available_wrappers.rst

Lines changed: 0 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -45,153 +45,6 @@ you should be aware that it is only intended for use in validation scenarios. It
4545
performance, and its run-time characteristics may vary enormously from one compiler to another. Enabling it in
4646
performance-conscious production code is therefore strongly discouraged.
4747

48-
x86 architecture
49-
----------------
50-
51-
Depending on the value of XSIMD_X86_INSTR_SET, the following wrappers are available:
52-
53-
- XSIMD_X86_INSTR_SET >= XSIMD_X86_SSE2_VERSION
54-
55-
+--------------------------------+-------------------------------------+
56-
| batch | batch_bool |
57-
+================================+=====================================+
58-
| batch<int8_t, 16> | batch_bool<int8_t, 16> |
59-
+--------------------------------+-------------------------------------+
60-
| batch<uint8_t, 16> | batch_bool<uint8_t, 16> |
61-
+--------------------------------+-------------------------------------+
62-
| batch<int16_t, 9> | batch_bool<int16_t, 8> |
63-
+--------------------------------+-------------------------------------+
64-
| batch<uint16_t, 8> | batch_bool<uint16_t, 8> |
65-
+--------------------------------+-------------------------------------+
66-
| batch<int32_t, 4> | batch_bool<int32_t, 4> |
67-
+--------------------------------+-------------------------------------+
68-
| batch<uint32_t, 4> | batch_bool<uint32_t, 4> |
69-
+--------------------------------+-------------------------------------+
70-
| batch<int64_t, 2> | batch_bool<int64_t, 2> |
71-
+--------------------------------+-------------------------------------+
72-
| batch<uint64_t, 2> | batch_bool<uint64_t, 2> |
73-
+--------------------------------+-------------------------------------+
74-
| batch<float, 4> | batch_bool<float, 4> |
75-
+--------------------------------+-------------------------------------+
76-
| batch<double, 2> | batch_bool<double, 2> |
77-
+--------------------------------+-------------------------------------+
78-
| batch<std::complex<float>, 4> | batch_bool<std::complex<float>, 4> |
79-
+--------------------------------+-------------------------------------+
80-
| batch<std::complex<double>, 2> | batch_bool<std::complex<double>, 2> |
81-
+--------------------------------+-------------------------------------+
82-
83-
- XSIMD_X86_INSTR_SET >= XSIMD_X86_AVX_VERSION
84-
85-
In addition to the wrappers defined above, the following wrappers are available:
86-
87-
+--------------------------------+-------------------------------------+
88-
| batch | batch_bool |
89-
+================================+=====================================+
90-
| batch<int8_t, 32> | batch_bool<int8_t, 32> |
91-
+--------------------------------+-------------------------------------+
92-
| batch<uint8_t, 32> | batch_bool<uint8_t, 32> |
93-
+--------------------------------+-------------------------------------+
94-
| batch<int16_t, 16> | batch_bool<int16_t, 16> |
95-
+--------------------------------+-------------------------------------+
96-
| batch<uint16_t, 16> | batch_bool<uint16_t, 16> |
97-
+--------------------------------+-------------------------------------+
98-
| batch<int32_t, 8> | batch_bool<int32_t, 8> |
99-
+--------------------------------+-------------------------------------+
100-
| batch<uint32_t, 8> | batch_bool<uint32_t, 8> |
101-
+--------------------------------+-------------------------------------+
102-
| batch<int64_t, 4> | batch_bool<int64_t, 4> |
103-
+--------------------------------+-------------------------------------+
104-
| batch<uint64_t, 4> | batch_bool<uint64_t, 4> |
105-
+--------------------------------+-------------------------------------+
106-
| batch<float, 8> | batch_bool<float, 8> |
107-
+--------------------------------+-------------------------------------+
108-
| batch<double, 4> | batch_bool<double, 4> |
109-
+--------------------------------+-------------------------------------+
110-
| batch<std::complex<float>, 8> | batch_bool<std::complex<float>, 8> |
111-
+--------------------------------+-------------------------------------+
112-
| batch<std::complex<double>, 4> | batch_bool<std::complex<double>, 4> |
113-
+--------------------------------+-------------------------------------+
114-
115-
- XSIMD_X86_INSTR_SET >= XSIMD_X86_AVX512_VERSION
116-
117-
In addition to the wrappers defined above, the following wrappers are available:
118-
119-
+--------------------------------+-------------------------------------+
120-
| batch | batch_bool |
121-
+================================+=====================================+
122-
| batch<int8_t, 64> | batch_bool<int8_t, 64> |
123-
+--------------------------------+-------------------------------------+
124-
| batch<uint8_t, 64> | batch_bool<uint8_t, 64> |
125-
+--------------------------------+-------------------------------------+
126-
| batch<int16_t, 32> | batch_bool<int16_t, 32> |
127-
+--------------------------------+-------------------------------------+
128-
| batch<uint16_t, 32> | batch_bool<uint16_t, 32> |
129-
+--------------------------------+-------------------------------------+
130-
| batch<int32_t, 16> | batch_bool<int32_t, 16> |
131-
+--------------------------------+-------------------------------------+
132-
| batch<uint32_t, 16> | batch_bool<uint32_t, 16> |
133-
+--------------------------------+-------------------------------------+
134-
| batch<int64_t, 8> | batch_bool<int64_t, 8> |
135-
+--------------------------------+-------------------------------------+
136-
| batch<uint64_t, 8> | batch_bool<uint64_t, 8> |
137-
+--------------------------------+-------------------------------------+
138-
| batch<float, 16> | batch_bool<float, 16> |
139-
+--------------------------------+-------------------------------------+
140-
| batch<double, 8> | batch_bool<double, 8> |
141-
+--------------------------------+-------------------------------------+
142-
| batch<std::complex<float>, 16> | batch_bool<std::complex<float>, 16> |
143-
+--------------------------------+-------------------------------------+
144-
| batch<std::complex<double>, 8> | batch_bool<std::complex<double>, 8> |
145-
+--------------------------------+-------------------------------------+
146-
147-
ARM architecture
148-
----------------
149-
150-
Depending on the value of XSIMD_ARM_INSTR_SET, the following wrappers are available:
151-
152-
- XSIMD_ARM_INSTR_SET >= XSIMD_ARM7_NEON_VERSION
153-
154-
+--------------------------------+-------------------------------------+
155-
| batch | batch_bool |
156-
+================================+=====================================+
157-
| batch<int8_t, 16> | batch_bool<int8_t, 16> |
158-
+--------------------------------+-------------------------------------+
159-
| batch<uint8_t, 16> | batch_bool<uint8_t, 16> |
160-
+--------------------------------+-------------------------------------+
161-
| batch<int16_t, 8> | batch_bool<int16_t, 8> |
162-
+--------------------------------+-------------------------------------+
163-
| batch<uint16_t, 8> | batch_bool<uint16_t, 8> |
164-
+--------------------------------+-------------------------------------+
165-
| batch<int32_t, 4> | batch_bool<int32_t, 4> |
166-
+--------------------------------+-------------------------------------+
167-
| batch<uint32_t, 4> | batch_bool<uint32_t, 4> |
168-
+--------------------------------+-------------------------------------+
169-
| batch<int64_t, 2> | batch_bool<int64_t, 2> |
170-
+--------------------------------+-------------------------------------+
171-
| batch<uint64_t, 2> | batch_bool<uint64_t, 2> |
172-
+--------------------------------+-------------------------------------+
173-
| batch<float, 4> | batch_bool<float, 4> |
174-
+--------------------------------+-------------------------------------+
175-
| batch<std::complex<float>, 4> | batch_bool<std::complex<float>, 4> |
176-
+--------------------------------+-------------------------------------+
177-
178-
- XSIMD_ARM_INSTR_SET >= XSIMD_ARM8_64_NEON_VERSION
179-
180-
In addition to the wrappers defined above, the following wrappers are available:
181-
182-
+--------------------------------+-------------------------------------+
183-
| batch | batch_bool |
184-
+================================+=====================================+
185-
| batch<double, 2> | batch_bool<double, 2> |
186-
+--------------------------------+-------------------------------------+
187-
| batch<std::complex<double>, 2> | batch_bool<std::complex<double>, 2> |
188-
+--------------------------------+-------------------------------------+
189-
190-
.. warning::
191-
192-
Support for ``std::complex`` on ARM is still experimental. You may
193-
experience accuracy errors with ``std::complex<float>``.
194-
19548
XTL complex support
19649
-------------------
19750

0 commit comments

Comments
 (0)