Class anira::ContextConfig#
-
class ContextConfig#
The process: the inference thread pool, logging, the devices anira may use. Move-only.
Public Functions
-
inline ~ContextConfig()#
-
ContextConfig(const ContextConfig&) = delete#
-
ContextConfig &operator=(const ContextConfig&) = delete#
-
inline ContextConfig(ContextConfig &&other) noexcept#
-
inline ContextConfig &operator=(ContextConfig &&other) noexcept#
-
inline ContextConfig &threads(uint32_t num_threads, anira_wait_strategy wait = ANIRA_WAIT_SPIN_BACKOFF)#
The thread pool: ANIRA_THREADS_AUTO sizes it, 0 means the host brings its threads.
-
inline ContextConfig &log_level(anira_log_level level)#
-
inline ContextConfig &log_drain(anira_log_drain drain, uint32_t interval_ms = 10)#
-
inline ContextConfig &log_queue_capacity(uint32_t capacity)#
-
inline ContextConfig &log_flags(uint32_t flags)#
-
inline ContextConfig &log_sink(anira_log_fn callback, void *user_data = nullptr)#
The sink callback and its user data (the raw pair at this pre-release).
-
inline ContextConfig &log(const anira_log_desc &desc)#
The one-shot descriptor equal to the five scalar log setters.
-
inline ContextConfig &cuda(const anira_cuda_desc &desc)#
-
inline ContextConfig &cuda(const anira_cuda_desc *desc)#
The pointer form: NULL clears the block.
-
inline ContextConfig &gl(const anira_gl_desc &desc)#
-
inline ContextConfig &gl(const anira_gl_desc *desc)#
The pointer form: NULL clears the block.
-
inline ContextConfig &vulkan(const anira_vulkan_desc &desc)#
-
inline ContextConfig &vulkan(const anira_vulkan_desc *desc)#
The pointer form: NULL clears the block.
-
inline ContextConfig &metal(const anira_metal_desc &desc)#
-
inline ContextConfig &metal(const anira_metal_desc *desc)#
The pointer form: NULL clears the block.
-
inline ContextConfig &d3d12(const anira_d3d12_desc &desc)#
-
inline ContextConfig &d3d12(const anira_d3d12_desc *desc)#
The pointer form: NULL clears the block.
-
inline ContextConfig &webgpu(const anira_webgpu_desc &desc)#
-
inline ContextConfig &webgpu(const anira_webgpu_desc *desc)#
The pointer form: NULL clears the block.
-
template<class Ext>
inline ContextConfig &ext(const Ext &value)#
-
inline ContextConfig &ext_json(std::string_view kind, std::string_view utf8)#
-
inline std::string to_json() const#
-
inline bool upgraded() const noexcept#
-
inline const anira_context_config *native() const noexcept#
-
inline anira_context_config *native() noexcept#
Public Static Functions
-
static inline ContextConfig from_json(std::string_view utf8)#
A context file (section 8.2); a 2.x document’s context_config root is upgraded.
-
static inline ContextConfig from_file(const std::filesystem::path &path)#
-
inline ~ContextConfig()#