Commit 7e5bf8aa authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Merge branch 'JK/bugfixes' into 'develop'

Bug fixes

Closes #12 and #58

See merge request !49
parents 8bf2a0ae 56c21012
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -376,6 +376,12 @@ TNL_IMPL_CMP_HELPER_( GT, > );
    #define __TNL_PRETTY_FUNCTION __PRETTY_FUNCTION__
#endif

// On Linux, __STRING is defined in glibc's sys/cdefs.h, but there is no such
// header on Windows and possibly other platforms.
#ifndef __STRING
   #define __STRING(arg) #arg
#endif

// Internal macro to compose the string representing the assertion.
// We can't do it easily at runtime, because we have to support assertions
// in CUDA kernels, which can't use std::string objects. Instead, we do it
+14 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ public:
   }

   /**
    * \brief Checks whether the parameter \e name already exists in ParameterContainer.
    * \brief Checks if the ParameterContainer contains a parameter specified by its name.
    *
    * \param name Name of the parameter.
    */
@@ -95,6 +95,19 @@ public:
      return false;
   }

   /**
    * \brief Checks whether the ParameterContainer contains all specified parameter names.
    *
    * \param name Name of the parameter.
    */
   bool checkParameters( std::initializer_list< String > names ) const
   {
      for( auto name : names )
         if( ! checkParameter( name ) )
            return false;
      return true;
   }

   /**
    * \brief Assigns new \e value to the parameter \e name.
    *
+8 −1
Original line number Diff line number Diff line
@@ -134,8 +134,15 @@ public:
   void scan( IndexType begin = 0, IndexType end = 0 );
};

// Enable expression templates for DistributedVector
namespace Expressions {
   template< typename Real, typename Device, typename Index, typename Communicator >
   struct HasEnabledDistributedExpressionTemplates< DistributedVector< Real, Device, Index, Communicator > >
   : std::true_type
   {};
} // namespace Expressions

} // namespace Containers
} // namespace TNL

#include <TNL/Containers/DistributedVector.hpp>
#include <TNL/Containers/DistributedVectorExpressions.h>
+0 −936

File deleted.

Preview size limit exceeded, changes collapsed.

+9 −1
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#pragma once

#include <TNL/Containers/DistributedArrayView.h>
#include <TNL/Containers/Expressions/DistributedExpressionTemplates.h>
#include <TNL/Containers/VectorView.h>

namespace TNL {
@@ -137,8 +138,15 @@ public:
   void scan( IndexType begin = 0, IndexType end = 0 );
};

// Enable expression templates for DistributedVector
namespace Expressions {
   template< typename Real, typename Device, typename Index, typename Communicator >
   struct HasEnabledDistributedExpressionTemplates< DistributedVectorView< Real, Device, Index, Communicator > >
   : std::true_type
   {};
} // namespace Expressions

} // namespace Containers
} // namespace TNL

#include <TNL/Containers/DistributedVectorView.hpp>
#include <TNL/Containers/DistributedVectorViewExpressions.h>
Loading