From: Kevin Wheatley (hxpro_at_[hidden])
Date: 2005-01-27 08:23:30
David Abrahams wrote:
> The project site for the MTL rewrite is now live.
So having taken some time to further read some of the design aspects
of MTL, I'd say there is a degree of overlap between it and the
requirements for a 2D image processing foundation. I did notice that
some of the optimisations steps could be considered over the top for
image processing as simpler options are available in that context.
In particular the idea of copying memory about to save cache line
aliasing is potentially inefficient vs simply adding an additional
padding to the row container (in dense memory layouts). I'm sure
something similar could be used for matrix uses too as you'd only need
to pad an appropriate amount to ensure your cache blocked region was
not going to alias at all (ensuring each blocked row starts on a cache
line boundary at the same time is a good idea).
This leaves you with SIMD optimised alignment too.
It may also be worth considering "multiplexed" matrices too. By this I
mean combining the elements from multiple matrices (say M1-M4) and
aranging them thus:
M1(0,0) M2(0,0) M3(0,0) M4(0,0) M1(0,1) M2(0,1) ...
This would give you a data layout that is suitable for GPU uploading
and processing (see http://www.gpgpu.org/ in general), as an example
http://tinyurl.com/4bhpc describes some peformance improvements gained
from SIMD operation in a simple 4 sets of calculation implementation
rather than implementing the matrix operations in SIMD for a single
matrix. i know of similar gains in CPU based situations too.
More conventially these are known as RGBA on images, for images there
are other adapters that would be rquired, like dealing with planar
Does anybody else think that such a usage should be catered for in a
new MTL?? Before anybody asks, yes I know about VIGRA, it just didn't
come across to me as having goals in line with my experience has
needed, but the MTL docs I read did.
-- | Kevin Wheatley, Cinesite (Europe) Ltd | Nobody thinks this | | Senior Technology | My employer for certain | | And Network Systems Architect | Not even myself |