antioch-0.4.0
arrhenius_rate_vexcl_test.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // Antioch - A Gas Dynamics Thermochemistry Library
5 //
6 // Copyright (C) 2014-2016 Paul T. Bauman, Benjamin S. Kirk,
7 // Sylvain Plessis, Roy H. Stonger
8 //
9 // Copyright (C) 2013 The PECOS Development Team
10 //
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the Version 2.1 GNU Lesser General
13 // Public License as published by the Free Software Foundation.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
23 // Boston, MA 02110-1301 USA
24 //
25 //-----------------------------------------------------------------------el-
26 
27 #include "antioch_config.h"
28 
29 #ifdef ANTIOCH_HAVE_CPPUNIT
30 
31 #ifdef ANTIOCH_HAVE_VEXCL
32 
33 // VexCL
34 #include "vexcl/vexcl.hpp"
35 
36 // Antioch
39 #include "antioch/units.h"
41 #include "antioch/vexcl_utils.h"
42 
43 namespace AntiochTesting
44 {
45  class ArrheniusRateVexCLFloatTest : public ArrheniusRateVectorTestBase<vex::vector<float> >
46  {
47  public:
48 
50 
54 
56 
57  private:
58 
59  vex::Context* _ctx;
60 
61  public:
62 
63  virtual void setUp()
64  {
65  this->init();
66  _ctx = new vex::Context(vex::Filter::All);
67  this->_example = new vex::vector<float>(*_ctx, 2*ANTIOCH_N_TUPLES);
68  }
69 
70  virtual void tearDown()
71  {
72  this->clear();
73  delete _ctx;
74  delete this->_example;
75  }
76 
77  };
78 
79  class ArrheniusRateVexCLDoubleTest : public ArrheniusRateVectorTestBase<vex::vector<double> >
80  {
81  public:
82 
84 
88 
90 
91  private:
92 
93  vex::Context* _ctx;
94 
95  public:
96 
97  virtual void setUp()
98  {
99  this->init();
100  _ctx = new vex::Context(vex::Filter::DoublePrecision);
101  this->_example = new vex::vector<double>(*_ctx, 2*ANTIOCH_N_TUPLES);
102  }
103 
104  virtual void tearDown()
105  {
106  this->clear();
107  delete _ctx;
108  delete this->_example;
109  }
110  };
111 
112  CPPUNIT_TEST_SUITE_REGISTRATION( ArrheniusRateVexCLFloatTest );
113  CPPUNIT_TEST_SUITE_REGISTRATION( ArrheniusRateVexCLDoubleTest );
114 
115 } // end namespace AntiochTesting
116 
117 #endif // ANTIOCH_HAVE_VEXCL
118 
119 #endif // ANTIOCH_HAVE_CPPUNIT
CPPUNIT_TEST_SUITE(ArrheniusRateVexCLDoubleTest)
CPPUNIT_TEST_SUITE_REGISTRATION(ArrheniusRateEigenFloatTest)
Advanced unit class.
CPPUNIT_TEST_SUITE(ArrheniusRateVexCLFloatTest)

Generated on Thu Jul 7 2016 11:09:47 for antioch-0.4.0 by  doxygen 1.8.8