voice_audio_multi/include/engine/framework/runtime/parallel_session.h
Fabio c36510c21e
Some checks failed
Linux Build / Linux cpu (push) Has been cancelled
Linux Build / Linux cpu-clang (push) Has been cancelled
Linux Build / Linux vulkan (push) Has been cancelled
mac-build / macOS CPU (push) Has been cancelled
Nix Build / Nix (cpu) (push) Has been cancelled
Nix Build / Nix (vulkan) (push) Has been cancelled
windows-build / Windows CPU (push) Has been cancelled
Initial import: audio.cpp with Orange Pi documentation
2026-11-04 19:05:22 +01:00

25 lines
927 B
C++

#pragma once
#include <cstddef>
#include <memory>
namespace engine::runtime {
class IVoiceTaskSession;
inline constexpr size_t kMaxParallelSessions = 16;
// Explicit opt-in for this session's backend, task, mode and options. The capacity
// includes the primary session; 1 means parallel execution is unsupported.
// Clones share immutable device weights, but own their execution contexts,
// graphs, caches, stream state, callbacks and RNG. They must implement the same
// task interfaces as the primary. Creation occurs before inference starts and
// may throw; the primary remains alive until every clone has been destroyed.
class IParallelVoiceTaskSessionFactory {
public:
virtual ~IParallelVoiceTaskSessionFactory() = default;
virtual size_t parallel_session_capacity() const noexcept = 0;
virtual std::unique_ptr<IVoiceTaskSession> create_parallel_session() const = 0;
};
} // namespace engine::runtime