@@ -107,9 +107,9 @@ TEMPLATE_TEST_CASE_SIG("utility storage tests",
107107 cuco::bucket_storage_ref<cuco::pair<Key, Value>, bucket_size, cuco::extent<std::size_t >>;
108108 using bucket_type = typename storage_ref_type::bucket_type;
109109
110- constexpr auto alignment = storage_ref_type::alignment;
111- constexpr auto expected_align =
112- cuda::std::min ( cuda::std::bit_ceil ( sizeof (bucket_type)), std:: size_t { 16 } );
110+ constexpr auto alignment = storage_ref_type::alignment;
111+ constexpr auto expected_align = cuda::std::min ( cuda::std::bit_ceil ( sizeof (bucket_type)),
112+ storage_ref_type::max_vector_load_bytes );
113113
114114 STATIC_REQUIRE (alignment == expected_align);
115115 STATIC_REQUIRE (cuda::std::has_single_bit (alignment));
@@ -120,9 +120,9 @@ TEMPLATE_TEST_CASE_SIG("utility storage tests",
120120 using storage_ref_type = cuco::bucket_storage_ref<Key, bucket_size, cuco::extent<std::size_t >>;
121121 using bucket_type = typename storage_ref_type::bucket_type;
122122
123- constexpr auto alignment = storage_ref_type::alignment;
124- constexpr auto expected_align =
125- cuda::std::min ( cuda::std::bit_ceil ( sizeof (bucket_type)), std:: size_t { 16 } );
123+ constexpr auto alignment = storage_ref_type::alignment;
124+ constexpr auto expected_align = cuda::std::min ( cuda::std::bit_ceil ( sizeof (bucket_type)),
125+ storage_ref_type::max_vector_load_bytes );
126126
127127 STATIC_REQUIRE (alignment == expected_align);
128128 STATIC_REQUIRE (cuda::std::has_single_bit (alignment));
@@ -172,28 +172,9 @@ TEMPLATE_TEST_CASE_SIG("bucket storage alignment with different bucket sizes",
172172 using storage_type =
173173 cuco::bucket_storage<T, BucketSize, cuco::extent<std::size_t >, allocator_type>;
174174 using storage_ref_type = typename storage_type::ref_type;
175- using bucket_type = typename storage_ref_type::bucket_type;
176175
177176 auto allocator = allocator_type{};
178177
179- SECTION (" Alignment constant is power of 2 and capped at 16." )
180- {
181- constexpr auto alignment = storage_ref_type::alignment;
182-
183- STATIC_REQUIRE (cuda::std::has_single_bit (alignment));
184- STATIC_REQUIRE (alignment <= 16 );
185- STATIC_REQUIRE (alignment >= sizeof (T));
186- }
187-
188- SECTION (" Alignment matches expected value." )
189- {
190- constexpr auto alignment = storage_ref_type::alignment;
191- constexpr auto expected =
192- cuda::std::min (cuda::std::bit_ceil (sizeof (bucket_type)), std::size_t {16 });
193-
194- STATIC_REQUIRE (alignment == expected);
195- }
196-
197178 SECTION (" Data pointer is aligned to bucket boundary." )
198179 {
199180 auto s = storage_type (cuco::extent{size}, allocator, cuda::stream_ref{cudaStream_t{nullptr }});
0 commit comments