我有C代码,它使用指向struct
的指针。我试图找出如何将它传递给cuda而没有太多的运气。将基于指针的结构传递给cuda
我
typedef struct node { /* describes a tip species or an ancestor */
struct node *next, *back; /* pointers to nodes */
etc...
} node;
然后
typedef node **pointptr;
static pointptr treenode;
在我的代码我经历了所有这些迭代,而我试图找出如何将它们传递给内核,所以我可以执行以下操作:
for (i = 1; i <= nonodes; i++) {
treenode[i - 1]->back = NULL;
etc....
}
但我想不出如何通过它。 任何想法?