pub trait Copy<F> {
// Required methods
fn copy(
&self,
x: &mut SharedTensor<F>,
y: &mut SharedTensor<F>,
) -> Result<(), Error>;
fn copy_plain(
&self,
x: &SharedTensor<F>,
y: &mut SharedTensor<F>,
) -> Result<(), Error>;
}Expand description
Provides the copy operation.
Required Methods§
Sourcefn copy(
&self,
x: &mut SharedTensor<F>,
y: &mut SharedTensor<F>,
) -> Result<(), Error>
fn copy( &self, x: &mut SharedTensor<F>, y: &mut SharedTensor<F>, ) -> Result<(), Error>
Copies x.len() elements of vector x into vector y with complete memory management.
Saves the result to y.
This is a Level 1 BLAS operation.
For a no-memory managed version see copy_plain.
Sourcefn copy_plain(
&self,
x: &SharedTensor<F>,
y: &mut SharedTensor<F>,
) -> Result<(), Error>
fn copy_plain( &self, x: &SharedTensor<F>, y: &mut SharedTensor<F>, ) -> Result<(), Error>
Copies x.len() elements of vector x into vector y without any memory management.
Saves the result to y.
This is a Level 1 BLAS operation.
Attention:
For a correct computation result, you need to manage the memory allocation and synchronization yourself.
For a memory managed version see copy.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".