view tango/tango/core/BitManip.di @ 163:a8cd9bc1021a trunk

[svn r179] lots and lots of fixes, much more of tango now compiles/works.
author lindquist
date Mon, 05 May 2008 07:36:29 +0200
parents 1700239cab2e
children f5ca6bbbf1d7
line wrap: on
line source

// D import file generated from 'core/BitManip.d'
module tango.core.BitManip;
version (DDoc)
{
    int bsf(uint v);
    int bsr(uint v);
    int bt(uint* p, uint bitnum);
    int btc(uint* p, uint bitnum);
    int btr(uint* p, uint bitnum);
    int bts(uint* p, uint bitnum);
    uint bswap(uint v);
    ubyte inp(uint port_address);
    ushort inpw(uint port_address);
    uint inpl(uint port_address);
    ubyte outp(uint port_address, ubyte value);
    ushort outpw(uint port_address, ushort value);
    uint outpl(uint port_address, uint value);
}
else
{
    public
{
    import std.intrinsic;
}
}
int popcnt(uint x)
{
x = x - (x >> 1 & 1431655765);
x = ((x & -858993460u) >> 2) + (x & 858993459);
x += x >> 4;
x &= 252645135;
x += x >> 8;
x &= 16711935;
x += x >> 16;
x &= 65535;
return x;
}
debug (UnitTest)
{
    }
uint bitswap(uint x);
debug (UnitTest)
{
    }