cuDDL
Loading...
Searching...
No Matches
comparison.cuh
Go to the documentation of this file.
1#pragma once
2
3#include <cuda/std/cstdint>
4
7
8namespace cuddl::detail {
9
15__device__ inline void
16classify(pairwise_counts& target, uint32_t this_score, uint32_t other_score) noexcept {
17 auto const this_zero = static_cast<uint32_t>(this_score == 0U);
18 auto const lt = static_cast<uint32_t>(this_score < other_score);
19 auto const gt = static_cast<uint32_t>(this_score > other_score);
20 auto const eq = 1U - lt - gt;
21 target.both_empty += eq & this_zero;
22 target.lower += lt;
23 target.higher += gt;
24 target.equal += eq & (1U - this_zero);
25}
26
27} // namespace cuddl::detail
__device__ void classify(pairwise_counts &target, uint32_t this_score, uint32_t other_score) noexcept
Classifies one score relative to this into target.
Raw per-bucket classification counts for one sketch pair comparison.