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

Method as_1d_array

crates/cust/src/util.rs:75–82  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

73 }
74
75 fn as_1d_array(&self) -> CudaResult<ArrayObject>
76 where
77 T: ArrayPrimitive,
78 {
79 let mut arr = ArrayObject::new_1d(self.len(), T::array_format(), 1)?;
80 arr.copy_from(self)?;
81 Ok(arr)
82 }
83
84 fn as_2d_array(&self, width: usize, height: usize) -> CudaResult<ArrayObject>
85 where

Callers 2

as_1d_textureMethod · 0.80
as_1d_surfaceMethod · 0.80

Calls 2

lenMethod · 0.45
copy_fromMethod · 0.45

Tested by

no test coverage detected