示例#1
0
        public void bmm_64x64_prealloc_bench()
        {
            var opcount = RoundCount * CycleCount;
            var last    = BitMatrix64.Zero;
            var dst     = BitMatrix64.Alloc();

            var sw = stopwatch(false);

            for (var i = 0; i < opcount; i++)
            {
                var m1 = Random.BitMatrix64();
                var m2 = Random.BitMatrix64();
                sw.Start();
                last = BitMatrixOps.Mul(m1, m2, ref dst);
                sw.Stop();
            }

            Collect((opcount, snapshot(sw), "bmm_64x64_prealloc"));
        }
示例#2
0
        public void flip64()
        {
            var x   = Random.BitMatrix64();
            var y   = x.Replicate();
            var xff = -(-x);

            Claim.yea(xff == y);

            var c = Random.BitMatrix64();
            var a = new ulong[64];

            for (var i = 0; i < 64; i++)
            {
                a[i] = ~c.RowData(i);
            }
            var b = BitMatrix64.From(a);

            Claim.yea(b == -c);
        }