@@ -92,6 +92,9 @@ class open_addressing_ref_impl {
9292 static_assert (sizeof (Key) <= cuco::detail::max_key_size,
9393 " Key size exceeds the maximum supported size (8 bytes, or 16 with sm_90+)." );
9494
95+ static_assert (sizeof (typename StorageRef::value_type) <= cuco::detail::max_slot_size,
96+ " Slot size exceeds the maximum supported size (16 bytes, or 32 with sm_90+)." );
97+
9598 static_assert (
9699 cuco::is_bitwise_comparable_v<Key>,
97100 " Key type must have unique object representations or have been explicitly declared as safe for "
@@ -1847,16 +1850,16 @@ class open_addressing_ref_impl {
18471850 return packed_cas (address, expected, desired);
18481851 }
18491852#endif
1850- else {
1851- static_assert (
1852- has_payload,
1853- " 16-byte key types in key-only containers require sm_90+ for 128-bit atomic CAS." );
1853+ else if constexpr (has_payload) {
18541854#if (__CUDA_ARCH__ < 700)
18551855 return cas_dependent_write (address, expected, desired);
18561856#else
18571857 return back_to_back_cas (address, expected, desired);
18581858#endif
18591859 }
1860+ // Unreachable: the class-level max_key_size static_assert rejects 16-byte
1861+ // keys in key-only containers when CUCO_HAS_128BIT_ATOMICS is not defined.
1862+ __builtin_unreachable ();
18601863 }
18611864
18621865 /* *
@@ -1889,12 +1892,12 @@ class open_addressing_ref_impl {
18891892 return packed_cas (address, expected, desired);
18901893 }
18911894#endif
1892- else {
1893- static_assert (
1894- has_payload,
1895- " 16-byte key types in key-only containers require sm_90+ for 128-bit atomic CAS." );
1895+ else if constexpr (has_payload) {
18961896 return cas_dependent_write (address, expected, desired);
18971897 }
1898+ // Unreachable: the class-level max_key_size static_assert rejects 16-byte
1899+ // keys in key-only containers when CUCO_HAS_128BIT_ATOMICS is not defined.
1900+ __builtin_unreachable ();
18981901 }
18991902
19001903 /* *
0 commit comments