From 728603e382e0bbea5996f5fde52a9c9952c9c3b0 Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Mon, 18 Apr 2016 00:51:54 +0300 Subject: [PATCH] squash with #37 --- src/tensor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tensor.rs b/src/tensor.rs index 6f39ea43..c423a448 100644 --- a/src/tensor.rs +++ b/src/tensor.rs @@ -458,7 +458,7 @@ impl SharedTensor { } /// Drops memory allocation on specified device. Returns error - pub fn drop_at(&mut self, device: &DeviceType) -> Result<(), Error> { + pub fn drop_device(&mut self, device: &DeviceType) -> Result<(), Error> { match self.get_location_index(device) { Some(i) => { self.locations.borrow_mut().remove(i); @@ -492,7 +492,7 @@ impl SharedTensor { } /// Errors than can occur when synchronizing memory. -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] pub enum Error { /// No copy on source device. MissingSource(&'static str),