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

Method mem_size

crates/cust/src/memory/array.rs:46–55  ·  view source on GitHub ↗

The size of this array format in bytes.

(&self)

Source from the content-addressed store, hash-verified

44impl ArrayFormat {
45 /// The size of this array format in bytes.
46 pub fn mem_size(&self) -> usize {
47 use ArrayFormat::*;
48
49 match self {
50 U8 | I8 => 1,
51 U16 | I16 => 2,
52 U32 | I32 | F32 => 4,
53 F64 => 8,
54 }
55 }
56}
57
58mod private {

Callers 3

copy_fromMethod · 0.80
copy_toMethod · 0.80
as_host_vecMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected