MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / copy

Method copy

crates/blastoff/src/level1.rs:285–293  ·  view source on GitHub ↗

Copies `n` elements from `x` into `y`, overriding any previous data inside `y`. # Panics Panics if `x` or `y` are not large enough for the requested amount of elements. # Example ``` # fn main() -> Result<(), Box > { # let _a = cust::quick_init()?; # use blastoff::CublasContext; # use cust::prelude::*; # use cust::memory::DeviceBox; # use cust::util::SliceExt; # let strea

(
        &mut self,
        stream: &Stream,
        n: usize,
        x: &impl GpuBuffer<T>,
        y: &mut impl GpuBuffer<T>,
    )

Source from the content-addressed store, hash-verified

283 /// # }
284 /// ```
285 pub fn copy<T: Level1>(
286 &mut self,
287 stream: &Stream,
288 n: usize,
289 x: &impl GpuBuffer<T>,
290 y: &mut impl GpuBuffer<T>,
291 ) -> Result {
292 self.copy_strided(stream, n, x, None, y, None)
293 }
294
295 /// Same as [`CublasContext::dot`] but with an explicit stride.
296 ///

Callers

nothing calls this directly

Calls 1

copy_stridedMethod · 0.80

Tested by

no test coverage detected