From e861378fabe0a0398189874125a9390bb66ad5fc Mon Sep 17 00:00:00 2001 From: mitchellhansen Date: Wed, 29 Jul 2020 17:04:28 -0700 Subject: [PATCH] sync --- src/compute/managed/compu_buffer.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compute/managed/compu_buffer.rs b/src/compute/managed/compu_buffer.rs index 26cddc4a..f8020ef5 100644 --- a/src/compute/managed/compu_buffer.rs +++ b/src/compute/managed/compu_buffer.rs @@ -34,8 +34,9 @@ impl CompuBuffers { CpuAccessibleBuffer::from_iter(device.clone(), BufferUsage::all(), false, data_iter).unwrap() }; + let output_data = vec![0; data_length as usize]; let output_buffer = { - let mut buff = data.iter(); + let mut buff = output_data.iter(); let data_iter = (0..data_length).map(|n| *(buff.next().unwrap())); CpuAccessibleBuffer::from_iter(device.clone(), BufferUsage::all(), false, data_iter).unwrap() };