Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor/tensor: refactor synchronization and memory access interface
Remove methods `sync()`, `get()`, `get_mut()`, `remove_copy()` of `SharedTensor` and introduce new set of methods: `read()`, `read_write()`, `write_only()`, `drop_at()`. Signature of `SharedTensor::new()` has also changed. New API has following benefits: - limited checks of use of uninitialized memory, - better memory tracking: several memories can be simultaneously marked as up-to-date, so some synchronization operations might be skipped, - backing memory is automatically allocated on the first use and added to `SharedTensor`, even if it's immutable. Mutability is required only for reshaping, modifying actual data and dropping memories. Rationale and design decisions are discussed at the corresponding bugtracker issue. BREAKING CHANGE: sync and memory management API of `SharedTensor` CLOSE: autumnai#37
- Loading branch information