Skip to content

Commit

Permalink
Merge pull request #97 from wphicks/bug-inline_cuda_memcmp
Browse files Browse the repository at this point in the history
[WIP] Declare non-template functions in bitwise_compare.cuh as inline
  • Loading branch information
jrhemstad authored Jul 19, 2021
2 parents 948d52b + 65383d7 commit b1fea0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/cuco/detail/bitwise_compare.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

namespace cuco {
namespace detail {
__host__ __device__ int cuda_memcmp(void const* __lhs, void const* __rhs, size_t __count)
__host__ __device__ inline int cuda_memcmp(void const* __lhs, void const* __rhs, size_t __count)
{
auto __lhs_c = reinterpret_cast<unsigned char const*>(__lhs);
auto __rhs_c = reinterpret_cast<unsigned char const*>(__rhs);
Expand All @@ -42,15 +42,15 @@ struct bitwise_compare_impl {

template <>
struct bitwise_compare_impl<4> {
__host__ __device__ static bool compare(char const* lhs, char const* rhs)
__host__ __device__ inline static bool compare(char const* lhs, char const* rhs)
{
return *reinterpret_cast<uint32_t const*>(lhs) == *reinterpret_cast<uint32_t const*>(rhs);
}
};

template <>
struct bitwise_compare_impl<8> {
__host__ __device__ static bool compare(char const* lhs, char const* rhs)
__host__ __device__ inline static bool compare(char const* lhs, char const* rhs)
{
return *reinterpret_cast<uint64_t const*>(lhs) == *reinterpret_cast<uint64_t const*>(rhs);
}
Expand Down

0 comments on commit b1fea0c

Please sign in to comment.