Merge branch 'maint'
[hoomd-blue.git] / test / unit / test_table_potential.cc
blobe134fb49e68fa683a7a483cc006396c9a46d9589
1 /*
2 Highly Optimized Object-oriented Many-particle Dynamics -- Blue Edition
3 (HOOMD-blue) Open Source Software License Copyright 2009-2014 The Regents of
4 the University of Michigan All rights reserved.
6 HOOMD-blue may contain modifications ("Contributions") provided, and to which
7 copyright is held, by various Contributors who have granted The Regents of the
8 University of Michigan the right to modify and/or distribute such Contributions.
10 You may redistribute, use, and create derivate works of HOOMD-blue, in source
11 and binary forms, provided you abide by the following conditions:
13 * Redistributions of source code must retain the above copyright notice, this
14 list of conditions, and the following disclaimer both in the code and
15 prominently in any materials provided with the distribution.
17 * Redistributions in binary form must reproduce the above copyright notice, this
18 list of conditions, and the following disclaimer in the documentation and/or
19 other materials provided with the distribution.
21 * All publications and presentations based on HOOMD-blue, including any reports
22 or published results obtained, in whole or in part, with HOOMD-blue, will
23 acknowledge its use according to the terms posted at the time of submission on:
24 http://codeblue.umich.edu/hoomd-blue/citations.html
26 * Any electronic documents citing HOOMD-Blue will link to the HOOMD-Blue website:
27 http://codeblue.umich.edu/hoomd-blue/
29 * Apart from the above required attributions, neither the name of the copyright
30 holder nor the names of HOOMD-blue's contributors may be used to endorse or
31 promote products derived from this software without specific prior written
32 permission.
34 Disclaimer
36 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS'' AND
37 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
38 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR ANY
39 WARRANTIES THAT THIS SOFTWARE IS FREE OF INFRINGEMENT ARE DISCLAIMED.
41 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
42 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
43 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
44 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
45 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
46 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
47 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
51 #ifdef WIN32
52 #pragma warning( push )
53 #pragma warning( disable : 4103 4244 )
54 #endif
56 #include <fstream>
58 #include "TablePotential.h"
59 #include "NeighborList.h"
60 #ifdef ENABLE_CUDA
61 #include "TablePotentialGPU.h"
62 #endif
64 using namespace std;
65 using namespace boost;
67 //! Name the unit test module
68 #define BOOST_TEST_MODULE TablePotentialTests
69 #include "boost_utf_configure.h"
71 /*! \file table_potential.cc
72 \brief Implements unit tests for TablePotential and descendants
73 \ingroup unit_tests
76 //! Typedef'd TablePotential factory
77 typedef boost::function<boost::shared_ptr<TablePotential> (boost::shared_ptr<SystemDefinition> sysdef,
78 boost::shared_ptr<NeighborList> nlist,
79 unsigned int width)> table_potential_creator;
81 //! performs some really basic checks on the TablePotential class
82 void table_potential_basic_test(table_potential_creator table_creator, boost::shared_ptr<ExecutionConfiguration> exec_conf)
84 // perform a basic test to see of the potential and force can be interpolated between two particles
85 boost::shared_ptr<SystemDefinition> sysdef_2(new SystemDefinition(2, BoxDim(1000.0), 1, 0, 0, 0, 0, exec_conf));
86 boost::shared_ptr<ParticleData> pdata_2 = sysdef_2->getParticleData();
89 ArrayHandle<Scalar4> h_pos(pdata_2->getPositions(), access_location::host, access_mode::readwrite);
90 h_pos.data[0].x = h_pos.data[0].y = h_pos.data[0].z = 0.0;
91 h_pos.data[1].x = Scalar(1.0); h_pos.data[1].y = h_pos.data[1].z = 0.0;
94 boost::shared_ptr<NeighborList> nlist_2(new NeighborList(sysdef_2, Scalar(7.0), Scalar(0.8)));
95 boost::shared_ptr<TablePotential> fc_2 = table_creator(sysdef_2, nlist_2, 3);
97 // first check for proper initialization by seeing if the force and potential come out to be 0
98 fc_2->compute(0);
101 GPUArray<Scalar4>& force_array_1 = fc_2->getForceArray();
102 GPUArray<Scalar>& virial_array_1 = fc_2->getVirialArray();
103 unsigned int pitch = virial_array_1.getPitch();
104 ArrayHandle<Scalar4> h_force_1(force_array_1,access_location::host,access_mode::read);
105 ArrayHandle<Scalar> h_virial_1(virial_array_1,access_location::host,access_mode::read);
106 MY_BOOST_CHECK_SMALL(h_force_1.data[0].x, tol_small);
107 MY_BOOST_CHECK_SMALL(h_force_1.data[0].y, tol_small);
108 MY_BOOST_CHECK_SMALL(h_force_1.data[0].z, tol_small);
109 MY_BOOST_CHECK_SMALL(h_force_1.data[0].w, tol_small);
110 MY_BOOST_CHECK_SMALL(h_virial_1.data[0*pitch+0], tol_small);
111 MY_BOOST_CHECK_SMALL(h_virial_1.data[1*pitch+0], tol_small);
112 MY_BOOST_CHECK_SMALL(h_virial_1.data[2*pitch+0], tol_small);
113 MY_BOOST_CHECK_SMALL(h_virial_1.data[3*pitch+0], tol_small);
114 MY_BOOST_CHECK_SMALL(h_virial_1.data[4*pitch+0], tol_small);
115 MY_BOOST_CHECK_SMALL(h_virial_1.data[5*pitch+0], tol_small);
117 MY_BOOST_CHECK_SMALL(h_force_1.data[1].x, tol_small);
118 MY_BOOST_CHECK_SMALL(h_force_1.data[1].y, tol_small);
119 MY_BOOST_CHECK_SMALL(h_force_1.data[1].z, tol_small);
120 MY_BOOST_CHECK_SMALL(h_force_1.data[1].w, tol_small);
121 MY_BOOST_CHECK_SMALL(h_virial_1.data[0*pitch+1], tol_small);
122 MY_BOOST_CHECK_SMALL(h_virial_1.data[1*pitch+1], tol_small);
123 MY_BOOST_CHECK_SMALL(h_virial_1.data[2*pitch+1], tol_small);
124 MY_BOOST_CHECK_SMALL(h_virial_1.data[3*pitch+1], tol_small);
125 MY_BOOST_CHECK_SMALL(h_virial_1.data[4*pitch+1], tol_small);
126 MY_BOOST_CHECK_SMALL(h_virial_1.data[5*pitch+1], tol_small);
129 // specify a table to interpolate
130 vector<Scalar> V, F;
131 V.push_back(10.0); F.push_back(1.0);
132 V.push_back(21.0); F.push_back(6.0);
133 V.push_back(5.0); F.push_back(2.0);
134 fc_2->setTable(0, 0, V, F, 2.0, 4.0);
136 // compute the forces again and check that they are still 0
137 fc_2->compute(1);
140 GPUArray<Scalar4>& force_array_2 = fc_2->getForceArray();
141 GPUArray<Scalar>& virial_array_2 = fc_2->getVirialArray();
142 unsigned int pitch = virial_array_2.getPitch();
143 ArrayHandle<Scalar4> h_force_2(force_array_2,access_location::host,access_mode::read);
144 ArrayHandle<Scalar> h_virial_2(virial_array_2,access_location::host,access_mode::read);
145 MY_BOOST_CHECK_SMALL(h_force_2.data[0].x, tol_small);
146 MY_BOOST_CHECK_SMALL(h_force_2.data[0].y, tol_small);
147 MY_BOOST_CHECK_SMALL(h_force_2.data[0].z, tol_small);
148 MY_BOOST_CHECK_SMALL(h_force_2.data[0].w, tol_small);
149 MY_BOOST_CHECK_SMALL(h_virial_2.data[0*pitch+0], tol_small);
150 MY_BOOST_CHECK_SMALL(h_virial_2.data[1*pitch+0], tol_small);
151 MY_BOOST_CHECK_SMALL(h_virial_2.data[2*pitch+0], tol_small);
152 MY_BOOST_CHECK_SMALL(h_virial_2.data[3*pitch+0], tol_small);
153 MY_BOOST_CHECK_SMALL(h_virial_2.data[4*pitch+0], tol_small);
154 MY_BOOST_CHECK_SMALL(h_virial_2.data[5*pitch+0], tol_small);
156 MY_BOOST_CHECK_SMALL(h_force_2.data[1].x, tol_small);
157 MY_BOOST_CHECK_SMALL(h_force_2.data[1].y, tol_small);
158 MY_BOOST_CHECK_SMALL(h_force_2.data[1].z, tol_small);
159 MY_BOOST_CHECK_SMALL(h_force_2.data[1].w, tol_small);
160 MY_BOOST_CHECK_SMALL(h_virial_2.data[0*pitch+1], tol_small);
161 MY_BOOST_CHECK_SMALL(h_virial_2.data[1*pitch+1], tol_small);
162 MY_BOOST_CHECK_SMALL(h_virial_2.data[2*pitch+1], tol_small);
163 MY_BOOST_CHECK_SMALL(h_virial_2.data[3*pitch+1], tol_small);
164 MY_BOOST_CHECK_SMALL(h_virial_2.data[4*pitch+1], tol_small);
165 MY_BOOST_CHECK_SMALL(h_virial_2.data[5*pitch+1], tol_small);
169 // now go to rmin and check for the correct force value
171 ArrayHandle<Scalar4> h_pos(pdata_2->getPositions(), access_location::host, access_mode::readwrite);
172 h_pos.data[1].x = Scalar(2.0);
175 fc_2->compute(2);
178 GPUArray<Scalar4>& force_array_3 = fc_2->getForceArray();
179 GPUArray<Scalar>& virial_array_3 = fc_2->getVirialArray();
180 unsigned int pitch = virial_array_3.getPitch();
181 ArrayHandle<Scalar4> h_force_3(force_array_3,access_location::host,access_mode::read);
182 ArrayHandle<Scalar> h_virial_3(virial_array_3,access_location::host,access_mode::read);
183 MY_BOOST_CHECK_CLOSE(h_force_3.data[0].x, -1.0, tol);
184 MY_BOOST_CHECK_SMALL(h_force_3.data[0].y, tol_small);
185 MY_BOOST_CHECK_SMALL(h_force_3.data[0].z, tol_small);
186 MY_BOOST_CHECK_CLOSE(h_force_3.data[0].w, 5.0, tol);
187 MY_BOOST_CHECK_CLOSE(Scalar(1./3.)*(h_virial_3.data[0*pitch+0]
188 +h_virial_3.data[3*pitch+0]
189 +h_virial_3.data[5*pitch+0]), (1.0 / 6.0) * 2.0, tol);
191 MY_BOOST_CHECK_CLOSE(h_force_3.data[1].x, 1.0, tol);
192 MY_BOOST_CHECK_SMALL(h_force_3.data[1].y, tol_small);
193 MY_BOOST_CHECK_SMALL(h_force_3.data[1].z, tol_small);
194 MY_BOOST_CHECK_CLOSE(h_force_3.data[1].w, 5.0, tol);
195 MY_BOOST_CHECK_CLOSE(Scalar(1./3.)*(h_virial_3.data[0*pitch+1]
196 +h_virial_3.data[3*pitch+1]
197 +h_virial_3.data[5*pitch+1]), (1.0 / 6.0) * 2.0, tol);
200 // go halfway in-between two points
202 ArrayHandle<Scalar4> h_pos(pdata_2->getPositions(), access_location::host, access_mode::readwrite);
203 h_pos.data[1].y = Scalar(3.5);
204 h_pos.data[1].x = Scalar(0.0);
207 // check the forces
208 fc_2->compute(3);
211 GPUArray<Scalar4>& force_array_4 = fc_2->getForceArray();
212 GPUArray<Scalar>& virial_array_4 = fc_2->getVirialArray();
213 unsigned int pitch = virial_array_4.getPitch();
214 ArrayHandle<Scalar4> h_force_4(force_array_4,access_location::host,access_mode::read);
215 ArrayHandle<Scalar> h_virial_4(virial_array_4,access_location::host,access_mode::read);
216 MY_BOOST_CHECK_CLOSE(h_force_4.data[0].y, -4.0, tol);
217 MY_BOOST_CHECK_SMALL(h_force_4.data[0].x, tol_small);
218 MY_BOOST_CHECK_SMALL(h_force_4.data[0].z, tol_small);
219 MY_BOOST_CHECK_CLOSE(h_force_4.data[0].w, 13.0/2.0, tol);
220 MY_BOOST_CHECK_CLOSE(Scalar(1./3.)*(h_virial_4.data[0*pitch+0]
221 +h_virial_4.data[3*pitch+0]
222 +h_virial_4.data[5*pitch+0]), (1.0 / 6.0) * 4.0 * 3.5, tol);
224 MY_BOOST_CHECK_CLOSE(h_force_4.data[1].y, 4.0, tol);
225 MY_BOOST_CHECK_SMALL(h_force_4.data[1].x, tol_small);
226 MY_BOOST_CHECK_SMALL(h_force_4.data[1].z, tol_small);
227 MY_BOOST_CHECK_CLOSE(h_force_4.data[1].w, 13.0 / 2.0, tol);
228 MY_BOOST_CHECK_CLOSE(Scalar(1./3.)*(h_virial_4.data[0*pitch+1]
229 +h_virial_4.data[3*pitch+1]
230 +h_virial_4.data[5*pitch+1]), (1.0 / 6.0) * 4.0 * 3.5, tol);
233 // and now check for when r > rmax
235 ArrayHandle<Scalar4> h_pos(pdata_2->getPositions(), access_location::host, access_mode::readwrite);
236 h_pos.data[1].z = Scalar(4.0);
239 // compute and check
240 fc_2->compute(4);
243 GPUArray<Scalar4>& force_array_5 = fc_2->getForceArray();
244 GPUArray<Scalar>& virial_array_5 = fc_2->getVirialArray();
245 unsigned int pitch = virial_array_5.getPitch();
246 ArrayHandle<Scalar4> h_force_5(force_array_5,access_location::host,access_mode::read);
247 ArrayHandle<Scalar> h_virial_5(virial_array_5,access_location::host,access_mode::read);
248 MY_BOOST_CHECK_SMALL(h_force_5.data[0].x, tol_small);
249 MY_BOOST_CHECK_SMALL(h_force_5.data[0].y, tol_small);
250 MY_BOOST_CHECK_SMALL(h_force_5.data[0].z, tol_small);
251 MY_BOOST_CHECK_SMALL(h_force_5.data[0].w, tol_small);
252 MY_BOOST_CHECK_SMALL(h_virial_5.data[0*pitch+0], tol_small);
253 MY_BOOST_CHECK_SMALL(h_virial_5.data[1*pitch+0], tol_small);
254 MY_BOOST_CHECK_SMALL(h_virial_5.data[2*pitch+0], tol_small);
255 MY_BOOST_CHECK_SMALL(h_virial_5.data[3*pitch+0], tol_small);
256 MY_BOOST_CHECK_SMALL(h_virial_5.data[4*pitch+0], tol_small);
257 MY_BOOST_CHECK_SMALL(h_virial_5.data[5*pitch+0], tol_small);
259 MY_BOOST_CHECK_SMALL(h_force_5.data[1].x, tol_small);
260 MY_BOOST_CHECK_SMALL(h_force_5.data[1].y, tol_small);
261 MY_BOOST_CHECK_SMALL(h_force_5.data[1].z, tol_small);
262 MY_BOOST_CHECK_SMALL(h_force_5.data[1].w, tol_small);
263 MY_BOOST_CHECK_SMALL(h_virial_5.data[0*pitch+1], tol_small);
264 MY_BOOST_CHECK_SMALL(h_virial_5.data[1*pitch+1], tol_small);
265 MY_BOOST_CHECK_SMALL(h_virial_5.data[2*pitch+1], tol_small);
266 MY_BOOST_CHECK_SMALL(h_virial_5.data[3*pitch+1], tol_small);
267 MY_BOOST_CHECK_SMALL(h_virial_5.data[4*pitch+1], tol_small);
268 MY_BOOST_CHECK_SMALL(h_virial_5.data[5*pitch+1], tol_small);
272 //! checks to see if TablePotential correctly handles multiple types
273 void table_potential_type_test(table_potential_creator table_creator, boost::shared_ptr<ExecutionConfiguration> exec_conf)
275 // perform a basic test to see of the potential and force can be interpolated between two particles
276 boost::shared_ptr<SystemDefinition> sysdef(new SystemDefinition(4, BoxDim(1000.0), 2, 0, 0, 0, 0, exec_conf));
277 boost::shared_ptr<ParticleData> pdata = sysdef->getParticleData();
280 ArrayHandle<Scalar4> h_pos(pdata->getPositions(), access_location::host, access_mode::readwrite);
281 h_pos.data[0].x = h_pos.data[0].y = h_pos.data[0].z = 0.0; h_pos.data[0].w= __int_as_scalar(0);
282 h_pos.data[1].x = Scalar(1.5); h_pos.data[1].y = h_pos.data[1].z = 0.0; h_pos.data[1].w = __int_as_scalar(1);
283 h_pos.data[2].x = 0.0; h_pos.data[2].y = Scalar(1.5); h_pos.data[2].z = 0.0; h_pos.data[2].w = __int_as_scalar(0);
284 h_pos.data[3].x = Scalar(1.5); h_pos.data[3].y = Scalar(1.5); h_pos.data[3].z = 0.0; h_pos.data[3].w = __int_as_scalar(1);
287 boost::shared_ptr<NeighborList> nlist(new NeighborList(sysdef, Scalar(2.0), Scalar(0.8)));
288 boost::shared_ptr<TablePotential> fc = table_creator(sysdef, nlist, 3);
290 // specify a table to interpolate
291 vector<Scalar> V, F;
292 V.push_back(10.0); F.push_back(1.0);
293 V.push_back(20.0); F.push_back(6.0);
294 V.push_back(5.0); F.push_back(2.0);
295 fc->setTable(0, 0, V, F, 1.0, 2.0);
297 // next type pair
298 V.clear(); F.clear();
299 V.push_back(20.0); F.push_back(2.0);
300 V.push_back(40.0); F.push_back(12.0);
301 V.push_back(10.0); F.push_back(4.0);
302 fc->setTable(0, 1, V, F, 0.0, 2.0);
304 // next type pair
305 V.clear(); F.clear();
306 V.push_back(5.0); F.push_back(0.5);
307 V.push_back(10.0); F.push_back(3.0);
308 V.push_back(2.5); F.push_back(2.0);
309 fc->setTable(1, 1, V, F, 1.0, 2.0);
311 // compute and check
312 fc->compute(0);
315 GPUArray<Scalar4>& force_array_6 = fc->getForceArray();
316 GPUArray<Scalar>& virial_array_6 = fc->getVirialArray();
317 unsigned int pitch = virial_array_6.getPitch();
318 ArrayHandle<Scalar4> h_force_6(force_array_6,access_location::host,access_mode::read);
319 ArrayHandle<Scalar> h_virial_6(virial_array_6,access_location::host,access_mode::read);
320 MY_BOOST_CHECK_CLOSE(h_force_6.data[0].x, -8.0, tol);
321 MY_BOOST_CHECK_CLOSE(h_force_6.data[0].y, -6.0, tol);
322 MY_BOOST_CHECK_SMALL(h_force_6.data[0].z, tol_small);
323 MY_BOOST_CHECK_SMALL(h_force_6.data[0].w, 10.0+25.0);
324 MY_BOOST_CHECK_CLOSE(Scalar(1./3.)*(h_virial_6.data[0*pitch+0]
325 +h_virial_6.data[3*pitch+0]
326 +h_virial_6.data[5*pitch+0]), (8*1.5+6*1.5)*1.0/6.0, tol);
328 MY_BOOST_CHECK_CLOSE(h_force_6.data[1].x, 8.0, tol);
329 MY_BOOST_CHECK_CLOSE(h_force_6.data[1].y, -3.0, tol);
330 MY_BOOST_CHECK_SMALL(h_force_6.data[1].z, tol_small);
331 MY_BOOST_CHECK_CLOSE(h_force_6.data[1].w, 25.0/2.0 + 5.0, tol);
332 MY_BOOST_CHECK_CLOSE(Scalar(1./3.)*(h_virial_6.data[0*pitch+1]
333 +h_virial_6.data[3*pitch+1]
334 +h_virial_6.data[5*pitch+1]), (8*1.5 + 3.0 * 1.5)*1.0/6.0, tol);
336 MY_BOOST_CHECK_CLOSE(h_force_6.data[2].x, -8.0, tol);
337 MY_BOOST_CHECK_CLOSE(h_force_6.data[2].y, 6.0, tol);
338 MY_BOOST_CHECK_SMALL(h_force_6.data[2].z, tol_small);
339 MY_BOOST_CHECK_SMALL(h_force_6.data[2].w, 10.0+25.0);
340 MY_BOOST_CHECK_CLOSE(Scalar(1./3.)*(h_virial_6.data[0*pitch+2]
341 +h_virial_6.data[3*pitch+2]
342 +h_virial_6.data[5*pitch+2]), (8*1.5+6*1.5)*1.0/6.0, tol);
344 MY_BOOST_CHECK_CLOSE(h_force_6.data[3].x, 8.0, tol);
345 MY_BOOST_CHECK_CLOSE(h_force_6.data[3].y, 3.0, tol);
346 MY_BOOST_CHECK_SMALL(h_force_6.data[3].z, tol_small);
347 MY_BOOST_CHECK_CLOSE(h_force_6.data[3].w, 25.0/2.0 + 5.0, tol);
348 MY_BOOST_CHECK_CLOSE(Scalar(1./3.)*(h_virial_6.data[0*pitch+3]
349 +h_virial_6.data[3*pitch+3]
350 +h_virial_6.data[5*pitch+3]), (8*1.5 + 3.0*1.5)*1.0/6.0, tol);
354 //! TablePotential creator for unit tests
355 boost::shared_ptr<TablePotential> base_class_table_creator(boost::shared_ptr<SystemDefinition> sysdef,
356 boost::shared_ptr<NeighborList> nlist,
357 unsigned int width)
359 return boost::shared_ptr<TablePotential>(new TablePotential(sysdef, nlist, width));
362 #ifdef ENABLE_CUDA
363 //! TablePotentialGPU creator for unit tests
364 boost::shared_ptr<TablePotential> gpu_table_creator(boost::shared_ptr<SystemDefinition> sysdef,
365 boost::shared_ptr<NeighborList> nlist,
366 unsigned int width)
368 nlist->setStorageMode(NeighborList::full);
369 boost::shared_ptr<TablePotentialGPU> table(new TablePotentialGPU(sysdef, nlist, width));
370 return table;
372 #endif
375 //! boost test case for basic test on CPU
376 BOOST_AUTO_TEST_CASE( TablePotential_basic )
378 table_potential_creator table_creator_base = bind(base_class_table_creator, _1, _2, _3);
379 table_potential_basic_test(table_creator_base, boost::shared_ptr<ExecutionConfiguration>(new ExecutionConfiguration(ExecutionConfiguration::CPU)));
382 //! boost test case for type test on CPU
383 BOOST_AUTO_TEST_CASE( TablePotential_type )
385 table_potential_creator table_creator_base = bind(base_class_table_creator, _1, _2, _3);
386 table_potential_type_test(table_creator_base, boost::shared_ptr<ExecutionConfiguration>(new ExecutionConfiguration(ExecutionConfiguration::CPU)));
389 #ifdef ENABLE_CUDA
390 //! boost test case for basic test on GPU
391 BOOST_AUTO_TEST_CASE( TablePotentialGPU_basic )
393 table_potential_creator table_creator_gpu = bind(gpu_table_creator, _1, _2, _3);
394 table_potential_basic_test(table_creator_gpu, boost::shared_ptr<ExecutionConfiguration>(new ExecutionConfiguration(ExecutionConfiguration::GPU)));
397 //! boost test case for type test on GPU
398 BOOST_AUTO_TEST_CASE( TablePotentialGPU_type )
400 table_potential_creator table_creator_gpu = bind(gpu_table_creator, _1, _2, _3);
401 table_potential_type_test(table_creator_gpu, boost::shared_ptr<ExecutionConfiguration>(new ExecutionConfiguration(ExecutionConfiguration::GPU)));
403 #endif
405 #ifdef WIN32
406 #pragma warning( pop )
407 #endif