Logo ROOT   6.07/09
Reference Guide
TestMatrixArithmeticCpu.cxx
Go to the documentation of this file.
1 // @(#)root/tmva/tmva/dnn:$Id$ // Author: Simon Pfreundschuh 20/07/16
2 
3 /*************************************************************************
4  * Copyright (C) 2016, Simon Pfreundschuh *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 ///////////////////////////////////////////////////////////////////
12 // Test arithmetic on CpuMatrix class using the generic tests in //
13 // TestArithmetic.h //
14 ///////////////////////////////////////////////////////////////////
15 
17 #include "TestMatrixArithmetic.h"
18 
19 using namespace TMVA::DNN;
20 
21 int main()
22 {
23  std::cout << "Testing CPU matrix arithmetic (double):" << std::endl;
24 
25  Double_t error = testMultiplication<TCpu<Double_t>>(10);
26  std::cout << "Multiplication: " << "Max. rel. error: " << error << std::endl;
27  if (error > 1e-3)
28  return 1;
29 
30  error = testSumColumns<TCpu<Double_t>>(1);
31  std::cout << "Column Sum: " << "Max. rel. error: " << error << std::endl;
32  if (error > 1e-3)
33  return 1;
34 
35  std::cout << "Testing CPU matrix arithmetic (float):" << std::endl;
36 
37  error = testMultiplication<TCpu<Real_t>>(10);
38  std::cout << "Multiplication: " << "Max. rel. error: " << error << std::endl;
39  if (error > 1e-1)
40  return 1;
41 
42  error = testSumColumns<TCpu<Real_t>>(1);
43  std::cout << "Column Sum: " << "Max. rel. error: " << error << std::endl;
44  if (error > 1e-1)
45  return 1;
46 }
Definition: Blas.h:58
double Double_t
Definition: RtypesCore.h:55
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Definition: TRolke.cxx:630