added zeroinit for c struct

This commit is contained in:
Nickiel12 2024-10-12 01:13:49 +00:00
parent 4adb49a391
commit ea1d173f24

View file

@ -26,7 +26,7 @@ pub fn main() void {
var status: hlo.hailo_status = undefined;
var vdevice : hlo.hailo_vdevice = undefined;
var hef : hlo.hailo_hef = undefined;
var device_params: hlo.hailo_vdevice_params_t = undefined;
var device_params: hlo.hailo_vdevice_params_t = std.mem.zeroInit(hlo.hailo_vdevice_params_t, .{});
var network_group: hlo.hailo_configured_network_group = undefined;
const input_vstream_params : [max_edge_layers]hlo.hailo_input_vstream_params_by_name_t = undefined;
const output_vstream_params : [max_edge_layers]hlo.hailo_output_vstream_params_by_name_t = undefined;
@ -35,7 +35,6 @@ pub fn main() void {
var input_vstream_size : usize = max_edge_layers;
var output_vstream_size : usize = max_edge_layers;
@memset(device_params, 0);
@memset(&input_vstream_params, 0);
@memset(&output_vstream_params, 0);