Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::ProfileRegistry Class Reference

Centralized registry for named GPU resource profiles. More...

#include <entropic/inference/profile_registry.h>

Public Member Functions

void load_bundled ()
 Initialize with bundled profiles (maximum, balanced, background, minimal).
 
bool register_profile (const GPUResourceProfile &profile)
 Register a custom profile.
 
bool deregister (const std::string &name)
 Remove a profile by name.
 
GPUResourceProfile get (const std::string &name) const
 Get a profile by name.
 
bool has (const std::string &name) const
 Check if a profile name exists.
 
std::vector< std::string > list () const
 List all registered profile names.
 
size_t size () const
 Number of registered profiles.
 

Detailed Description

Centralized registry for named GPU resource profiles.

Single concrete class (no three-layer hierarchy – one implementation, like GrammarRegistry, AdapterManager, and HookRegistry).

Version
1.9.7

Definition at line 41 of file profile_registry.h.

Member Function Documentation

◆ deregister()

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

Remove a profile by name.

Parameters
nameProfile name.
Returns
true if removed. false if not found.
Version
1.9.7
Parameters
nameProfile name.
Returns
true if removed. false if not found.

Definition at line 87 of file profile_registry.cpp.

◆ get()

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

Get a profile by name.

Get a profile by name with fallback.

Parameters
nameProfile 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).
Version
1.9.7
Parameters
nameProfile name.
Returns
Profile struct. Falls back to "balanced" with WARNING on miss.

Definition at line 105 of file profile_registry.cpp.

◆ has()

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

Check if a profile name exists.

Parameters
nameProfile name.
Returns
true if registered.
Version
1.9.7
Parameters
nameProfile name.
Returns
true if registered.

Definition at line 129 of file profile_registry.cpp.

◆ list()

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

List all registered profile names.

Returns
Sorted vector of profile names.
Version
1.9.7
Returns
Sorted vector of profile names.

Definition at line 140 of file profile_registry.cpp.

◆ load_bundled()

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).

Version
1.9.7

Computes hardware-dependent thread counts for the background profile at call time. If hardware_concurrency() returns 0 (unknown platform), falls back to 2 threads.

Definition at line 31 of file profile_registry.cpp.

◆ register_profile()

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

Register a custom profile.

Parameters
profileProfile to register. profile.name is the key.
Returns
true on success. false if name already exists.
Version
1.9.7
Parameters
profileProfile to register. profile.name is the key.
Returns
true on success. false if name already exists.

Definition at line 67 of file profile_registry.cpp.

◆ size()

size_t entropic::ProfileRegistry::size ( ) const

Number of registered profiles.

Returns
Count of profiles in the registry.
Version
1.9.7
Returns
Count of profiles.

Definition at line 157 of file profile_registry.cpp.


The documentation for this class was generated from the following files: