xtensor
|
Typedefs | |
template<class T , std::size_t N, layout_type L = ::xt::layout_type::row_major> | |
using | xt::xtensor_pointer |
xtensor adaptor for a pointer. | |
template<class T , layout_type L = ::xt::layout_type::row_major, class SC = xt::svector<typename uvector< T , std::allocator<std::size_t> >::size_type, 4, std::allocator<std::size_t> , true>> | |
using | xt::xarray_pointer |
xarray adaptor for a pointer. | |
Functions | |
template<layout_type L = ::xt::layout_type::row_major, class C , class SC > | |
auto | xt::adapt (C &&container, const SC &shape, layout_type l=L) |
Constructs: | |
template<class C , class SC , class SS > | |
auto | xt::adapt (C &&container, SC &&shape, SS &&strides) |
Constructs: | |
template<layout_type L = ::xt::layout_type::row_major, class P , class O , class SC , class A = detail::default_allocator_for_ptr_t<P>> | |
auto | xt::adapt (P &&pointer, typename A::size_type size, O ownership, const SC &shape, layout_type l=L, const A &alloc=A()) |
Constructs: | |
template<class P , class O , class SC , class SS , class A = detail::default_allocator_for_ptr_t<P>> | |
auto | xt::adapt (P &&pointer, typename A::size_type size, O ownership, SC &&shape, SS &&strides, const A &alloc=A()) |
Constructs: | |
template<layout_type L = ::xt::layout_type::row_major, class T , std::size_t N, class SC > | |
auto | xt::adapt (T(&c_array)[N], const SC &shape, layout_type l=L) |
Constructs: | |
template<class T , std::size_t N, class SC , class SS > | |
auto | xt::adapt (T(&c_array)[N], SC &&shape, SS &&strides) |
Constructs: | |
template<layout_type L = ::xt::layout_type::row_major, class C , std::size_t... X> | |
auto | xt::adapt (C &&pointer, const fixed_shape< X... > &) |
Constructs an non-owning xtensor_fixed_adaptor from a pointer with the specified shape and layout. | |
template<layout_type L = ::xt::layout_type::row_major, class C > | |
xtensor_adaptor< C, 1, L > | xt::adapt (C &&container, layout_type l=L) |
Constructs a 1-D xtensor_adaptor of the given stl-like container, with the specified layout_type. | |
template<layout_type L = ::xt::layout_type::row_major, class P , class O , class A = detail::default_allocator_for_ptr_t<P>> | |
xtensor_adaptor< xbuffer_adaptor< xtl::closure_type_t< P >, O, A >, 1, L > | xt::adapt (P &&pointer, typename A::size_type size, O ownership, layout_type l=L, const A &alloc=A()) |
Constructs a 1-D xtensor_adaptor of the given dynamically allocated C array, with the specified layout. | |
template<layout_type L = ::xt::layout_type::row_major, class P , class SC , xtl::check_concept< detail::not_an_array< std::decay_t< SC > > > = 0> | |
auto | xt::adapt_smart_ptr (P &&smart_ptr, const SC &shape, layout_type l=L) |
Adapt a smart pointer to a typed memory block (unique_ptr or shared_ptr) | |
template<layout_type L = ::xt::layout_type::row_major, class P , class SC , class D , xtl::check_concept< detail::not_an_array< std::decay_t< SC > >, detail::not_a_layout< std::decay_t< D > > > = 0> | |
auto | xt::adapt_smart_ptr (P &&data_ptr, const SC &shape, D &&smart_ptr, layout_type l=L) |
Adapt a smart pointer (shared_ptr or unique_ptr) | |
template<layout_type L = ::xt::layout_type::row_major, class P , class I , std::size_t N> | |
auto | xt::adapt_smart_ptr (P &&smart_ptr, const I(&shape)[N], layout_type l=L) |
Adapt a smart pointer to a typed memory block (unique_ptr or shared_ptr) | |
template<layout_type L = ::xt::layout_type::row_major, class P , class I , std::size_t N, class D , xtl::check_concept< detail::not_a_layout< std::decay_t< D > > > = 0> | |
auto | xt::adapt_smart_ptr (P &&data_ptr, const I(&shape)[N], D &&smart_ptr, layout_type l=L) |
Adapt a smart pointer (shared_ptr or unique_ptr) | |
using xt::xarray_pointer |
xarray adaptor for a pointer.
Construct for example with:
T | The data type (e.g. double ). |
L | The xt::layout_type() of the xarray. |
SC | The shape container type (e.g. xt::svector<size_t> ). Default matches xt::adapt(P&&, typename A::size_type, O, const SC&, layout_type, const A& alloc) |
Definition at line 915 of file xadapt.hpp.
using xt::xtensor_pointer |
xtensor adaptor for a pointer.
Construct for example with:
T | The data type (e.g. double ). |
N | The number of dimensions. |
L | The xt::layout_type() of the xtensor. |
Definition at line 886 of file xadapt.hpp.
Constructs:
from the given stl-like container or pointer, with the specified shape and layout. If the adaptor is built from a pointer, it does not take its ownership.
container | the container or pointer to adapt |
shape | the shape of the adaptor |
l | the layout_type of the adaptor |
|
inline |
Constructs a 1-D xtensor_adaptor of the given stl-like container, with the specified layout_type.
container | the container to adapt |
l | the layout_type of the xtensor_adaptor |
Constructs:
from the given stl-like container with the specified shape and strides.
container | the container to adapt |
shape | the shape of the adaptor |
strides | the strides of the adaptor |
|
inline |
Constructs an non-owning xtensor_fixed_adaptor from a pointer with the specified shape and layout.
pointer | the pointer to adapt |
shape | the shape of the xtensor_fixed_adaptor |
|
inline |
Constructs:
of the given dynamically allocated C array, with the specified shape and layout.
pointer | the pointer to the beginning of the dynamic array |
size | the size of the dynamic array |
ownership | indicates whether the adaptor takes ownership of the array. Possible values are no_ownership() or acquire_ownership() |
shape | the shape of the adaptor |
l | the layout_type of the adaptor |
alloc | the allocator used for allocating / deallocating the dynamic array |
|
inline |
Constructs a 1-D xtensor_adaptor of the given dynamically allocated C array, with the specified layout.
pointer | the pointer to the beginning of the dynamic array |
size | the size of the dynamic array |
ownership | indicates whether the adaptor takes ownership of the array. Possible values are no_ownership() or acquire_ownership() |
l | the layout_type of the xtensor_adaptor |
alloc | the allocator used for allocating / deallocating the dynamic array |
|
inline |
Constructs:
of the given dynamically allocated C array, with the specified shape and strides.
pointer | the pointer to the beginning of the dynamic array |
size | the size of the dynamic array |
ownership | indicates whether the adaptor takes ownership of the array. Possible values are no_ownership() or acquire_ownership() |
shape | the shape of the adaptor |
strides | the strides of the adaptor |
alloc | the allocator used for allocating / deallocating the dynamic array |
|
inline |
Constructs:
of the given C array allocated on the stack, with the specified shape and layout.
c_array | the C array allocated on the stack |
shape | the shape of the adaptor |
l | the layout_type of the adaptor |
Constructs:
of the given C array allocated on the stack, with the specified shape and strides.
c_array | the C array allocated on the stack |
shape | the shape of the adaptor |
strides | the strides of the adaptor |
auto xt::adapt_smart_ptr | ( | P && | data_ptr, |
const I(&) | shape[N], | ||
D && | smart_ptr, | ||
layout_type | l = L ) |
Adapt a smart pointer (shared_ptr or unique_ptr)
This function allows to automatically adapt a shared or unique pointer to a given shape and operate naturally on it. Memory will be automatically handled by the smart pointer implementation.
data_ptr | A pointer to a typed data block (e.g. double*) |
shape | The desired shape |
smart_ptr | A smart pointer to move or copy, in order to manage memory |
l | The desired memory layout |
Definition at line 852 of file xadapt.hpp.
auto xt::adapt_smart_ptr | ( | P && | data_ptr, |
const SC & | shape, | ||
D && | smart_ptr, | ||
layout_type | l = L ) |
Adapt a smart pointer (shared_ptr or unique_ptr)
This function allows to automatically adapt a shared or unique pointer to a given shape and operate naturally on it. Memory will be automatically handled by the smart pointer implementation.
data_ptr | A pointer to a typed data block (e.g. double*) |
shape | The desired shape |
smart_ptr | A smart pointer to move or copy, in order to manage memory |
l | The desired memory layout |
Definition at line 752 of file xadapt.hpp.
auto xt::adapt_smart_ptr | ( | P && | smart_ptr, |
const I(&) | shape[N], | ||
layout_type | l = L ) |
Adapt a smart pointer to a typed memory block (unique_ptr or shared_ptr)
smart_ptr | a smart pointer to a memory block of T[] |
shape | The desired shape |
l | The desired memory layout |
Definition at line 785 of file xadapt.hpp.
auto xt::adapt_smart_ptr | ( | P && | smart_ptr, |
const SC & | shape, | ||
layout_type | l = L ) |
Adapt a smart pointer to a typed memory block (unique_ptr or shared_ptr)
smart_ptr | a smart pointer to a memory block of T[] |
shape | The desired shape |
l | The desired memory layout |
Definition at line 687 of file xadapt.hpp.