【发布时间】:2011-11-06 17:04:25
【问题描述】:
我有一个使用指向struct 的指针的C 代码。我正在尝试弄清楚如何将其传递给 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....
}
但我不知道如何通过它。 有什么想法吗?
【问题讨论】: