|
8 | 8 |
|
9 | 9 | #include <benchmark/benchmark.h>
|
10 | 10 |
|
11 |
| -#include "xtensor/xarray.hpp" |
12 |
| -#include "xtensor/xfixed.hpp" |
13 |
| -#include "xtensor/xnoalias.hpp" |
14 |
| -#include "xtensor/xrandom.hpp" |
15 |
| -#include "xtensor/xtensor.hpp" |
| 11 | +#include "xtensor/containers/xarray.hpp" |
| 12 | +#include "xtensor/containers/xfixed.hpp" |
| 13 | +#include "xtensor/containers/xtensor.hpp" |
| 14 | +#include "xtensor/core/xnoalias.hpp" |
| 15 | +#include "xtensor/generators/xrandom.hpp" |
16 | 16 |
|
17 | 17 | namespace xt
|
18 | 18 | {
|
@@ -61,23 +61,24 @@ namespace xt
|
61 | 61 | }
|
62 | 62 | }
|
63 | 63 |
|
64 |
| - inline void assign_create_strided_view(benchmark::State& state) |
65 |
| - { |
66 |
| - xt::xtensor<double, 4> tens = xt::random::rand<double>({100, 100, 3, 3}); |
67 |
| - for (auto _ : state) |
68 |
| - { |
69 |
| - for (std::size_t i = 0; i < tens.shape()[0]; ++i) |
70 |
| - { |
71 |
| - for (std::size_t j = 0; j < tens.shape()[1]; ++j) |
72 |
| - { |
73 |
| - auto v = xt::strided_view(tens, {i, j, all(), all()}); |
74 |
| - xt::xtensor<double, 2> vas = v; |
75 |
| - benchmark::ClobberMemory(); |
76 |
| - } |
77 |
| - } |
78 |
| - } |
79 |
| - } |
80 |
| - |
| 64 | + /** |
| 65 | + * inline void assign_create_strided_view(benchmark::State& state) |
| 66 | + * { |
| 67 | + * xt::xtensor<double, 4> tens = xt::random::rand<double>({100, 100, 3, 3}); |
| 68 | + * for (auto _ : state) |
| 69 | + * { |
| 70 | + * for (std::size_t i = 0; i < tens.shape()[0]; ++i) |
| 71 | + * { |
| 72 | + * for (std::size_t j = 0; j < tens.shape()[1]; ++j) |
| 73 | + * { |
| 74 | + * auto v = xt::strided_view(tens, {i, j, all(), all()}); |
| 75 | + * xt::xtensor<double, 2> vas = v; |
| 76 | + * benchmark::ClobberMemory(); |
| 77 | + * } |
| 78 | + * } |
| 79 | + * } |
| 80 | + * } |
| 81 | + */ |
81 | 82 | inline void assign_create_manual_view(benchmark::State& state)
|
82 | 83 | {
|
83 | 84 | xt::xtensor<double, 4> tens = xt::random::rand<double>({100, 100, 3, 3});
|
@@ -151,7 +152,7 @@ namespace xt
|
151 | 152 | BENCHMARK(create_strided_view_outofplace);
|
152 | 153 | BENCHMARK(create_strided_view_inplace);
|
153 | 154 | BENCHMARK(assign_create_manual_noview);
|
154 |
| - BENCHMARK(assign_create_strided_view); |
| 155 | + // BENCHMARK(assign_create_strided_view); |
155 | 156 | BENCHMARK(assign_create_view);
|
156 | 157 | BENCHMARK(assign_create_manual_view);
|
157 | 158 | BENCHMARK(data_offset);
|
|
0 commit comments