Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix slice vector syntax #6

Open
benman1 opened this issue May 5, 2018 · 0 comments
Open

fix slice vector syntax #6

benman1 opened this issue May 5, 2018 · 0 comments

Comments

@benman1
Copy link

benman1 commented May 5, 2018

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)});
    
       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)});
    
       auto av = xt::dynamic_view(a, sv);
       auto bv = xt::dynamic_view(b, sv);
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant