Пример #1
0
        public ImmTernaryOpTest__ShiftRightAndInsert_Vector128_Int32()
        {
            Succeeded = true;

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

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data1[i] = TestLibrary.Generator.GetInt32();
            }
            for (var i = 0; i < Op2ElementCount; i++)
            {
                _data2[i] = TestLibrary.Generator.GetInt32();
            }
            _fldImm    = Helpers.Clamp(sizeof(Int32), TestLibrary.Generator.GetByte(), true);
            _dataTable = new DataTable(_data1, _data2, _fldImm, new Int32[RetElementCount], LargestVectorSize);
        }
        public ImmTernaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt64()
        {
            Succeeded = true;

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data1[i] = TestLibrary.Generator.GetUInt64();
            }
            Unsafe.CopyBlockUnaligned(ref Unsafe.As <Vector128 <UInt64>, byte>(ref _fld1), ref Unsafe.As <UInt64, byte>(ref _data1[0]), (uint)Unsafe.SizeOf <Vector128 <UInt64> >());
            for (var i = 0; i < Op2ElementCount; i++)
            {
                _data2[i] = TestLibrary.Generator.GetUInt64();
            }
            Unsafe.CopyBlockUnaligned(ref Unsafe.As <Vector128 <UInt64>, byte>(ref _fld2), ref Unsafe.As <UInt64, byte>(ref _data2[0]), (uint)Unsafe.SizeOf <Vector128 <UInt64> >());

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data1[i] = TestLibrary.Generator.GetUInt64();
            }
            for (var i = 0; i < Op2ElementCount; i++)
            {
                _data2[i] = TestLibrary.Generator.GetUInt64();
            }
            _fldImm    = Helpers.Clamp(sizeof(UInt64), TestLibrary.Generator.GetByte(), false);
            _dataTable = new DataTable(_data1, _data2, _fldImm, new UInt64[RetElementCount], LargestVectorSize);
        }
Пример #3
0
 static ImmTernaryOpTest__ShiftRightAndInsert_Vector128_Int32()
 {
     for (var i = 0; i < Op1ElementCount; i++)
     {
         _data1[i] = TestLibrary.Generator.GetInt32();
     }
     Unsafe.CopyBlockUnaligned(ref Unsafe.As <Vector128 <Int32>, byte>(ref _clsVar1), ref Unsafe.As <Int32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf <Vector128 <Int32> >());
     for (var i = 0; i < Op2ElementCount; i++)
     {
         _data2[i] = TestLibrary.Generator.GetInt32();
     }
     Unsafe.CopyBlockUnaligned(ref Unsafe.As <Vector128 <Int32>, byte>(ref _clsVar2), ref Unsafe.As <Int32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf <Vector128 <Int32> >());
     _clsImm = Helpers.Clamp(sizeof(Int32), TestLibrary.Generator.GetByte(), true);
 }
 static ImmTernaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt64()
 {
     for (var i = 0; i < Op1ElementCount; i++)
     {
         _data1[i] = TestLibrary.Generator.GetUInt64();
     }
     Unsafe.CopyBlockUnaligned(ref Unsafe.As <Vector128 <UInt64>, byte>(ref _clsVar1), ref Unsafe.As <UInt64, byte>(ref _data1[0]), (uint)Unsafe.SizeOf <Vector128 <UInt64> >());
     for (var i = 0; i < Op2ElementCount; i++)
     {
         _data2[i] = TestLibrary.Generator.GetUInt64();
     }
     Unsafe.CopyBlockUnaligned(ref Unsafe.As <Vector128 <UInt64>, byte>(ref _clsVar2), ref Unsafe.As <UInt64, byte>(ref _data2[0]), (uint)Unsafe.SizeOf <Vector128 <UInt64> >());
     _clsImm = Helpers.Clamp(sizeof(UInt64), TestLibrary.Generator.GetByte(), false);
 }
Пример #5
0
            public static TestStruct Create()
            {
                var testStruct = new TestStruct();

                for (var i = 0; i < Op1ElementCount; i++)
                {
                    _data1[i] = TestLibrary.Generator.GetInt32();
                }
                Unsafe.CopyBlockUnaligned(ref Unsafe.As <Vector128 <Int32>, byte>(ref testStruct._fld1), ref Unsafe.As <Int32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf <Vector128 <Int32> >());
                for (var i = 0; i < Op2ElementCount; i++)
                {
                    _data2[i] = TestLibrary.Generator.GetInt32();
                }
                Unsafe.CopyBlockUnaligned(ref Unsafe.As <Vector128 <Int32>, byte>(ref testStruct._fld2), ref Unsafe.As <Int32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf <Vector128 <Int32> >());
                testStruct._fldImm = Helpers.Clamp(sizeof(Int32), TestLibrary.Generator.GetByte(), true);

                return(testStruct);
            }