Use volatile memory to copy elements from self into dst:
(&self, dst: &mut [T])
| 188 | |
| 189 | // Use volatile memory to copy elements from self into dst: |
| 190 | pub fn cp_into_slice(&self, dst: &mut [T]) |
| 191 | where |
| 192 | T: Copy, |
| 193 | { |
| 194 | assert_eq!(self.reference.len(), dst.len(), "DEST/SRC SLICES HAVE DIFFERING LENGTHS"); |
| 195 | unsafe |
| 196 | { |
| 197 | intrinsics::volatile_copy_nonoverlapping_memory(dst.as_mut_ptr(), self.reference.as_ptr(), self.reference.len()); |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | // Use volatile memory to copy elements from src into self: |
| 202 | pub fn cp_from_slice(&mut self, src: &[T]) |