Commit 5ef32f45 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Refactoring the grids.

Adding simple heat equation benchmark for CUDA.
parent f73c3232
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ if( WITH_CUDA STREQUAL "yes" )
        set(BUILD_SHARED_LIBS ON)
        set(CUDA_SEPARABLE_COMPILATION ON)
        set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ; -DHAVE_CUDA )
        AddCompilerFlag( "-DHAVE_NOT_CXX11" ) # -U_GLIBCXX_ATOMIC_BUILTINS -U_GLIBCXX_USE_INT128 " )
        #AddCompilerFlag( "-DHAVE_NOT_CXX11" ) # -U_GLIBCXX_ATOMIC_BUILTINS -U_GLIBCXX_USE_INT128 " )
        set( ALL_CUDA_ARCHS -gencode arch=compute_20,code=sm_20
                            -gencode arch=compute_30,code=sm_30
                            -gencode arch=compute_32,code=sm_32 
@@ -150,6 +150,7 @@ else( WITH_CUDA STREQUAL "yes" )
   #AddCompilerFlag( "-std=gnu++0x -ftree-vectorizer-verbose=1" )       
   AddCompilerFlag( "-std=c++11" )       
endif( WITH_CUDA STREQUAL "yes" )
AddCompilerFlag( "-std=c++11" )       

####
# Check for OpenMP
+0 −4
Original line number Diff line number Diff line
@@ -165,11 +165,7 @@ inline void tnlStaticArray< 1, Element >::setValue( const ElementType& val )
template< typename Element >
bool tnlStaticArray< 1, Element >::save( tnlFile& file ) const
{
#ifdef HAVE_NOT_CXX11
   if( ! file. write< Element, tnlHost, int >( data, size ) )
#else
   if( ! file. write( data, size ) )
#endif
   {
      cerr << "Unable to write " << getType() << "." << endl;
      return false;
+0 −8
Original line number Diff line number Diff line
@@ -194,11 +194,7 @@ inline void tnlStaticArray< 2, Element >::setValue( const ElementType& val )
template< typename Element >
bool tnlStaticArray< 2, Element >::save( tnlFile& file ) const
{
#ifdef HAVE_NOT_CXX11
   if( ! file. write< Element, tnlHost, int >( data, size ) )
#else
   if( ! file. write( data, size ) )
#endif
   {
      cerr << "Unable to write " << getType() << "." << endl;
      return false;
@@ -209,11 +205,7 @@ bool tnlStaticArray< 2, Element >::save( tnlFile& file ) const
template< typename Element >
bool tnlStaticArray< 2, Element >::load( tnlFile& file)
{
#ifdef HAVE_NOT_CXX11
   if( ! file.read< Element, tnlHost, int >( data, size ) )
#else
   if( ! file.read( data, size ) )
#endif
   {
      cerr << "Unable to read " << getType() << "." << endl;
      return false;
+0 −8
Original line number Diff line number Diff line
@@ -215,11 +215,7 @@ void tnlStaticArray< 3, Element >::setValue( const ElementType& val )
template< typename Element >
bool tnlStaticArray< 3, Element >::save( tnlFile& file ) const
{
#ifdef HAVE_NOT_CXX11
   if( ! file. write< Element, tnlHost, int >( data, size ) )
#else
   if( ! file. write( data, size ) )
#endif
   {
      cerr << "Unable to write " << getType() << "." << endl;
      return false;
@@ -230,11 +226,7 @@ bool tnlStaticArray< 3, Element >::save( tnlFile& file ) const
template< typename Element >
bool tnlStaticArray< 3, Element >::load( tnlFile& file)
{
#ifdef HAVE_NOT_CXX11
   if( ! file.read< Element, tnlHost, int >( data, size ) )
#else
   if( ! file.read( data, size ) )
#endif
   {
      cerr << "Unable to read " << getType() << "." << endl;
      return false;
+0 −8
Original line number Diff line number Diff line
@@ -162,11 +162,7 @@ inline void tnlStaticArray< Size, Element >::setValue( const ElementType& val )
template< int Size, typename Element >
bool tnlStaticArray< Size, Element >::save( tnlFile& file ) const
{
#ifdef HAVE_NOT_CXX11
   if( ! file. write< Element, tnlHost, int >( data, size ) )
#else
   if( ! file. write( data, size ) )
#endif
   {
      cerr << "Unable to write " << getType() << "." << endl;
      return false;
@@ -177,11 +173,7 @@ bool tnlStaticArray< Size, Element >::save( tnlFile& file ) const
template< int Size, typename Element >
bool tnlStaticArray< Size, Element >::load( tnlFile& file)
{
#ifdef HAVE_NOT_CXX11
   if( ! file.read< Element, tnlHost, int >( data, size ) )
#else
   if( ! file.read( data, size ) )
#endif
   {
      cerr << "Unable to read " << getType() << "." << endl;
      return false;
Loading