Logo ROOT   6.07/09
Reference Guide
TestMatrixArithmeticCuda.cxx
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Simon Pfreundschuh
3 
4 /*************************************************************************
5  * Copyright (C) 2016, Simon Pfreundschuh
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 ////////////////////////////////////////////////////////////////////
13 // Concrete instantiation of the generic backpropagation test for //
14 // CUDA architectures. //
15 ////////////////////////////////////////////////////////////////////
16 
17 #include <iostream>
19 #include "TestMatrixArithmetic.h"
20 
21 using namespace TMVA::DNN;
22 
23 int main()
24 {
25  std::cout << "Testing CUDA matrix arithmetic (double):" << std::endl;
26 
27  Double_t error = testMultiplication<TCuda<Double_t>>(10);
28  std::cout << "Multiplication: " << "Max. rel. error: " << error << std::endl;
29  if (error > 1e-3)
30  return 1;
31 
32  error = testSumColumns<TCuda<Double_t>>(1);
33  std::cout << "Column Sum: " << "Max. rel. error: " << error << std::endl;
34  if (error > 1e-3)
35  return 1;
36 
37  std::cout << "Testing CUDA matrix arithmetic (float):" << std::endl;
38 
39  error = testMultiplication<TCuda<Real_t>>(10);
40  std::cout << "Multiplication: " << "Max. rel. error: " << error << std::endl;
41  if (error > 1)
42  return 1;
43 
44  error = testSumColumns<TCuda<Real_t>>(1);
45  std::cout << "Column Sum: " << "Max. rel. error: " << error << std::endl;
46  if (error > 1e-3)
47  return 1;
48 }
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