vendredi 27 février 2015

Allocating a graph using adjacency list in cuda?


I want to allocate a graph using adjacency list i.e array of 'V' pointers each pointing to an array which will have the adjacent vertex (which would be unequal) so



unsigned **d_ptr;
cudaMalloc(&d_ptr, sizeof(unsigned *)*Count);
for(int i=0;i<Count;i++)
{
cudaMalloc(&temp, sizeof(unsigned)*outdegree(i));
}


I can copy the temp pointer to d_ptr[i] but is there a better way to do this?




Aucun commentaire:

Enregistrer un commentaire