diff --git a/src/TNL/Algorithms/Segments/CSRAdaptiveKernel.h b/src/TNL/Algorithms/Segments/CSRAdaptiveKernel.h index d6c3f2b92dccacc72c6e48387e23ac24fc07ba1f..58710a88355f8db94d6bd80d5c22985a76646164 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 8a8d7cd94b77f889a602f361a41a18508d473107..d0217b57b546ad082dca96550258f8611cc04333 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;