|
11 | 11 |
|
12 | 12 | #include <xsimd/xsimd.hpp> |
13 | 13 |
|
14 | | -#include "./builder.hpp" |
| 14 | +#include "./map.hpp" |
15 | 15 |
|
16 | 16 | namespace xsimd::algo |
17 | 17 | { |
18 | 18 | template < |
19 | | - xsimd::builder::alignment_options align = xsimd::builder::alignment_options{}, |
| 19 | + xsimd::alignment_options align = xsimd::alignment_options{}, |
20 | 20 | typename Arch = xsimd::default_arch, |
21 | 21 | typename T> |
22 | 22 | void sqrt(std::span<T const> in, std::span<T> out) |
23 | 23 | { |
24 | | - constexpr builder::map_options opts = { .unroll_factor = 4, .pure = true }; |
25 | | - return xsimd::builder::map_unary<align, opts, Arch>( |
| 24 | + constexpr map_options opts = { .unroll_factor = 4, .pure = true }; |
| 25 | + return xsimd::map_unary<align, opts, Arch>( |
26 | 26 | in, out, [](auto x) |
27 | 27 | { return sqrt(x); }); |
28 | 28 | } |
29 | 29 |
|
30 | 30 | template < |
31 | | - xsimd::builder::alignment_options align = xsimd::builder::alignment_options{}, |
| 31 | + xsimd::alignment_options align = xsimd::alignment_options{}, |
32 | 32 | typename Arch = xsimd::default_arch, |
33 | 33 | typename T> |
34 | 34 | void abs(std::span<T const> in, std::span<T> out) |
35 | 35 | { |
36 | | - constexpr builder::map_options opts = { .unroll_factor = 4, .pure = true }; |
37 | | - return xsimd::builder::map_unary<align, opts, Arch>( |
| 36 | + constexpr map_options opts = { .unroll_factor = 4, .pure = true }; |
| 37 | + return xsimd::map_unary<align, opts, Arch>( |
38 | 38 | in, out, [](auto x) |
39 | 39 | { return abs(x); }); |
40 | 40 | } |
41 | 41 |
|
42 | 42 | template < |
43 | | - xsimd::builder::alignment_options align = xsimd::builder::alignment_options{}, |
| 43 | + xsimd::alignment_options align = xsimd::alignment_options{}, |
44 | 44 | typename Arch = xsimd::default_arch, |
45 | 45 | typename T> |
46 | 46 | void exp(std::span<T const> in, std::span<T> out) |
47 | 47 | { |
48 | | - constexpr builder::map_options opts = { .unroll_factor = 4, .pure = true }; |
49 | | - return xsimd::builder::map_unary<align, opts, Arch>( |
| 48 | + constexpr map_options opts = { .unroll_factor = 4, .pure = true }; |
| 49 | + return xsimd::map_unary<align, opts, Arch>( |
50 | 50 | in, out, [](auto x) |
51 | 51 | { return exp(x); }); |
52 | 52 | } |
|
0 commit comments