-
Notifications
You must be signed in to change notification settings - Fork 41
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
Use with CUDAnative #86
Comments
If I add CUDAnative.cudaconvert(s::StructArray) = replace_storage(cudaconvert, s) I get further
|
I am guessing that |
Okay, with lcw@efb75eb I made
|
I don't think s = StructArray(a = rand(100), b = rand(100)) Replacing
Not sure if there is an easy solution as StructArrays can be nested so |
Thanks for taking a look! @inbounds getproperty(dest.lowertriangle.data, 1)[i] = getproperty(src.lowertriangle.data, 1)[i]
@inbounds getproperty(dest.lowertriangle.data, 2)[i] = getproperty(src.lowertriangle.data, 2)[i]
@inbounds getproperty(dest.lowertriangle.data, 3)[i] = getproperty(src.lowertriangle.data, 3)[i] for @inbounds dest[i] = src[i] directly without recursion I think we would be set. To this end I have written the code https://github.com/lcw/Heptapus.jl/blob/417ec8a6bd611c877c27c90d297cef5db32c17e8/examples/structarrays/lutils.jl p.s. I moved the tuples out of the type domain because it was making my head hurt. But we should be able to generate the array of properties without this. Do you have something in |
Could you try and make a pull request out of your code? That way it'd be easier to see what changes this requires. One thing to check is how the broadcast machinery is implemented for |
Sure, see #87. The last commit is not super clean but it seems to work. More tested should probably be done before it is merged. |
In the end, your suggestion worked. I'm changing |
In the end, your suggestion worked. I'm changing `foreachfield` to do
the recursion at compile time in #141 and it fixed your example.
Awesome! Thanks for looking into it.
|
Thanks for the cool package! This package seems to work as expected on the CPU and now I am trying to push things to the GPU.
Following the example in the README, I tried to use a
StructArray
in a simple CUDAnative copy kernel, seeThis resulted in the following error message
Is there a way to modify my example to be able to use the
StructArray
in CUDAnative? Thanks for any pointers you may have.The text was updated successfully, but these errors were encountered: