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

Set values with low memory footprint #161

Open
bonfus opened this issue Jan 3, 2024 · 0 comments
Open

Set values with low memory footprint #161

bonfus opened this issue Jan 3, 2024 · 0 comments

Comments

@bonfus
Copy link

bonfus commented Jan 3, 2024

I would like to fill this tensor

int len_N[]    = {4,4,4,4,4,4,4,4,4,2};

with random values for all but the last dimension and with two values (say 0 and 1) for the last dimension. I know how to do it with write, but I'm (very) concerned about the memory footprint of the code.
What is the least memory hungry approach?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant