You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am interested in exploring how ArrayAllocators.jl may compose with MallocArray.
Essentially, the main task of an AbstractArrayAllocator is to allocate memory safely and return a pointer via the method ArrayAllocators.allocate. We should be able to take that pointer and use it in a MallocArray.
One way of setting that up would be via Base.unsafe_wrap.
The text was updated successfully, but these errors were encountered:
A MallocArray is basically just a thin wrapper around a pointer, so if you have a pointer you can make a MallocArray from it with just MallocArray{T}(ptr, size...)
The main catch might be making an AbstractArrayAllocator that is StaticCompiler-able? But if that can be done then wrapping the pointer is easy enough.
I am interested in exploring how ArrayAllocators.jl may compose with MallocArray.
Essentially, the main task of an
AbstractArrayAllocator
is to allocate memory safely and return a pointer via the methodArrayAllocators.allocate
. We should be able to take that pointer and use it in aMallocArray
.One way of setting that up would be via
Base.unsafe_wrap
.The text was updated successfully, but these errors were encountered: