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

ref_bytes and view_bytes #61

Open
lgarithm opened this issue Oct 28, 2019 · 0 comments
Open

ref_bytes and view_bytes #61

lgarithm opened this issue Oct 28, 2019 · 0 comments

Comments

@lgarithm
Copy link
Collaborator

e.g.

template <typename R, ttl::rank_t r>
ttl::tensor_view<uint8_t, 1> view_bytes(const ttl::tensor_view<R, r> &x)
{
    return ttl::tensor_view<uint8_t, 1>(
        reinterpret_cast<const uint8_t *>(x.data()), x.data_size());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant