From: Eric Niebler (eric_at_[hidden])
Date: 2006-10-05 23:47:47
The idea of segmented fusion sequences and algorithms has been discussed
here several times, and Joel has made some reference to some earlier
work I did in this area. I had done some tests at the time that
suggested that a segmented sequences and algorithms could significantly
outperform nonsegmented variants Fusion currently uses. Per Joel's
suggestion, I went ahead and checked my code into CVS HEAD. All
segmented-specific code is quarantined in separate ext_ directories.
What I've just checked in:
for_each_s algorithm that works with segmented sequences
find_if_s algorithm that works with segmented sequences, and
returns segmented iterators
Experimental segmented fusion tree
The segments() intrinsic for getting a segmented sequences'
Makes a value v appear as a tuple<V,V,V...>(v,v,v...)
A generic segmented iterator that remembers its place in the
traversal of any segmented sequence.
Makes iterator_range of segmented_iterators a segmented range.
The is_segmented trait.
I've also checked in some basic tests for this stuff, and marked them
"explicit" in the test Jamfile so they won't interfere with regular
I have not changed *any* standard Fusion files. If we decide to rip this
out, it's as simple as nuking all the ext_ directories.
Caveat: this stuff is half-baked. Use at your own risk. The hope is that
by checking this in, others will take an interest and help flesh the
implementation out, so dig in!
-- Eric Niebler Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk