Ejemplo n.º 1
0
        public SimpleScalarUnaryOpTest__SetAllVector128SByte()
        {
            Succeeded = true;

            _fld       = (sbyte)(Random.Next(sbyte.MinValue, sbyte.MaxValue));
            _dataTable = new SimpleScalarUnaryOpTest__DataTable <SByte>(new SByte[RetElementCount], LargestVectorSize);
        }
Ejemplo n.º 2
0
        public SimpleScalarUnaryOpTest__SetAllVector128Double()
        {
            Succeeded = true;

            _fld       = Random.NextDouble();
            _dataTable = new SimpleScalarUnaryOpTest__DataTable <Double>(new Double[RetElementCount], LargestVectorSize);
        }
Ejemplo n.º 3
0
        public SimpleScalarUnaryOpTest__SetAllVector128Int64()
        {
            Succeeded = true;

            _fld       = (long)(Random.Next(int.MinValue, int.MaxValue));
            _dataTable = new SimpleScalarUnaryOpTest__DataTable <Int64>(new Int64[RetElementCount], LargestVectorSize);
        }
Ejemplo n.º 4
0
        public SimpleScalarUnaryOpTest__SetAllVector128UInt32()
        {
            Succeeded = true;

            _fld       = (uint)(Random.Next(0, int.MaxValue));
            _dataTable = new SimpleScalarUnaryOpTest__DataTable <UInt32>(new UInt32[RetElementCount], LargestVectorSize);
        }
Ejemplo n.º 5
0
        public SimpleScalarUnaryOpTest__SetAllVector128Int16()
        {
            Succeeded = true;

            _fld       = (short)(Random.Next(short.MinValue, short.MaxValue));
            _dataTable = new SimpleScalarUnaryOpTest__DataTable <Int16>(new Int16[RetElementCount], LargestVectorSize);
        }
Ejemplo n.º 6
0
        public SimpleScalarUnaryOpTest__SetAllVector128Int16()
        {
            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 <Int16, byte>(ref _fld), ref Unsafe.As <Int16, byte>(ref _data[0]), (uint)Marshal.SizeOf <Int16>());

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = (short)(random.Next(short.MinValue, short.MaxValue));
            }

            _dataTable = new SimpleScalarUnaryOpTest__DataTable <Int16, Int16>(_data, new Int16[RetElementCount], VectorSize);
        }
Ejemplo n.º 7
0
        public SimpleScalarUnaryOpTest__SetAllVector128Double()
        {
            Succeeded = true;

            var random = new Random();

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = random.NextDouble();
            }

            Unsafe.CopyBlockUnaligned(ref Unsafe.As <Double, byte>(ref _fld), ref Unsafe.As <Double, byte>(ref _data[0]), (uint)Marshal.SizeOf <Double>());

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = random.NextDouble();
            }

            _dataTable = new SimpleScalarUnaryOpTest__DataTable <Double, Double>(_data, new Double[RetElementCount], VectorSize);
        }
Ejemplo n.º 8
0
        public SimpleScalarUnaryOpTest__SetAllVector128UInt64()
        {
            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 <UInt64, byte>(ref _fld), ref Unsafe.As <UInt64, byte>(ref _data[0]), (uint)Marshal.SizeOf <UInt64>());

            for (var i = 0; i < Op1ElementCount; i++)
            {
                _data[i] = (ulong)(random.Next(0, int.MaxValue));
            }

            _dataTable = new SimpleScalarUnaryOpTest__DataTable <UInt64, UInt64>(_data, new UInt64[RetElementCount], VectorSize);
        }