Open benman1 opened 6 years ago
I got compiler errors with slice_vector. I made this change, so the benchmark ran:
diff --git a/src/benchmark_views.hpp b/src/benchmark_views.hpp index a362ec7..681a675 100644 --- a/src/benchmark_views.hpp +++ b/src/benchmark_views.hpp @@ -14,6 +14,7 @@
+#include "xtensor/xstrided_view.hpp"
@@ -64,7 +65,7 @@ namespace xt tensor a = random::rand({state.range(0), state.range(0)}); tensor b = random::rand({state.range(0), state.range(0)});
auto sv = xt::slice_vector(a, range(0, 5), range(0, 5));
auto sv = xt::slice_vector({range(0, 5), range(0, 5)});
auto av = xt::dynamic_view(a, sv); auto bv = xt::dynamic_view(b, sv);
@@ -123,7 +124,7 @@ namespace xt tensor a = random::rand({state.range(0)}); tensor b = random::rand({state.range(0)});
auto sv = xt::slice_vector(a, range(0, state.range(0), 2));
auto sv = xt::slice_vector({xt::range(0, state.range(0), 2)});
I got compiler errors with slice_vector. I made this change, so the benchmark ran:
diff --git a/src/benchmark_views.hpp b/src/benchmark_views.hpp index a362ec7..681a675 100644 --- a/src/benchmark_views.hpp +++ b/src/benchmark_views.hpp @@ -14,6 +14,7 @@
include "xtensor/xtensor.hpp"
include "xtensor/xarray.hpp"
include "xtensor/xstrided_view.hpp"
+#include "xtensor/xstrided_view.hpp"
include "xtensor/xview.hpp"
include "xtensor/xadapt.hpp"
@@ -64,7 +65,7 @@ namespace xt tensor a = random::rand({state.range(0), state.range(0)});
tensor b = random::rand({state.range(0), state.range(0)});
auto sv = xt::slice_vector(a, range(0, 5), range(0, 5));
auto sv = xt::slice_vector({range(0, 5), range(0, 5)});
@@ -123,7 +124,7 @@ namespace xt tensor a = random::rand({state.range(0)});
tensor b = random::rand({state.range(0)});
auto sv = xt::slice_vector(a, range(0, state.range(0), 2));
auto sv = xt::slice_vector({xt::range(0, state.range(0), 2)});