-
Notifications
You must be signed in to change notification settings - Fork 22
Helpers: to_numpy/cupy #88
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
Conversation
1d3fad4 to
3b0c2ab
Compare
5cd8a6d to
6758c74
Compare
d8da7df to
e83ea3c
Compare
5d1c35b to
4b4d780
Compare
4b4d780 to
8d25a23
Compare
8d25a23 to
a7d3ebd
Compare
a7d3ebd to
816a5c4
Compare
| if order == "F": | ||
| return np.array(self, copy=copy).T |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up: support AMReX-side device-to-host copies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added directly to MultiFab in #192
| for idx_real in range(self.NumRealComps()): | ||
| soa_view.real.append(self.GetRealData(idx_real).to_numpy(copy=copy)) | ||
|
|
||
| for idx_int in range(self.NumIntComps()): | ||
| soa_view.int.append(self.GetIntData(idx_int).to_numpy(copy=copy)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double check if runtime attributes are part of this:
#220 (comment)
| for idx_real in range(self.NumRealComps()): | ||
| soa_view.real.append(self.GetRealData(idx_real).to_cupy(copy=copy)) | ||
|
|
||
| for idx_int in range(self.NumIntComps()): | ||
| soa_view.int.append(self.GetIntData(idx_int).to_cupy(copy=copy)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above: Double check if runtime attributes are part of this.
Close #55