Logo ROOT   6.07/09
Reference Guide
TestDataLoaderCuda.cxx
Go to the documentation of this file.
1 // @(#)root/tmva/tmva/dnn:$Id$
2 // Author: Simon Pfreundschuh 08/08/16
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 // Test the generic data loader for the CUDA implementation. //
14 ///////////////////////////////////////////////////////////////
15 
16 #include <iostream>
18 #include "TestDataLoader.h"
19 
20 using namespace TMVA::DNN;
21 
22 int main()
23 {
24  std::cout << "Testing data loader:" << std::endl;
25  using Scalar_t = Real_t;
26 
27  Scalar_t maximumError = 0.0;
28 
29  Scalar_t error = testSum<TCuda<Scalar_t>>();
30  std::cout << "Sum: Maximum relative error = " << error << std::endl;
31  maximumError = std::max(error, maximumError);
32  error = testIdentity<TCuda<Scalar_t>>();
33  std::cout << "Identity: Maximum relative error = " << error << std::endl;
34  maximumError = std::max(error, maximumError);
35 
36  if (maximumError > 1e-3) {
37  return 1;
38  }
39  return 0;
40 }
41 
42 
43 
44 
45 
Definition: Blas.h:58
int main()
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Definition: TRolke.cxx:630
float Real_t
Definition: RtypesCore.h:64