Skip to content

Conversation

wolfv
Copy link
Member

@wolfv wolfv commented Jun 20, 2018

This enables fast iterators.

Currently, default template parameter is still dynamic, so no backwards incompatibility.

@SylvainCorlay
Copy link
Member

Yeah!

@wolfv
Copy link
Member Author

wolfv commented Jun 20, 2018

Note:

I had to add -fvisibility=hidden to the test cmake list to silence some warnings (as described also in the pybind11 FAQ).

Also, there was a warning about the pytensor copy constructor:

/home/wolfv/Programs/xtensor-python/include/xtensor-python/pytensor.hpp: In instantiation of ‘xt::pytensor<T, N, L>::pytensor(const self_type&) [with T = int; long unsigned int N = 3; xt::layout_type L = (xt::layout_type)0; xt::pytensor<T, N, L>::self_type = xt::pytensor<int, 3>]’:
/home/wolfv/Programs/xtensor-python/test/test_pytensor.cpp:102:33:   required from here
/home/wolfv/Programs/xtensor-python/include/xtensor-python/pytensor.hpp:333:12: warning: base class ‘class xt::xcontainer_semantic<xt::pytensor<int, 3> >’ should be explicitly initialized in the copy constructor [-Wextra]
     inline pytensor<T, N, L>::pytensor(const self_type& rhs)
            ^~~~~~~~~~~~~~~~~

which was fixed by swapping the initialization of the base_type to self_type.

@SylvainCorlay SylvainCorlay merged commit 504b75b into xtensor-stack:master Jun 20, 2018
@wolfv wolfv deleted the add_layout_template_param branch June 20, 2018 18:55
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

Successfully merging this pull request may close these issues.

2 participants