-
Notifications
You must be signed in to change notification settings - Fork 12
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
AbstractArray
-> MallocArray
conversion?
#44
Comments
Ah, so the trouble there is that MallocArray's are expecting to be given a pointer to memory that has been manually allocated with If you can guarantee for your use case that Julia won't GC the underlying memory and wanted to implement a method like this, I'd accept a PR -- but it should probably convert to In the meanwhile, we do also have this method (which works on any AbstractArray and just copies the data to a new MallocArray):
|
Okay, thanks! I didn't know about |
Cool! PRs welcome if you want to change anything here! |
I find
MallocArray
useful for working withccall
because it allows me to more easily pass in ref-wrapped structs that contain arrays. But it's a little clunky to manually have to convert from a plainArray
to aMallocArray
. Would there be anything wrong with having a default conversion like this?The text was updated successfully, but these errors were encountered: