Skip to content

Commit

Permalink
Refactor/tensor: refactor synchronization and memory access interface
Browse files Browse the repository at this point in the history
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
alexandermorozov committed Apr 17, 2016
1 parent c7cdfe7 commit 08eb22a
Show file tree
Hide file tree
Showing 2 changed files with 206 additions and 149 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ enum_primitive = "0.1.0"
byteorder = "0.4"
num = "0.1"
lazy_static = "0.1.15"
linear-map = "0.0.4"

clippy = { version = "0.0.27", optional = true }

Expand Down
Loading

0 comments on commit 08eb22a

Please sign in to comment.