I have this struct:
[typedef struct Nodes
I filled it with variables.
In addition I created a pointers of “Node” one for the CPU and one for the GPU.
[m1 = (Node*)malloc(3sizeof(Node) );]
[cudaMalloc( (void**)&dev_m1, 3sizeof(Node) );]
[cudaMemcpy( dev_m1, m1, 3*sizeof(Node), cudaMemcpyHostToDevice );]
I use the function:
[global void TreeSearch(Node *tree , int *p , int *size , int *res)]
All variables are copied properly except for the variable “tree”.
Does anyone know what the problem is and how to solve it.