compile error squashing #2
This commit is contained in:
parent
e87d116883
commit
42fed15505
1 changed files with 10 additions and 10 deletions
20
src/main.zig
20
src/main.zig
|
@ -19,6 +19,10 @@ pub fn main() void {
|
|||
|
||||
// const alloc = arena.allocator();
|
||||
|
||||
std.fs.cwd().access(hef_file, .{ }) catch |e| {
|
||||
std.debug.panic("Could not open hef file! '{any}'", .{ e });
|
||||
};
|
||||
|
||||
var status: hlo.hailo_status = undefined;
|
||||
var vdevice : hlo.hailo_vdevice = undefined;
|
||||
var hef : hlo.hailo_hef = undefined;
|
||||
|
@ -30,7 +34,6 @@ pub fn main() void {
|
|||
const input_vstreams : [max_edge_layers]hlo.hailo_input_vstream = undefined;
|
||||
var input_vstream_size : usize = max_edge_layers;
|
||||
var output_vstream_size : usize = max_edge_layers;
|
||||
var activated_network_group: hlo.hailo_activated_network_group = undefined;
|
||||
|
||||
|
||||
status = hlo.hailo_create_vdevice(null, &vdevice);
|
||||
|
@ -55,19 +58,16 @@ pub fn main() void {
|
|||
|
||||
assert(input_vstream_size <= max_edge_layers);
|
||||
|
||||
status = hlo.hailo_create_input_vstreams(network_group, @constCast(&input_vstream_params), input_vstream_size, input_vstreams);
|
||||
status = hlo.hailo_create_input_vstreams(network_group, @constCast(&input_vstream_params), input_vstream_size, @constCast(&input_vstreams));
|
||||
assert(status == hlo.HAILO_SUCCESS);
|
||||
|
||||
status = hlo.hailo_create_output_vstreams(network_group, @constCast(&output_vstream_params), output_vstream_size, output_vstreams);
|
||||
status = hlo.hailo_create_output_vstreams(network_group, @constCast(&output_vstream_params), output_vstream_size, @constCast(&output_vstreams));
|
||||
assert(status == hlo.HAILO_SUCCESS);
|
||||
|
||||
status = hlo.activate_network_group(network_group, null, &activated_network_group);
|
||||
assert(status == hlo.HAILO_SUCCESS);
|
||||
|
||||
defer hlo.hailo_release_output_vstreams(output_vstreams, output_vstream_size);
|
||||
defer hlo.hailo_release_input_vstreams(input_vstreams, input_vstream_size);
|
||||
defer hlo.hailo_release_hef(hef);
|
||||
defer hlo.hailo_release_vdevice(vdevice);
|
||||
defer _ = hlo.hailo_release_output_vstreams(@constCast(&output_vstreams), output_vstream_size);
|
||||
defer _ = hlo.hailo_release_input_vstreams(@constCast(&input_vstreams), input_vstream_size);
|
||||
defer _ = hlo.hailo_release_hef(hef);
|
||||
defer _ = hlo.hailo_release_vdevice(vdevice);
|
||||
|
||||
std.debug.print("output vstream size is: {any}", .{output_vstream_size});
|
||||
|
||||
|
|
Loading…
Reference in a new issue