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

Method from_array_desc

crates/cust/src/texture.rs:268–279  ·  view source on GitHub ↗
(desc: &ArrayDescriptor)

Source from the content-addressed store, hash-verified

266
267impl ResourceViewDescriptor {
268 pub fn from_array_desc(desc: &ArrayDescriptor) -> Self {
269 Self {
270 format: ResourceViewFormat::from_array_format(desc.format(), desc.num_channels()),
271 width: desc.width(),
272 height: desc.height(),
273 depth: desc.depth(),
274 first_mipmap_level: 0,
275 last_mipmap_level: 0,
276 first_layer: 0,
277 last_layer: 0,
278 }
279 }
280
281 pub fn to_raw(self) -> CUDA_RESOURCE_VIEW_DESC {
282 let ResourceViewDescriptor {

Callers

nothing calls this directly

Calls 5

num_channelsMethod · 0.80
depthMethod · 0.80
formatMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected