Commit cc6214bb authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Reformatted code changed in recent commits with clang-format

parent 271ea13d
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -57,8 +57,11 @@ DistributedExpressionArgMin( const Expression& expression )
      std::unique_ptr< ResultType[] > gatheredResults{ new ResultType[ nproc ] };
      // NOTE: exchanging general data types does not work with MPI
      // MPI::Alltoall( dataForScatter.get(), 1, gatheredResults.get(), 1, communicator );
      MPI::Alltoall(
         (char*) dataForScatter.get(), sizeof( ResultType ), (char*) gatheredResults.get(), sizeof( ResultType ), communicator );
      MPI::Alltoall( (char*) dataForScatter.get(),
                     sizeof( ResultType ),
                     (char*) gatheredResults.get(),
                     sizeof( ResultType ),
                     communicator );

      auto fetch = [ &gatheredResults ]( IndexType i )
      {
@@ -113,8 +116,11 @@ DistributedExpressionArgMax( const Expression& expression )
      std::unique_ptr< ResultType[] > gatheredResults{ new ResultType[ nproc ] };
      // NOTE: exchanging general data types does not work with MPI
      // MPI::Alltoall( dataForScatter.get(), 1, gatheredResults.get(), 1, communicator );
      MPI::Alltoall(
         (char*) dataForScatter.get(), sizeof( ResultType ), (char*) gatheredResults.get(), sizeof( ResultType ), communicator );
      MPI::Alltoall( (char*) dataForScatter.get(),
                     sizeof( ResultType ),
                     (char*) gatheredResults.get(),
                     sizeof( ResultType ),
                     communicator );

      auto fetch = [ &gatheredResults ]( IndexType i )
      {
+2 −1
Original line number Diff line number Diff line
@@ -70,7 +70,8 @@ printStackBacktrace( std::ostream& out = std::cout, unsigned int max_frames = 64

         // mangled name is now in [begin_name, begin_offset) and caller
         // offset in [begin_offset, end_offset).
         std::cout << "  " << i << " " << symbollist.get()[ i ] << " : " << TNL::detail::demangle( begin_name ) << "+" << begin_offset << "\n";
         std::cout << "  " << i << " " << symbollist.get()[ i ] << " : " << TNL::detail::demangle( begin_name ) << "+"
                   << begin_offset << "\n";
      }
      else {
         // couldn't parse the line? print the whole line.
+2 −1
Original line number Diff line number Diff line
@@ -153,7 +153,8 @@ VTIWriter< Mesh >::writeDataArray( const Array& array, const std::string& name,
{
   // use a host buffer if direct access to the array elements is not possible
   if( std::is_same< typename Array::DeviceType, Devices::Cuda >::value ) {
      using HostArray = TNL::Containers::Array< std::remove_const_t< typename Array::ValueType >, Devices::Host, typename Array::IndexType >;
      using HostArray =
         TNL::Containers::Array< std::remove_const_t< typename Array::ValueType >, Devices::Host, typename Array::IndexType >;
      HostArray hostBuffer;
      hostBuffer = array;
      writeDataArray( hostBuffer, name, numberOfComponents );