コード例 #1
0
        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
        }
コード例 #2
0
        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
        }
コード例 #3
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 = new MklLinearAlgebraProvider();
            _mathnetManaged = new ManagedLinearAlgebraProvider();
            _mathnetExperimental = new ManagedLinearAlgebraProvider(Variation.Experimental);

            _mathnetMkl.InitializeVerify();
            _mathnetManaged.InitializeVerify();
            _mathnetExperimental.InitializeVerify();
        }
コード例 #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();
        }