Loading src/core/tnlUniquePointer.h +9 −6 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #pragma once #include <utility> #include <core/tnlHost.h> #include <core/tnlCuda.h> Loading @@ -25,11 +26,11 @@ class tnlUniquePointer { }; template< typename Object, typename Device, typename... Args > tnlUniquePointer< Object, Device >& makeUniquePointer( Args&& args ) /*template< typename Object, typename Device, typename... Args > tnlUniquePointer< Object, Device >& tnlUniquePointer( Args&& args ) { return } }*/ template< typename Object > class tnlUniquePointer< Object, tnlHost > Loading @@ -41,14 +42,14 @@ class tnlUniquePointer< Object, tnlHost > typedef tnlUniquePointer< Object, tnlHost > ThisType; tnlUniquePointer() : pointer( 0 ) { this->pointer = new Object(); } template< typename... Args > void create( const Args&& args ) { this->pointer = new Object( args ); this->pointer = new Object( std::forward< Args >( args ) ); } const Object& operator->() const Loading Loading @@ -85,6 +86,8 @@ class tnlUniquePointer< Object, tnlHost > { if( this-> pointer ) delete this->pointer; this->pointer = ptr.pointer; ptr.pointer= NULL; } ~tnlUniquePointer() Loading tests/benchmarks/heat-equation-benchmark/CMakeLists.txt +6 −1 Original line number Diff line number Diff line Loading @@ -20,8 +20,13 @@ ENDIF() INSTALL( TARGETS tnl-benchmark-heat-equation${debugExt} tnl-benchmark-simple-heat-equation${debugExt} RUNTIME DESTINATION bin ) if( BUILD_CUDA ) INSTALL( TARGETS tnl-benchmark-simple-heat-equation-bug${debugExt} RUNTIME DESTINATION bin ) endif() tests/benchmarks/heat-equation-benchmark/HeatEquationBenchmarkProblem_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -438,6 +438,7 @@ getExplicitRHS( const RealType& time, } if( std::is_same< DeviceType, tnlCuda >::value ) { #ifdef HAVE_CUDA if( this->cudaKernelType == "pure-c" ) { const IndexType gridXSize = mesh.getDimensions().x(); Loading Loading @@ -471,7 +472,6 @@ getExplicitRHS( const RealType& time, } if( this->cudaKernelType == "templated-compact" ) { #ifdef HAVE_CUDA typedef typename MeshType::Cell CellType; typedef typename CellType::CoordinatesType CoordinatesType; MeshFunctionType u( mesh, uDofs ); Loading tests/unit-tests/core/CMakeLists.txt +6 −2 Original line number Diff line number Diff line Loading @@ -6,12 +6,18 @@ ADD_SUBDIRECTORY( multimaps ) set( headers tnlFileTester.h tnlStringTester.h tnlObjectTester.h tnlUniquePointerTester.h tnlRealTester.h tnlListTester.h tnlGridOldTester.h tnlSharedMemoryTester.h tnlCommunicatorTester.h ) ADD_EXECUTABLE( tnlUniquePointerTest${mpiExt}${debugExt} ${headers} tnlUniquePointerTest.cpp ) SET_TARGET_PROPERTIES( tnlUniquePointerTest${mpiExt}${debugExt} PROPERTIES COMPILE_FLAGS "${CXX_TEST_FLAGS}" ) TARGET_LINK_LIBRARIES( tnlUniquePointerTest${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} ${LD_TEST_FLAGS} tnl${mpiExt}${debugExt}-0.1 ) ADD_EXECUTABLE( tnlObjectTest${mpiExt}${debugExt} ${headers} tnlObjectTest.cpp ) SET_TARGET_PROPERTIES( tnlObjectTest${mpiExt}${debugExt} PROPERTIES COMPILE_FLAGS "${CXX_TEST_FLAGS}" ) TARGET_LINK_LIBRARIES( tnlObjectTest${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} ${LD_TEST_FLAGS} Loading @@ -24,5 +30,3 @@ TARGET_LINK_LIBRARIES( tnlStringTest${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} ADD_EXECUTABLE( tnlListTest${mpiExt}${debugExt} ${headers} tnlListTest.cpp ) TARGET_LINK_LIBRARIES( tnlListTest${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-0.1 ) No newline at end of file tests/unit-tests/core/tnlObjectTester.h +2 −4 Original line number Diff line number Diff line /*************************************************************************** tnlStringTester.h - description tnlObjectTester.h - description ------------------- begin : Oct 4, 2012 copyright : (C) 2012 by Tomas Oberhuber Loading @@ -15,8 +15,7 @@ * * ***************************************************************************/ #ifndef TNLOBJECTTESTER_H_ #define TNLOBJECTTESTER_H_ #pragma once #ifdef HAVE_CPPUNIT #include <cppunit/TestSuite.h> Loading Loading @@ -60,4 +59,3 @@ class tnlObjectTester : public CppUnit :: TestCase class tnlObjectTester{}; #endif /* HAVE_CPPUNIT */ #endif /* TNLOBJECTTESTER_H_ */ Loading
src/core/tnlUniquePointer.h +9 −6 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #pragma once #include <utility> #include <core/tnlHost.h> #include <core/tnlCuda.h> Loading @@ -25,11 +26,11 @@ class tnlUniquePointer { }; template< typename Object, typename Device, typename... Args > tnlUniquePointer< Object, Device >& makeUniquePointer( Args&& args ) /*template< typename Object, typename Device, typename... Args > tnlUniquePointer< Object, Device >& tnlUniquePointer( Args&& args ) { return } }*/ template< typename Object > class tnlUniquePointer< Object, tnlHost > Loading @@ -41,14 +42,14 @@ class tnlUniquePointer< Object, tnlHost > typedef tnlUniquePointer< Object, tnlHost > ThisType; tnlUniquePointer() : pointer( 0 ) { this->pointer = new Object(); } template< typename... Args > void create( const Args&& args ) { this->pointer = new Object( args ); this->pointer = new Object( std::forward< Args >( args ) ); } const Object& operator->() const Loading Loading @@ -85,6 +86,8 @@ class tnlUniquePointer< Object, tnlHost > { if( this-> pointer ) delete this->pointer; this->pointer = ptr.pointer; ptr.pointer= NULL; } ~tnlUniquePointer() Loading
tests/benchmarks/heat-equation-benchmark/CMakeLists.txt +6 −1 Original line number Diff line number Diff line Loading @@ -20,8 +20,13 @@ ENDIF() INSTALL( TARGETS tnl-benchmark-heat-equation${debugExt} tnl-benchmark-simple-heat-equation${debugExt} RUNTIME DESTINATION bin ) if( BUILD_CUDA ) INSTALL( TARGETS tnl-benchmark-simple-heat-equation-bug${debugExt} RUNTIME DESTINATION bin ) endif()
tests/benchmarks/heat-equation-benchmark/HeatEquationBenchmarkProblem_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -438,6 +438,7 @@ getExplicitRHS( const RealType& time, } if( std::is_same< DeviceType, tnlCuda >::value ) { #ifdef HAVE_CUDA if( this->cudaKernelType == "pure-c" ) { const IndexType gridXSize = mesh.getDimensions().x(); Loading Loading @@ -471,7 +472,6 @@ getExplicitRHS( const RealType& time, } if( this->cudaKernelType == "templated-compact" ) { #ifdef HAVE_CUDA typedef typename MeshType::Cell CellType; typedef typename CellType::CoordinatesType CoordinatesType; MeshFunctionType u( mesh, uDofs ); Loading
tests/unit-tests/core/CMakeLists.txt +6 −2 Original line number Diff line number Diff line Loading @@ -6,12 +6,18 @@ ADD_SUBDIRECTORY( multimaps ) set( headers tnlFileTester.h tnlStringTester.h tnlObjectTester.h tnlUniquePointerTester.h tnlRealTester.h tnlListTester.h tnlGridOldTester.h tnlSharedMemoryTester.h tnlCommunicatorTester.h ) ADD_EXECUTABLE( tnlUniquePointerTest${mpiExt}${debugExt} ${headers} tnlUniquePointerTest.cpp ) SET_TARGET_PROPERTIES( tnlUniquePointerTest${mpiExt}${debugExt} PROPERTIES COMPILE_FLAGS "${CXX_TEST_FLAGS}" ) TARGET_LINK_LIBRARIES( tnlUniquePointerTest${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} ${LD_TEST_FLAGS} tnl${mpiExt}${debugExt}-0.1 ) ADD_EXECUTABLE( tnlObjectTest${mpiExt}${debugExt} ${headers} tnlObjectTest.cpp ) SET_TARGET_PROPERTIES( tnlObjectTest${mpiExt}${debugExt} PROPERTIES COMPILE_FLAGS "${CXX_TEST_FLAGS}" ) TARGET_LINK_LIBRARIES( tnlObjectTest${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} ${LD_TEST_FLAGS} Loading @@ -24,5 +30,3 @@ TARGET_LINK_LIBRARIES( tnlStringTest${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} ADD_EXECUTABLE( tnlListTest${mpiExt}${debugExt} ${headers} tnlListTest.cpp ) TARGET_LINK_LIBRARIES( tnlListTest${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-0.1 ) No newline at end of file
tests/unit-tests/core/tnlObjectTester.h +2 −4 Original line number Diff line number Diff line /*************************************************************************** tnlStringTester.h - description tnlObjectTester.h - description ------------------- begin : Oct 4, 2012 copyright : (C) 2012 by Tomas Oberhuber Loading @@ -15,8 +15,7 @@ * * ***************************************************************************/ #ifndef TNLOBJECTTESTER_H_ #define TNLOBJECTTESTER_H_ #pragma once #ifdef HAVE_CPPUNIT #include <cppunit/TestSuite.h> Loading Loading @@ -60,4 +59,3 @@ class tnlObjectTester : public CppUnit :: TestCase class tnlObjectTester{}; #endif /* HAVE_CPPUNIT */ #endif /* TNLOBJECTTESTER_H_ */