Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shamalgs::IImplVariant Class Referenceabstract

Non-template virtual interface exposed by ImplVariantGlobal, for code that needs to hold or pass around an implementation selector without knowing its alternative types. More...

#include <shamalgs/include/shamalgs/ImplVariant.hpp>

Inheritance diagram for shamalgs::IImplVariant:

Public Member Functions

virtual std::string get_current_config () const =0
virtual std::vector< std::string > get_default_config_list () const =0
 List the available implementations as config json strings, one per alternative.
virtual void set (std::string_view config_json)=0
 Select an implementation from a {"implementation": ..., "parameters": ...} json string.
virtual bool is_set () const =0
 Whether an implementation has been selected yet.
virtual void autoselect (const sham::DeviceScheduler_ptr &sched)=0
 Select the algorithm's default implementation for the device behind sched.

Detailed Description

Non-template virtual interface exposed by ImplVariantGlobal, for code that needs to hold or pass around an implementation selector without knowing its alternative types.

Definition at line 211 of file ImplVariant.hpp.

Member Function Documentation

◆ autoselect()

virtual void shamalgs::IImplVariant::autoselect ( const sham::DeviceScheduler_ptr & sched)
pure virtual

Select the algorithm's default implementation for the device behind sched.

Implemented in shamalgs::ImplVariantGlobal< Alts >.

◆ get_current_config()

virtual std::string shamalgs::IImplVariant::get_current_config ( ) const
pure virtual

Get the currently selected implementation as a single config json string, or a json null if no implementation has been selected yet

Implemented in shamalgs::ImplVariantGlobal< Alts >.

◆ get_default_config_list()

virtual std::vector< std::string > shamalgs::IImplVariant::get_default_config_list ( ) const
pure virtual

List the available implementations as config json strings, one per alternative.

Implemented in shamalgs::ImplVariantGlobal< Alts >.

◆ is_set()

virtual bool shamalgs::IImplVariant::is_set ( ) const
pure virtual

Whether an implementation has been selected yet.

Implemented in shamalgs::ImplVariantGlobal< Alts >.

◆ set()

virtual void shamalgs::IImplVariant::set ( std::string_view config_json)
pure virtual

Select an implementation from a {"implementation": ..., "parameters": ...} json string.

Implemented in shamalgs::ImplVariantGlobal< Alts >.


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