Yes, Nsight Eclipse can write C ++ code. To rephrase your question, it can also display C ++ host code (CPU). By default, it only processes GPU code. CPU profiling is a much more manual task; it will not automatically perform the functions of profiles.
You need to use NVTX. For instance:
#include "nvToolsExt.h" nvtxNameOsThread(0,"InputVideo"); nvtxRangePush(__FUNCTION__);
Build with -lnvToolsExt -L / usr / local / cuda / lib64
The path to libnvToolsExt.so will be different for everyone. NVTX comes with the CUDA Toolkit.
The CUDA blog has a post about this.
source share