Exemplo n.º 1
0
            private ManualResetEventSlim finished;   // replace with ManualResetEvent if necessary

            public Job(ArraySegment <byte> data, ParallelCRC accumulator, Job previousJob)
            {
                this.data        = data;
                this.accumulator = accumulator;
                this.previousJob = previousJob;
                this.finished    = new ManualResetEventSlim(false);
            }
Exemplo n.º 2
0
        static public int Compute(byte[] data, int offset, int count)
        {
            var crc = new ParallelCRC();

            crc.Update(data, offset, count);
            return(crc.Value);
        }