Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
generation_routing.hpp File Reference
#include <pulp/platform/device_capability.hpp>
#include <cstddef>
#include <cstdint>

Go to the source code of this file.

Namespaces

namespace  pulp
namespace  pulp::format
 What the product grants a device: the quota table indexed by capability tier and live thermal state.
namespace  pulp::format::detail
 The plugin processor interface.

Enumerations

enum class  pulp::format::GenerationJobClass : std::uint8_t { pulp::format::ProposalGeneration = 0 , pulp::format::ArtifactPlayback = 1 , pulp::format::ReceiptRendering = 2 }
 A kind of generation work, distinguished by what it costs and what it needs. More...
enum class  pulp::format::GenerationRoute : std::uint8_t { pulp::format::OnDevice = 0 , pulp::format::Server = 1 , pulp::format::QueueForLater = 2 }
 Where a job is sent. More...
enum class  pulp::format::GenerationHostContext : std::uint8_t { pulp::format::Standalone = 0 , pulp::format::AudioUnitV3 = 1 }
 The surface the product is running as. More...
enum class  pulp::format::GenerationConnectivity : std::uint8_t { pulp::format::Online = 0 , pulp::format::Offline = 1 }
 Whether the device can reach a server right now. More...

Functions

constexpr GenerationRoute pulp::format::generation_route (platform::DeviceCapabilityTier tier, platform::ThermalState thermal, GenerationJobClass job, GenerationHostContext context, GenerationConnectivity connectivity) noexcept
 Returns where job runs on a device at tier and thermal, running as context with connectivity.
constexpr bool pulp::format::runs_inference_on_device (GenerationJobClass job, GenerationRoute route) noexcept
 Returns whether route performs inference on this device.

Variables

constexpr std::size_t pulp::format::kGenerationJobClassCount = 3
constexpr std::size_t pulp::format::kGenerationRouteCount = 3
constexpr std::size_t pulp::format::kGenerationHostContextCount = 2
constexpr std::size_t pulp::format::kGenerationConnectivityCount = 2
constexpr GenerationRoute pulp::format::detail::kProposalRouteTable [platform::kDeviceCapabilityTierCount][platform::kThermalStateCount]
 Baseline route for ProposalGeneration, indexed [tier][thermal state].