Skip to content

Provide lightweight class for pointer to external data #2663

@tdegeus

Description

@tdegeus

API

It would be great to be able to do

std::vector<double> data(size);
xt::tensor_pointer<double, 2> a(data, shape);

and then do normal operations with a. An advantage is that a could also for example be a member variable.

Implementation

Such a classes could be aliases for

xarray_adaptor<xbuffer_adaptor<...>, ...>
xtensor_adaptor<xbuffer_adaptor<...>, ...>

see

using return_type = xarray_adaptor<buffer_type, L, std::decay_t<SC>>;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions