|
Boost : |
From: Emile Cormier (emilecormier_at_[hidden])
Date: 2006-03-15 19:07:51
http://boost-consulting.com/vault/index.php?direction=0&order=&directory=bitfield&
Changes:
- Added an "initializer type" template parameter to facilitate the use
of specialized port types
- Added static get / set which does the same as operator T / operator=,
respectively, without the need to instantiate a Bitfield.
- Turned my previous "Port" example into an actual working mechanism to
access memory-mapped I/O ports. I don't intend to include Port in any
formal Boost proposals. I just want a concrete working example that
demonstates how Bitfield could make use of the proposed <iohw.h> port
types in the "Technical Report on C++ Performance".
I haven't yet had the chance to analyze the performance of my code
compared to hand-written bit manipulations. That will be my next focus.
So far, I haven't received any feedback on my bitfield proposal. Please
let me know if I'm on the right path, if there's a better way of doing
this, or if this is a hopeless cause. :) If it's the latter, I can
always post this stuff on The Code Project for those who may want to use
it or come up with a better solution. In the end, what I want is a
standard(-ish) way of implementing portable bitfields in C++.
The lack of interest may be due to what I think is a relatively low
number of programmers who deal in "bit twiddling" and, at the same time,
make use of Boost. I assume that most bit twiddling for hardware I/O is
still done in C.
-- Emile Cormier emilecormier_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk