From a848a69d56619945e1217749776394c9a6a42df8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Oberhuber?= <oberhuber.tomas@gmail.com>
Date: Fri, 12 Feb 2021 21:21:16 +0100
Subject: [PATCH] Fixing types in adaptive CSR kernel to avoid different types
 comparison warning.

---
 src/TNL/Algorithms/Segments/CSRAdaptiveKernel.h   | 2 +-
 src/TNL/Algorithms/Segments/CSRAdaptiveKernel.hpp | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/TNL/Algorithms/Segments/CSRAdaptiveKernel.h b/src/TNL/Algorithms/Segments/CSRAdaptiveKernel.h
index d6c3f2b92d..58710a8835 100644
--- a/src/TNL/Algorithms/Segments/CSRAdaptiveKernel.h
+++ b/src/TNL/Algorithms/Segments/CSRAdaptiveKernel.h
@@ -99,7 +99,7 @@ struct CSRAdaptiveKernel
                      const Offsets& offsets,
                      const Index size,
                      details::Type &type,
-                     Index &sum );
+                     size_t &sum );
 
       template< int SizeOfValue,
                 typename Offsets >
diff --git a/src/TNL/Algorithms/Segments/CSRAdaptiveKernel.hpp b/src/TNL/Algorithms/Segments/CSRAdaptiveKernel.hpp
index 8a8d7cd94b..d0217b57b5 100644
--- a/src/TNL/Algorithms/Segments/CSRAdaptiveKernel.hpp
+++ b/src/TNL/Algorithms/Segments/CSRAdaptiveKernel.hpp
@@ -122,7 +122,7 @@ findLimit( const Index start,
            const Offsets& offsets,
            const Index size,
            details::Type &type,
-           Index &sum )
+           size_t &sum )
 {
    sum = 0;
    for( Index current = start; current < size - 1; current++ )
@@ -161,7 +161,8 @@ initValueSize( const Offsets& offsets )
    using HostOffsetsType = TNL::Containers::Vector< typename Offsets::IndexType, TNL::Devices::Host, typename Offsets::IndexType >;
    HostOffsetsType hostOffsets( offsets );
    const Index rows = offsets.getSize();
-   Index sum, start( 0 ), nextStart( 0 );
+   Index start( 0 ), nextStart( 0 );
+   size_t sum;
 
    // Fill blocks
    std::vector< details::CSRAdaptiveKernelBlockDescriptor< Index > > inBlocks;
-- 
GitLab