These are the source codes for calculating Total Viewshed on very large high resolution DEM.
The complete description of the Total Viewshed algorithm can be found in this paper:
Efficient data structure and highly scalable algorithm for total-viewshed computation. S Tabik, AR Cervilla, E Zapata, LF Romero. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 8(1), 304-310, 2015.