Skip to content

Commit 06c25e9

Browse files
committed
note
Signed-off-by: Robert Kruszewski <[email protected]>
1 parent 52e335b commit 06c25e9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎vortex-buffer/src/alignment.rs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ impl Alignment {
2020
pub const HOST_COPY: Self = Alignment::new(256);
2121

2222
/// Default alignment for all buffers.
23+
///
24+
/// Chosen to be larger than any SIMD register (e.g. AVX-512's 64-byte
25+
/// registers) so that buffers can be processed with vectorized loads/stores
26+
/// without alignment fixups, and to match the alignment guarantees of the
27+
/// CUDA allocator (256 bytes) so host buffers can be copied to/from device
28+
/// memory without re-alignment.
2329
pub const DEFAULT_ALIGNMENT: Self = Alignment::new(256);
2430

2531
/// Create a new alignment.

0 commit comments

Comments
 (0)