MCPcopy Create free account
hub / github.com/evilsocket/cake / write_u32

Method write_u32

cake-core/src/backends/vulkan/mod.rs:63–69  ·  view source on GitHub ↗

Write u32 data into the buffer.

(&self, data: &[u32])

Source from the content-addressed store, hash-verified

61
62 /// Write u32 data into the buffer.
63 fn write_u32(&self, data: &[u32]) {
64 let bytes = bytemuck::cast_slice::<u32, u8>(data);
65 assert!(bytes.len() as u64 <= self.size);
66 unsafe {
67 std::ptr::copy_nonoverlapping(bytes.as_ptr(), self.mapped_ptr, bytes.len());
68 }
69 }
70}
71
72// ─── Buffer pool ─────────────────────────────────────────────────────

Callers 4

test_wire_invalid_magicFunction · 0.80
dispatch_computeMethod · 0.80
tensor_matmulMethod · 0.80

Calls 1

as_ptrMethod · 0.80

Tested by 2

test_wire_invalid_magicFunction · 0.64