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
32 lines
806 B
C++
32 lines
806 B
C++
#pragma once
|
|
|
|
#include "engine/community_models/realtime_reuse/assets.h"
|
|
#include "engine/framework/core/execution_context.h"
|
|
|
|
#include <array>
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
namespace engine::models::realtime_reuse {
|
|
|
|
struct Config {
|
|
int exit_layer = 8;
|
|
int lookahead_frames = 0;
|
|
};
|
|
|
|
class Runtime {
|
|
public:
|
|
Runtime(std::shared_ptr<const Assets> assets, core::ExecutionContext & execution,
|
|
assets::TensorStorageType storage, Config config);
|
|
~Runtime();
|
|
void reset();
|
|
std::array<std::vector<float>, 3> infer(const std::vector<float> & features,
|
|
int64_t frames, int64_t bins, bool streaming, bool first = false);
|
|
const Config & config() const;
|
|
|
|
private:
|
|
class Impl;
|
|
std::unique_ptr<Impl> impl_;
|
|
};
|
|
|
|
} // namespace engine::models::realtime_reuse
|