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

Method read_f32

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

Read f32 data from the buffer via mapped pointer.

(&self, count: usize)

Source from the content-addressed store, hash-verified

51
52 /// Read f32 data from the buffer via mapped pointer.
53 fn read_f32(&self, count: usize) -> Vec<f32> {
54 let byte_count = count * 4;
55 assert!(byte_count as u64 <= self.size);
56 unsafe {
57 let slice = std::slice::from_raw_parts(self.mapped_ptr as *const f32, count);
58 slice.to_vec()
59 }
60 }
61
62 /// Write u32 data into the buffer.
63 fn write_u32(&self, data: &[u32]) {

Callers 2

dispatch_computeMethod · 0.80
tensor_matmulMethod · 0.80

Calls 1

to_vecMethod · 0.80

Tested by

no test coverage detected