public SimdScalarUnaryOpConvertTest__MoveMaskVector128SByte()
        {
            Succeeded = true;

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

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = TestLibrary.Generator.GetSByte();
            }
            _dataTable = new SimdScalarUnaryOpTest__DataTable <SByte>(_data, LargestVectorSize);
        }
Esempio n. 2
0
        public SimdScalarUnaryOpConvertTest__ConvertToInt32WithTruncationInt32Vector128Double()
        {
            Succeeded = true;

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

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = TestLibrary.Generator.GetDouble();
            }
            _dataTable = new SimdScalarUnaryOpTest__DataTable <Double>(_data, LargestVectorSize);
        }
Esempio n. 3
0
        public SimdScalarUnaryOpTest__ConvertToUInt32UInt32()
        {
            Succeeded = true;

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

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = TestLibrary.Generator.GetUInt32();
            }
            _dataTable = new SimdScalarUnaryOpTest__DataTable <UInt32>(_data, LargestVectorSize);
        }
Esempio n. 4
0
        public SimdScalarUnaryOpTest__ConvertToInt32Int32()
        {
            Succeeded = true;

            var random = new Random();

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

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