sensor_pipeline/codegen.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // SPDX-License-Identifier: BSD-3-Clause | ||
| 2 | #pragma once | ||
| 3 | |||
| 4 | #include <cstdint> | ||
| 5 | #include <string> | ||
| 6 | #include <vector> | ||
| 7 | |||
| 8 | #include "chrono_batch_render/sensor_pipeline/definition.h" | ||
| 9 | |||
| 10 | namespace chrono::batch_render::sensor_pipeline { | ||
| 11 | |||
| 12 | enum class DispatchShape : uint8_t { | ||
| 13 | Elements, | ||
| 14 | ReduceGroups, | ||
| 15 | Captures, | ||
| 16 | }; | ||
| 17 | |||
| 18 | 380 | struct GeneratedKernel { | |
| 19 | std::string entry; | ||
| 20 | DispatchShape shape = DispatchShape::Elements; | ||
| 21 | }; | ||
| 22 | |||
| 23 | 69 | struct GeneratedSensorPipeline { | |
| 24 | std::string module; | ||
| 25 | std::string path; | ||
| 26 | std::string source; | ||
| 27 | std::vector<GeneratedKernel> kernels; | ||
| 28 | std::vector<uint32_t> slots; | ||
| 29 | |||
| 30 | std::vector<std::string> Entries() const; | ||
| 31 | }; | ||
| 32 | |||
| 33 | GeneratedSensorPipeline GenerateSensorPipeline(const SensorPipelineDefinition& definition, | ||
| 34 | const NodeRegistry& registry); | ||
| 35 | |||
| 36 | } | ||
| 37 |