public DenseVectorAdd(int size, int rounds)
        {
            _rounds = rounds;

            _b = Vector <double> .Build.Random(size);

            _a = Vector <double> .Build.Random(size);

            _managed.InitializeVerify();
            Control.LinearAlgebraProvider = _managed;

#if NATIVE
            _mkl.InitializeVerify();
#endif
        }
        public DenseMatrixProduct(int size, int rounds)
        {
            _rounds = rounds;

            _b = Matrix <double> .Build.Random(size, size);

            _a = Matrix <double> .Build.Random(size, size);

            _managed.InitializeVerify();
            _safeProvider.InitializeVerify();
            _unsafeProvider.InitializeVerify();
            _experimentalProvider.InitializeVerify();

#if NATIVEMKL
            _mkl.InitializeVerify();
#endif
        }
        public DenseMatrixProduct()
        {
            foreach (var m in new[] {8, 64, 128})
            foreach (var n in new[] {8, 64, 128})
            {
                var key = Key(m, n);
                _data[key] = Matrix<double>.Build.Random(m, n);
            }

            Control.NativeProviderPath = @"..\..\..\..\out\MKL\Windows\";
            _mathnetMkl = new MklLinearAlgebraProvider();
            _mathnetManaged = new ManagedLinearAlgebraProvider();
            _mathnetExperimental = new ManagedLinearAlgebraProvider(Variation.Experimental);

            _mathnetMkl.InitializeVerify();
            _mathnetManaged.InitializeVerify();
            _mathnetExperimental.InitializeVerify();
        }
Exemple #4
0
        public DenseMatrixProduct()
        {
            foreach (var m in new[] { 8, 64, 128 })
            {
                foreach (var n in new[] { 8, 64, 128 })
                {
                    var key = Key(m, n);
                    _data[key] = Matrix <double> .Build.Random(m, n);
                }
            }

            Control.NativeProviderPath = @"..\..\..\..\out\MKL\Windows\";
            _mathnetMkl     = LinearAlgebraControl.CreateNativeMKL();
            _mathnetManaged = LinearAlgebraControl.CreateManaged();
            //_mathnetExperimental = new ManagedLinearAlgebraProvider(Variation.Experimental);

            _mathnetMkl.InitializeVerify();
            _mathnetManaged.InitializeVerify();
            //_mathnetExperimental.InitializeVerify();
        }