Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LVARRAY_ERROR_IF_PRINTF() macro to prinnt fancyer messages on errors #255

Closed
wants to merge 26 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
uncrustify
  • Loading branch information
Xavier Lacoste committed Apr 12, 2022

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 652b467276ab4b1cf72f6a34302b2024e5fdb3a5
4 changes: 2 additions & 2 deletions src/indexing.hpp
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ struct ConditionalMultiply
*/
template< typename A, typename B >
static inline LVARRAY_HOST_DEVICE constexpr auto multiply( A const a, B const b )
{ return integerConversion< std::size_t >( a ) * integerConversion< std:size_t >( b ); }
{ return integerConversion< std::size_t >( a ) * integerConversion< std::size_t >( b ); }
};

/**
@@ -123,7 +123,7 @@ LVARRAY_HOST_DEVICE inline constexpr
std::size_t getLinearIndex( INDEX_TYPE const * const LVARRAY_RESTRICT strides, INDEX const index, REMAINING_INDICES const ... indices )
{
return ConditionalMultiply< USD == 0 >::multiply( index, strides[ 0 ] ) +
getLinearIndex< USD - 1, INDEX_TYPE, REMAINING_INDICES... >( strides + 1, indices ... );
getLinearIndex< USD - 1, INDEX_TYPE, REMAINING_INDICES ... >( strides + 1, indices ... );
}

/// @return A string representing an empty set of indices.