Exemplo n.º 1
0
        public BooleanUnaryOpTest__TestAllOnesInt32()
        {
            Succeeded = true;

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = TestLibrary.Generator.GetInt32();
            }
            Unsafe.CopyBlockUnaligned(ref Unsafe.As <Vector128 <Int32>, byte>(ref _fld), ref Unsafe.As <Int32, byte>(ref _data[0]), (uint)Unsafe.SizeOf <Vector128 <Int32> >());

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = TestLibrary.Generator.GetInt32();
            }
            _dataTable = new BooleanUnaryOpTest__DataTable <Int32>(_data, LargestVectorSize);
        }
Exemplo n.º 2
0
        public BooleanComparisonOpTest__TestAllOnesInt16()
        {
            Succeeded = true;

            var random = new Random();

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = (short)(random.Next(short.MinValue, short.MaxValue));
            }
            Unsafe.CopyBlockUnaligned(ref Unsafe.As <Vector128 <Int16>, byte>(ref _fld), ref Unsafe.As <Int16, byte>(ref _data[0]), (uint)Unsafe.SizeOf <Vector128 <Int16> >());

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = (short)(random.Next(short.MinValue, short.MaxValue));
            }
            _dataTable = new BooleanUnaryOpTest__DataTable <Int16>(_data, LargestVectorSize);
        }
Exemplo n.º 3
0
        public BooleanComparisonOpTest__TestAllOnesSByte()
        {
            Succeeded = true;

            var random = new Random();

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue));
            }
            Unsafe.CopyBlockUnaligned(ref Unsafe.As <Vector128 <SByte>, byte>(ref _fld), ref Unsafe.As <SByte, byte>(ref _data[0]), VectorSize);

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue));
            }
            _dataTable = new BooleanUnaryOpTest__DataTable <SByte>(_data, VectorSize);
        }
Exemplo n.º 4
0
        public BooleanUnaryOpTest__TestAllOnesUInt64()
        {
            Succeeded = true;

            var random = new Random();

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = (ulong)(random.Next(0, int.MaxValue));
            }
            Unsafe.CopyBlockUnaligned(ref Unsafe.As <Vector128 <UInt64>, byte>(ref _fld), ref Unsafe.As <UInt64, byte>(ref _data[0]), (uint)Unsafe.SizeOf <Vector128 <UInt64> >());

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = (ulong)(random.Next(0, int.MaxValue));
            }
            _dataTable = new BooleanUnaryOpTest__DataTable <UInt64>(_data, LargestVectorSize);
        }