hello.
I am wondering about allocation pointers.
I already read a few allocation pointer issue things.
1.
https://stackoverflow.com/questions/30082991/memory-allocation-on-gpu-for-dynamic-array-of-structs
2.
https://stackoverflow.com/questions/16539085/cuda-dynamic-array-array-malloc-and-copy/16545272#16545272
3.
https://stackoverflow.com/questions/23609770/cuda-double-pointer-memory-copy
But these are not same with my code issue.
Because my pointers point same structure.
typedef struct vertex {
unsigned int vertex_id;
float pagerank;
float pagerank_next;
unsigned int n_successors;
vertex **successors;
};
For example, my structure name is vertex.
Firstly, allocation vertex structure to the number of nodes (If there are 100 nodes, vertex structure allocates 100).
Secondly, allocation double pointer (these pointers point vertex structure which allocated in first step).
This structure means adjacency list. I understand data structure.
But when I change the code there is an error… (allocation issue)
the original code uses unified memory allocation. but I want to use cudaMalloc.
Please help me.