Convert cuda ndarray to void** #973
Unanswered
johnviljoen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi - I have a 2D ndarray that I need to convert into a vector of pointers, which each point to a row of the ndarray. My problems lie in the fact that the ndarrays seem to only be metadata until the python runs, so don't seem to want to give me a memory address beyond the first one at ndarray.data(). I have tried using strides like this:
This seems to not work, however I am not sure why. I have also tried to use numpy indexing like ndarray(i); to get a row of a 2D matrix, but it seems I can only retrieve a single element with two indices: ndarray(i, i);
What should I do in this situation? I would rather not pass every row from python separately. Also I am very much a c++ beginner so sorry if I am making silly mistakes here!
Beta Was this translation helpful? Give feedback.
All reactions