-
Notifications
You must be signed in to change notification settings - Fork 960
Expand file tree
/
Copy pathVulkanDelegateHeader.h
More file actions
40 lines (31 loc) · 930 Bytes
/
VulkanDelegateHeader.h
File metadata and controls
40 lines (31 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <executorch/runtime/core/result.h>
namespace executorch {
namespace backends {
namespace vulkan {
// Byte decoding utilities
uint64_t getUInt64LE(const uint8_t* data);
uint32_t getUInt32LE(const uint8_t* data);
uint32_t getUInt16LE(const uint8_t* data);
// Bool is serialized as a single byte
bool getBool(const uint8_t* data);
struct VulkanDelegateHeader {
bool is_valid() const;
static executorch::runtime::Result<VulkanDelegateHeader> parse(
const void* data);
uint32_t header_size;
uint32_t flatbuffer_offset;
uint32_t flatbuffer_size;
uint32_t bytes_offset;
uint64_t bytes_size;
};
} // namespace vulkan
} // namespace backends
} // namespace executorch