Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^7: Bidirectional lookup algorithm? (Judy)

by BrowserUk (Patriarch)
on Jan 12, 2015 at 13:32 UTC ( [id://1112945]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Bidirectional lookup algorithm? (Judy)
in thread Bidirectional lookup algorithm? (Updated: further info.)

I now see only warnings in relation to left shifts. Anyway, there's obviously something else that's not the right size. (Disappointing that the Judy developers haven't ported this correctly.)

There is a heads-up in the Judy sources that might explain this.

cJU_POP0MASK(7) is defined (in JudyCommon/JudyPrivateBranch.h:129) as:

#define cJU_POP0MASK(cPopBytes) JU_LEASTBYTESMASK(cPopBytes)

Which is defined (in:JudyCommon/JudyPrivate.h:413) as:

#define JU_LEASTBYTESMASK(BYTES) \ ((0x100UL << (cJU_BITSPERBYTE * ((BYTES) - 1))) - 1)

And that is preceded by this comment:

// Note:  This macro has been problematic in the past to get right and to make
// portable.  Its not OK on all systems to shift by the full word size.  This
// macro should allow shifting by 1..N bytes, where N is the word size, but
// should produce a compiler warning if the macro is called with Bytes == 0.

Which may explain the continued warnings.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1112945]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2026-03-07 09:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.