static bool findBit(mainType v) { UInt32 bitval = (( UInt32 )v.GetHashCode()) & (SEARCHBITSETSIZE - 1); UInt32 b = ( UInt32 )1 << (int)(bitval & ( UInt32 )0x1F); UInt32 index = bitval >> 5; return((bitseta[index] & b) > 0); }
static void setBit(mainType v) { UInt32 bitval = (( UInt32 )v.GetHashCode()) & (SEARCHBITSETSIZE - 1); UInt32 b = ( UInt32 )1 << ( int )(bitval & ( UInt32 )0x1F); UInt32 index = bitval >> 5; bitseta[index] = bitseta[index] | b; }
internal Value(System.Decimal value, Parameterization p = Parameterization.Value) : base(value) { Original = value; _clrType = typeof(System.Decimal); _hashCode = GetCrossTypeHashCode(_clrType, value.GetHashCode()); Build = (buildContext, buildArgs) => { return((p != Parameterization.None) ? (value.Parameterize(buildContext, p) ?? Mapping.BuildCast(value)) : Mapping.BuildCast(value)); }; }
static void setBit(mainType fivePower, UInt32 number) { UInt32 bitval = (( UInt32 )fivePower.GetHashCode()) & 0x0000FFFF; UInt32 b = ( UInt32 )1 << ( int )(bitval & ( UInt32 )0x1F); if (setMap[bitval] == null) { setMap[bitval] = new List <CompValue>(); } setMap[bitval].Add(new CompValue(fivePower, number)); UInt32 index = bitval >> 5; bitseta[index] = bitseta[index] | b; }
static UInt32 findBit(mainType v) { UInt32 bitval = (( UInt32 )v.GetHashCode()) & 0x0000FFFF; UInt32 b = ( UInt32 )1 << (int)(bitval & ( UInt32 )0x1F); UInt32 index = bitval >> 5; if ((bitseta[index] & b) > 0) { foreach (var itm in setMap[bitval]) { if (itm.fivePower == v) { return(itm.number); } } } return(0); }