Skip to content

Commit 9584092

Browse files
committed
length
Signed-off-by: Robert Kruszewski <github@robertk.io>
1 parent 49d0614 commit 9584092

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vortex-gpu/src/rle_decompress.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ impl<V: DeviceRepr + NativePType, I, O> GPUTask for RLETask<V, I, O> {
4646
}
4747

4848
fn export_result(&mut self) -> VortexResult<Canonical> {
49-
let mut buffer = BufferMut::<V>::with_capacity(self.len);
50-
unsafe { buffer.set_len(self.len) }
49+
let rounded_len = self.len.next_multiple_of(1024);
50+
let mut buffer = BufferMut::<V>::with_capacity(rounded_len);
51+
unsafe { buffer.set_len(rounded_len) }
5152

5253
self.stream
5354
.memcpy_dtoh(&self.output, &mut buffer)

0 commit comments

Comments
 (0)