Closed SKYSCRAPERS1999 closed 5 years ago
Fix a fatal bug of multiplying size_of::<T>() twice in putmem, getmem
size_of::<T>()
putmem
getmem
unsafe fn putmem(&self, target: *mut u8, source: *const u8, len: usize, pe: usize) { if shmemx::my_pe() == self.rank { libc::memcpy(target as *mut c_void, source as *const T as *const c_void, len);// * size_of::<T>()); } else { shmemx::shmem_putmem(target, source, len as size_t, self.rank as c_int); } } unsafe fn getmem(&self, target: *mut u8, source: *const u8, len: usize, pe: usize) { if shmemx::my_pe() == self.rank { libc::memcpy(target as *mut c_void, source as *const T as *const c_void, len);// * size_of::<T>()); } else { shmemx::shmem_getmem(target, source, len as size_t, self.rank as c_int); } }
Fix a fatal bug of multiplying
size_of::<T>()
twice inputmem
,getmem