How to get the NDArray in the C++ files

I want to get the value of variables with the NDArray data structure in the C++ files, such as the recv_buf in PullImpl() function in kvstore_dist.h (shown in the following figure). 39 . Anyone gives me some suggestions? Thank your.

To copy a NDArray you can use the SyncCopyToCPU() function see the docs here: https://mxnet.incubator.apache.org/versions/master/doxygen/classmxnet_1_1cpp_1_1NDArray.html#a84bdfbe193ccadc66f3416323467d3ae

Thank you, Thomas. Got it.

If I want to print the NDArray datatype on the screen in the C++ files, what should I do? The python implementation is easy, but I have no idea on the C++ implementation.