Subject: [ublas] Matrix for_each iteration
From: Paul Abbazia (pabba86_at_[hidden])
Date: 2008-12-24 06:12:58
I'm trying to execute parallel operations on a ublas matrix. I'm assuming
the ublas libraries are already written to take advantage of
multi-threading, but if not I'll have to rethink my approach.
I would like to execute over both dimensions of the matrix. I have attempted
to do this using both BOOST_FOREACH from boost::foreach and for_each from
boost::lambda::lambda. Ideally, I would also have access to the position of
the current element so I can run comparisions to adjacent elements.
boost::lambda::lambda looks really powerful, but I can't really wrap my head
around it. I'm not even sure if it's suited for what I'm trying to do.
Ultimately, I'm trying to do a threaded implementation of some image
processing algorithms (erosion, shape matching, etc) and ublas looked like a
good, high-level approach.