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

Deep copy #303

Merged
merged 6 commits into from
Nov 21, 2024
Merged

Deep copy #303

merged 6 commits into from
Nov 21, 2024

Conversation

liu15
Copy link
Collaborator

@liu15 liu15 commented Nov 14, 2024

Add DEEP_COPY_RAW_PTR option for managed array initialization from raw pointers

@liu15 liu15 requested review from robinson96 and adayton1 November 14, 2024 17:53
@adayton1
Copy link
Member

Can you add a release note?

@adayton1 adayton1 requested review from agcapps and dtaller November 21, 2024 20:34
@adayton1 adayton1 merged commit f818cc3 into develop Nov 21, 2024
7 checks passed
@adayton1 adayton1 deleted the deepCopy branch November 21, 2024 21:25
@dtaller
Copy link
Collaborator

dtaller commented Nov 21, 2024

This MR was fine, but I do have two questions. Why did you make deep copy a compile time option instead of an argument, as for example

host_device_ptr<T>(T* from, size_t size, const char * name. bool deepCopy=false)

Also, what are the use cases for this?

@liu15
Copy link
Collaborator Author

liu15 commented Nov 22, 2024

This is mainly to create a version of the code that does not rely on XNACK when using a single memory space (XNACK allows CPU pointers to be accessed from the GPU). This function is basically our memWrap and if you wanted to always deep copy, you wouldn't use this constructor.

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

Successfully merging this pull request may close these issues.

3 participants