-
I would like to clarification on how argument setup works. Consider the following kernel:
and I will be passing the following pointers:
We setup arguments using |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Yes, the clang creates an array of pointers and each of them points to the value of the corresponding argument. Args[0] = a pointer to the value of the first argument, Arg[1] = pointer to the value of next argument, etc.
The size is two, but the clang created array does not hold
Where and when are you trying to access the argument values? Could the pointers of the |
Beta Was this translation helpful? Give feedback.
-
I got the kernel launch stub a bit wrong. More accurately it looks like this:
Yes, they can be dereferenced, but until to the point the caller returns from the stub, and you do get to access the arguments of the kernel invocation in the state they are passed to the invocation. I’m starting to see that I misread the original “It should be of size 2 and each value should correspond to |
Beta Was this translation helpful? Give feedback.
I got the kernel launch stub a bit wrong. More accurately it looks like this:
Yes, they can be dereferenced, but until to the point the caller returns from the stub, and you do get to access the arguments of the kernel invocation in the state they are passed to the invocation.
I’m starting to see that I misread the original “…