aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/packages.config
blob: 2c357dae6aedc56c09fc1df020e96423cdce194f (plain)
1
2
3
4
5
6
7
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="EntityFramework" version="6.2.0" targetFramework="net461" />
  <package id="MahApps.Metro" version="1.5.0" targetFramework="net461" />
  <package id="MaterialDesignColors" version="1.1.2" targetFramework="net461" />
  <package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net461" />
</packages>
#bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2013 Gauthier Brun <brun.gauthier@gmail.com>
// Copyright (C) 2013 Nicolas Carre <nicolas.carre@ensimag.fr>
// Copyright (C) 2013 Jean Ceccato <jean.ceccato@ensimag.fr>
// Copyright (C) 2013 Pierre Zoppitelli <pierre.zoppitelli@ensimag.fr>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/

// Bench to compare the efficiency of SVD algorithms

#include <iostream>
#include <bench/BenchTimer.h>
#include <unsupported/Eigen/SVD>


using namespace Eigen;
using namespace std;

// number of computations of each algorithm before the print of the time
#ifndef REPEAT
#define REPEAT 10
#endif

// number of tests of the same type
#ifndef NUMBER_SAMPLE
#define NUMBER_SAMPLE 2
#endif

template<typename MatrixType>
void bench_svd(const MatrixType& a = MatrixType())
{
  MatrixType m = MatrixType::Random(a.rows(), a.cols());
  BenchTimer timerJacobi;
  BenchTimer timerBDC;
  timerJacobi.reset();
  timerBDC.reset();

  cout << " Only compute Singular Values" <<endl;
  for (int k=1; k<=NUMBER_SAMPLE; ++k)
  {
    timerBDC.start();
    for (int i=0; i<REPEAT; ++i) 
    {
      BDCSVD<MatrixType> bdc_matrix(m);
    }
    timerBDC.stop();
    
    timerJacobi.start();
    for (int i=0; i<REPEAT; ++i) 
    {
      JacobiSVD<MatrixType> jacobi_matrix(m);
    }
    timerJacobi.stop();


    cout << "Sample " << k << " : " << REPEAT << " computations :  Jacobi : " << fixed << timerJacobi.value() << "s ";
    cout << " || " << " BDC : " << timerBDC.value() << "s " <<endl <<endl;
      
    if (timerBDC.value() >= timerJacobi.value())  
      cout << "KO : BDC is " <<  timerJacobi.value() / timerBDC.value() << "  times faster than Jacobi" <<endl;
    else 
      cout << "OK : BDC is " << timerJacobi.value() / timerBDC.value() << "  times faster than Jacobi"  <<endl;
      
  }
  cout << "       =================" <<endl;
  std::cout<< std::endl;
  timerJacobi.reset();
  timerBDC.reset();
  cout << " Computes rotaion matrix" <<endl;
  for (int k=1; k<=NUMBER_SAMPLE; ++k)
  {
    timerBDC.start();
    for (int i=0; i<REPEAT; ++i) 
    {
      BDCSVD<MatrixType> bdc_matrix(m, ComputeFullU|ComputeFullV);
    }
    timerBDC.stop();
    
    timerJacobi.start();
    for (int i=0; i<REPEAT; ++i) 
    {
      JacobiSVD<MatrixType> jacobi_matrix(m, ComputeFullU|ComputeFullV);
    }
    timerJacobi.stop();


    cout << "Sample " << k << " : " << REPEAT << " computations :  Jacobi : " << fixed << timerJacobi.value() << "s ";
    cout << " || " << " BDC : " << timerBDC.value() << "s " <<endl <<endl;
      
    if (timerBDC.value() >= timerJacobi.value())  
      cout << "KO : BDC is " <<  timerJacobi.value() / timerBDC.value() << "  times faster than Jacobi" <<endl;
    else 
      cout << "OK : BDC is " << timerJacobi.value() / timerBDC.value() << "  times faster than Jacobi"  <<endl;
      
  }
  std::cout<< std::endl;
}



int main(int argc, char* argv[])
{
  std::cout<< std::endl;

  std::cout<<"On a (Dynamic, Dynamic) (6, 6) Matrix" <<std::endl;
  bench_svd<Matrix<double,Dynamic,Dynamic> >(Matrix<double,Dynamic,Dynamic>(6, 6));
  
  std::cout<<"On a (Dynamic, Dynamic) (32, 32) Matrix" <<std::endl;
  bench_svd<Matrix<double,Dynamic,Dynamic> >(Matrix<double,Dynamic,Dynamic>(32, 32));

  //std::cout<<"On a (Dynamic, Dynamic) (128, 128) Matrix" <<std::endl;
  //bench_svd<Matrix<double,Dynamic,Dynamic> >(Matrix<double,Dynamic,Dynamic>(128, 128));

  std::cout<<"On a (Dynamic, Dynamic) (160, 160) Matrix" <<std::endl;
  bench_svd<Matrix<double,Dynamic,Dynamic> >(Matrix<double,Dynamic,Dynamic>(160, 160));
  
  std::cout<< "--------------------------------------------------------------------"<< std::endl;
           
}