Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2006-03-15 21:05:22


"Emile Cormier" wrote:

[...]

> - 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 havent heard much more about <iohw.h> for a while. It might be worth trying to
find out what happened about it. It seems to have died

> 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.

Not quite true as there has been some feedback in the form of downloads from the
vault, which can help to guage interest in the field.
(Note I havent looked at latest version.)
My response after downloading Bitfield2.zip was to be disappointed that there
was no documentation provided. A html page of rationale for what you are trying
to achieve would give those wanting to provide feedback somewhere to start.
My own view on Bitfield2 version is that the following syntax is not very
appealing (from Test.cpp)

 (high(r)) = 0x12;

I had a quick look and came up with a couple of alternatives.

1) set_field<high>()(r,0x12);
2) set_field<high>(r,0x12);
 3) *high(r) =12;

(I think personally 2 is best as its just a function and does the job without
trying to be too clever).

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.

I would guess from the number of downloads and the lack of further feedback that
there is interest in the idea, but that your implementation has failed to spark
interest (That is of course just 1 persons unscientific opinion) I would guess
that documentation would help, but also finding the right interface which
(witthout looking at the latest version) I dont think you have found yet.

As with all these things its partly about whether you are prepared to push it
too ;-)

regards
Andy Little


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk