How can I upload a tree?

Greetings!

I wonder how can I upload a complex data structure (say a kd-tree) onto global memory? What I know are the number of nodes, and a pointer to the root node.

Thank you.