support the development of applications that process
large matrices stored in external memory. This library
uses some special data structures and cache memory
management algorithms to reduce the number of I/Os.
The basic purpose is to allow that an application orig-
inally designed for internal memory processing can
be easily adapted for external memory. The library
provides an interface for external memory access that
is similar to the traditional internal matrices access.
An interesting strategy included in this library was the
use of data compression to reduce the transference be-
tween the internal and external memories.
The TiledMatrix was implemented and tested in
some applications that require intensive matrix pro-
cessing such as: computing the transposed matrix and
the computation of viewshed and flow accumulation
on terrains represented by elevation matrix. These ap-
plication were implemented in two versions: one us-
ing TiledMatrix and another one using the Segment li-
brary. They were executed on many datasets with dif-
ferent sizes and, according these tests, all applications
ran faster using TiledMatrix than Segment. In aver-
age, they were 7 times faster with TiledMatrix and, in
some cases, more than 18 times faster. Also, the tests
showed that the compression usage improved the ap-
plication performance in 50% and, in some situations,
this performance improvement was almost 200%.
The TiledMatrix source code is available in
www.dpi.ufv.br/˜marcus/TiledMatrix
As a future work, we intend to evaluate the Tiled-
Matrix in some other applications and to develop
strategies to define the block size according to the al-
gorithm memory access pattern and the memory size.
ACKNOWLEDGEMENTS
This research was supported by CNPq, CAPES,
FAPEMIG and Gapso.
REFERENCES
Aggarwal, A. and Vitter, J. S. (1988). The input/output
complexity of sorting and related problems. Commun.
ACM, 31(9):1116–1127.
Arge, L., Toma, L., and Vitter, J. S. (2001). I/o-efficient
algorithms for problems on grid-based terrains. J. Exp.
Algorithmics, 6.
Chandra, D., Guo, F., Kim, S., and Solihin, Y. (2005). Pre-
dicting inter-thread cache contention on a chip multi-
processor architecture. In Proceedings of the HPCA
’05, pages 340–351, Washington, DC, USA. IEEE
Computer Society.
Crauser, A. and Mehlhorn, K. (1999). Leda-sm : Extending
leda to secondary memory. In Vitter, J. S. and Zaro-
liagis, C. D., editors, Algorithm engineering (WAE-
99) : 3rd International Workshop, WAE’99, volume
1668 of Lecture Notes in Computer Science, pages
228–242, London, UK. Springer.
Dementiev, R., Kettner, L., and Sanders, P. (2005).
Stxxl : Standard template library for xxl data sets.
http://stxxl.sourceforge.net/. Acessed July 15, 2012.
Ferreira, C. R., Magalh
˜
aes, S. V. G., Andrade, M. V. A.,
Franklin, W. R., and Pompermayer, A. M. (2012).
More efficient terrain viewshed computation on mas-
sive datasets using external memory. In ACM SIGSPA-
TIAL GIS 2012, Redondo Beach, CA.
Fishman, J., Haverkort, H. J., and Toma, L. (2009). Im-
proved visibility computation on massive grid terrains.
In Wolfson, O., Agrawal, D., and Lu, C.-T., editors,
GIS, pages 121–130. ACM.
Franklin, W. R. and Ray, C. (1994). Higher isn
´
t neces-
sarily better – visibility algorithms and experiments.
6th Symposium on Spatial Data Handling, Edinburgh,
Scotland.
GRASS, D. T. (2011). Geographic resources anal-
ysis support system (GRASS GIS) software.
http://grass.osgeo.org. Accessed July 15, 2012.
Grund, D. and Reineke, J. (2009). Abstract interpretation
of FIFO replacement. In Palsberg, J. and Su, Z., ed-
itors, Static Analysis, 16th International Symposium,
SAS 2009, volume 5673 of LNCS, pages 120–136.
Springer.
Guo, F. and Solihin, Y. (2006). An analytical model for
cache replacement policy performance. pages 228–
239. SIGMETRICS Perform.Eval. Rev.
Haverkort, H., ], L., and Zhuang, Y. (2007). Computing vis-
ibility on terrains in external memory. In Proceedings
of the Ninth ALENEX/ANALCO.
Haverkort, H. and Janssen, J. (2012). Simple i/o-efficient
flow accumulation on grid terrains. CoRR - Compting
Research Repository, abs/1211.1857.
Lz4 (2012). Extremely fast compression algorithm.
http://code.google.com/p/lz4/. Accessed June 1, 2012.
Magalh
˜
aes, S. V. G., Andrade, M. V. A., Franklin, W. R.,
and Pena, G. C. (2012). A new method for comput-
ing the drainage network based on raising the level
of an ocean surrounding the terrain. 15th AGILE In-
ternational Conference on Geographical Information
Science, pages 391–407.
Mehlhorn, K. and N
¨
aher, S. (1995). Leda: a platform for
combinatorial and geometric computing. Commun.
ACM, 38(1):96–102.
Meyer, U. and Zeh, N. (2012). I/o-efficient shortest
path algorithms for undirected graphs with random or
bounded edge lengths. ACM Transactions on Algo-
rithms, 8(3):22.
Tarboton, D. (1997). A new method for the determination
of flow directions and contributing areas in grid digital
elevation models. Water Resources Research, 33:309–
319.
ICEIS2013-15thInternationalConferenceonEnterpriseInformationSystems
160