Esempio n. 1
0
        public static Span <BitVector8> partition(BitVector32 src, Span <BitVector8> dst)
        {
            var bs = dst.AsBytes();

            BitParts.part32x8(src, bs);
            return(dst);
        }
Esempio n. 2
0
        public void bitpart_32x8_bench()
        {
            var         opcount = RoundCount * CycleCount;
            var         sw      = stopwatch(false);
            var         opname  = $"bitpart_32x8";
            var         count   = (int)Part32x8.Count;
            Span <byte> dst     = stackalloc byte[count];

            for (var k = 0; k < opcount; k++)
            {
                var x = Random.Next <uint>();
                sw.Start();
                BitParts.part32x8(x, dst);
                sw.Stop();
            }

            Collect((opcount, sw, opname));
        }