include/entropic/inference/profile_registry.h

← API

include/entropic/inference/profile_registry.h

entropic::ProfileRegistry

Centralized registry for named GPU resource profiles.

void entropic::ProfileRegistry::load_bundled()

Initialize with bundled profiles (maximum, balanced, background, minimal).

Initialize with bundled profiles. Computes hardware-dependent thread counts at call time: background profile uses max(1, hardware_concurrency/2) Falls back to n_threads=2 if hardware_concurrency() returns 0 Safe to call multiple times (idempotent clears and reloads). Computes hardware-dependent thread counts for the background profile at call time. If hardware_concurrency() returns 0 (unknown platform), falls back to 2 threads.

bool entropic::ProfileRegistry::register_profile(const GPUResourceProfile &profile)

Register a custom profile.

Parameters
  • profile — Profile to register. profile.name is the key.
Returns
true on success. false if name already exists.

bool entropic::ProfileRegistry::deregister(const std::string &name)

Remove a profile by name.

Parameters
  • name — Profile name.
Returns
true if removed. false if not found.

GPUResourceProfile entropic::ProfileRegistry::get(const std::string &name) const

Get a profile by name.

Get a profile by name with fallback.

Parameters
  • name — Profile name.
Returns
  • Profile struct. Returns the "balanced" profile if name not found (with WARNING log). Returns default-constructed profile if "balanced" also missing (should never happen after load_bundled).
  • Profile struct. Falls back to "balanced" with WARNING on miss.

bool entropic::ProfileRegistry::has(const std::string &name) const

Check if a profile name exists.

Parameters
  • name — Profile name.
Returns
true if registered.

std::vector< std::string > entropic::ProfileRegistry::list() const

List all registered profile names.

Returns
Sorted vector of profile names.

size_t entropic::ProfileRegistry::size() const

Number of registered profiles.

Returns
  • Count of profiles in the registry.
  • Count of profiles.