@@ -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,15 +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
1859+ } else {
1860+ static_assert (cuco::dependent_false<Value>,
1861+ " No valid atomic CAS path: 16-byte key in a key-only container must be "
1862+ " packable (have unique object representations) and target sm_90+." );
18591863 }
18601864 }
18611865
@@ -1889,11 +1893,12 @@ class open_addressing_ref_impl {
18891893 return packed_cas (address, expected, desired);
18901894 }
18911895#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." );
1896+ else if constexpr (has_payload) {
18961897 return cas_dependent_write (address, expected, desired);
1898+ } else {
1899+ static_assert (cuco::dependent_false<Value>,
1900+ " No valid atomic CAS path: 16-byte key in a key-only container must be "
1901+ " packable (have unique object representations) and target sm_90+." );
18971902 }
18981903 }
18991904
0 commit comments