MCPcopy Create free account
hub / github.com/YuminosukeSato/ironkernel / byte_size

Method byte_size

src/buffer/inner.rs:15–23  ·  view source on GitHub ↗

Size in bytes of a single element.

(self)

Source from the content-addressed store, hash-verified

13impl DType {
14 /// Size in bytes of a single element.
15 pub fn byte_size(self) -> usize {
16 match self {
17 DType::F32 => 4,
18 DType::F64 => 8,
19 DType::I32 => 4,
20 DType::I64 => 8,
21 DType::Bool => 1,
22 }
23 }
24
25 /// Human-readable name.
26 pub fn name(self) -> &'static str {

Callers 1

byte_lenMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected