We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa97e44 commit bee31adCopy full SHA for bee31ad
1 file changed
expander_compiler/src/zkcuda/proving_system/expander_local_deferred/api.rs
@@ -261,8 +261,10 @@ fn dump_circuits_for_gpu<F: gkr_engine::FieldEngine>(
261
gf.write_all(&(gate.o_id as u32).to_le_bytes()).unwrap();
262
gf.write_all(&(gate.i_ids[0] as u32).to_le_bytes()).unwrap();
263
gf.write_all(&(gate.i_ids[1] as u32).to_le_bytes()).unwrap();
264
- // coef is M31, extract .v field via unsafe transmute
265
- let coef_bytes: [u8; 4] = unsafe { std::mem::transmute(gate.coef) };
+ // coef is CircuitField (M31 = 4 bytes)
+ let coef_bytes: &[u8] = unsafe {
266
+ std::slice::from_raw_parts(&gate.coef as *const _ as *const u8, 4)
267
+ };
268
gf.write_all(&coef_bytes).unwrap();
269
}
270
0 commit comments