Kernel Function

I’m a student trying to get some practice with CUDA. I’m trying to update a code that is a linked list to run on the GPU using cuda. Can I pass in a struct into my kernel? If not, how could I use an array on my kernel to update each element depending on the element before it. I’m a beginner a snippet of coding will help and if you could possibly point to some good resources I would greatly appreciate it.

Thanks in advance

To make use of the awesum power of a GPU you want a task involving thousands or even millions of similar objects and each needing to have a similar operation applied to them, and without heavy dependance on the order that those thousands (or millions) of objects are processed in. Something that in total would take several seconds to several minutes (or longer) to run on a CPU.

A linked list isn’t a great choice if this is just for practice as most operations on a linked list either really only involve one link ( e.g. adding or removing a link ) or are heavily dependant on order of execution ( e.g. following down the linked list to find a particular node)
A linked-list could certainly be implemented on a GPU, but I would only do it if it was a very small part of a much larger task that was far more suited to the GPU architecture. Or if I had something involving hundreds of linked lists that all needed similar operations at the same time.
Besides a single thread on a CPU can process millions of linked list operations a second.

PS I love the n-body example in the SDK