BlobFormat.hpp
Go to the documentation of this file.
1 // Modified for internal use of depthai-core library
2 // Luxonis - December 2020
3 
4 // Copyright (C) 2018-2020 Intel Corporation
5 // SPDX-License-Identifier: Apache-2.0
6 //
7 
8 #pragma once
9 
10 #include <cstdint>
11 #include <cstddef>
12 
13 #ifdef _MSC_VER
14 # define VPU_PACKED(body) __pragma(pack(push, 1)) struct body __pragma(pack(pop))
15 #elif defined(__GNUC__)
16 # define VPU_PACKED(body) struct __attribute__((packed)) body
17 #endif
18 
19 
20 namespace dai {
21 
22 // It is one of float NaN and prime number
23 const uint32_t STAGE_BORDER_SYMBOL = 0x7f83ff19;
24 
25 const uint32_t EI_NIDENT = 16;
26 
27 VPU_PACKED(ElfN_Ehdr {
28  uint8_t e_ident[EI_NIDENT];
29  uint16_t e_type;
30  uint16_t e_machine;
31  uint32_t e_version;
32  uint32_t e_entry;
33  uint32_t e_phoff;
34  uint32_t e_shoff;
35  uint32_t e_flags;
36  uint16_t e_ehsize;
37  uint16_t e_phentsize;
38  uint16_t e_phnum;
39  uint16_t e_shentsize;
40  uint16_t e_shnum;
41  uint16_t e_shstrndx;
42 };)
43 
44 VPU_PACKED(mv_blob_header {
45  uint32_t magic_number;
46  uint32_t file_size;
47  uint32_t blob_ver_major;
48  uint32_t blob_ver_minor;
49  uint32_t inputs_count;
50  uint32_t outputs_count;
51  uint32_t stages_count;
52  uint32_t inputs_size;
53  uint32_t outputs_size;
54  uint32_t batch_size;
55  uint32_t bss_mem_size;
56  uint32_t number_of_cmx_slices;
57  uint32_t number_of_shaves;
58  uint32_t has_hw_stage;
59  uint32_t has_shave_stage;
60  uint32_t has_dma_stage;
61  uint32_t input_info_section_offset;
62  uint32_t output_info_section_offset;
63  uint32_t stage_section_offset;
64  uint32_t const_data_section_offset;
65 };)
66 
67 VPU_PACKED(mv_stage_header {
68  uint32_t stage_length;
69  uint32_t stage_type;
70  uint32_t numShaves;
71 };)
72 
73 } // namespace vpu
dai::STAGE_BORDER_SYMBOL
const uint32_t STAGE_BORDER_SYMBOL
Definition: BlobFormat.hpp:23
dai::EI_NIDENT
const uint32_t EI_NIDENT
Definition: BlobFormat.hpp:25
dai::VPU_PACKED
VPU_PACKED(ElfN_Ehdr { uint8_t e_ident[EI_NIDENT];uint16_t e_type;uint16_t e_machine;uint32_t e_version;uint32_t e_entry;uint32_t e_phoff;uint32_t e_shoff;uint32_t e_flags;uint16_t e_ehsize;uint16_t e_phentsize;uint16_t e_phnum;uint16_t e_shentsize;uint16_t e_shnum;uint16_t e_shstrndx;};) VPU_PACKED(mv_blob_header
Definition: BlobFormat.hpp:27
dai
Definition: CameraExposureOffset.hpp:6


depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:18