Re: Re: [Portable-clx] bit-bash-copy gone
Nathan Froyd <[email protected]> Sun, 3 Apr 2005 07:44:37 -0500
| Newsgroups | gmane.lisp.steel-bank.devel,gmane.lisp.clx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Apr 03, 2005 at 01:27:25AM +0300, Nikodemus Siivola wrote: > On Sat, 2 Apr 2005, Christophe Rhodes wrote: > > >Nikodemus Siivola <[email protected]> writes: > > > >>- (sb-kernel:bit-bash-copy sdata src-idx ddata dest-idx width))))) > >>+ (sb-kernel:ub8-bash-copy sdata src-idx ddata dest-idx width))))) > > > >Are you sure that ub8-bash-copy is the right one? Without having > > Though on second thought, _if_ the old bit-bash-copy was built on memcpy, > then presumably it dealt with octets? (Forwarded to sbcl-devel so that > nfroyd can comment on this, maybe.) Hmmm, this change is causing a lot of problems. :) If you used BIT-BASH-COPY for data movement, you probably want to use UB1-BASH-COPY, since that's a drop-in replacement for BIT-BASH-COPY. If, however, you know the width of the data you're copying (e.g. in SB-MD5, we are always copying bytes), then a different UBFOO-BASH-COPY function makes more sense and will require less massaging of the arguments. Changing CLX to use the new functions is fun because BIT-BASH-COPY is used in several different places without regard to the underlying width of the elements being copied. The Right Thing would be to switch on the width of the arguments and use the appropriate copying function. Incidentally, BIT-BASH-COPY was not built on top of memcpy; you're probably thinking of %BYTE-BLT, which was introduced because BIT-BASH-COPY has issues with the number of bits that can be copied at once (although after modifying the code, I think that limit is artificial). Now that we have copy functions for multiple widths (in particular, byte-sized widths), this limit should no longer be an issue and %BYTE-BLT could be removed. -- Nathan | From Man's effeminate slackness it begins. --Paradise Lost The last good thing written in C was Franz Schubert's Symphony Number 9. --Erwin Dieterich ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click