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

load/storeChunk: slice view #138

Closed
ax3l opened this issue Apr 20, 2018 · 3 comments
Closed

load/storeChunk: slice view #138

ax3l opened this issue Apr 20, 2018 · 3 comments

Comments

@ax3l
Copy link
Member

ax3l commented Apr 20, 2018

The A.storeChunk(data, offset, extent) and A.loadChunk(data, chunk_offset, chunk_extent) methods should for syntactic sugar provide a slice-view access of the form:

// write (copy)
A[view] = data;

// returns: std::unique_ptr< A.dtype >
auto B = A[view];
// hm, maybe that's not possible, so let's say something like
auto B = A[view].astype< some_dtype >();
@ax3l
Copy link
Member Author

ax3l commented Apr 20, 2018

Hm, maybe we can also implements views when we add the xtensor frontend

https://xtensor.readthedocs.io/en/latest/basic_usage.html

related to #32

@ax3l
Copy link
Member Author

ax3l commented May 24, 2018

Hm, I think we will need this C++ Slice class even earlier if we want to have a seamless python API.
And two helpers for:
Extent, Offset -> Slice and Slice -> Extent, Offset

No need to expose it in the C++ frontend at this point, tough.

@ax3l
Copy link
Member Author

ax3l commented Jan 15, 2020

Implemented with #458

@ax3l ax3l closed this as completed Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant