Diese Seite wurde vollständig KI-generiert auf Basis von SWS Safe Hardware Acceleration (R25-11) — kein offizieller AUTOSAR-Text und keine automatisch extrahierte API-Seite wie die übrigen Module. Als Interpretation gekennzeichnete Aussagen sind Schlussfolgerungen aus den Quellen.
[AP_SWS_SHWA_00411] wording not yet importedUpstream: RS_SHWA_00006
class AcceleratorSelector : public DeviceSelector {...};
Die Spezifikation definiert diesen Klassentyp mit der gezeigten Schnittstelle.
Evaluates and selects hardware accelerator devices based on a selector strategy for adaptive applications.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ffcb3b3d577eProvenanceOpen questions (3)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Evaluates and selects hardware accelerator devices based on a selector strategy for adaptive applications.
In the hardware acceleration module, class ara::shwa::AcceleratorSelector serves to evaluate and select suitable accelerator devices according to a selector strategy ([AP_SWS_SHWA_00413]). A suitable Device can be selected directly via SelectDevice(), while operator() enables individual numerical evaluation of single devices ([AP_SWS_SHWA_00412]). Since both operations are specified as not thread-safe, concurrent use requires external synchronization. Possible errors such as busy resources or unsupported functions are reported without rollback via ara::core::Result.
Context
Class ara::shwa::AcceleratorSelector acts in module shwa (Hardware Acceleration) of the AUTOSAR Adaptive Platform as a specialized selector for hardware accelerator devices. According to the class syntax, it derives publicly from base interface DeviceSelector (class AcceleratorSelector : public DeviceSelector). Its primary task is to evaluate physical or logical accelerator devices (Device) according to a defined selector strategy or to select a suitable device ([AP_SWS_SHWA_00412], [AP_SWS_SHWA_00413]).
Interaction partners include the higher-level application logic that requests accelerator resources for computationally intensive tasks, the inheriting base class DeviceSelector, and the Device instances analyzed or returned by the selector. The selection criteria themselves are encapsulated in the concrete implementation of the selector strategy ([AP_SWS_SHWA_00413]).
Context diagram: Integration of AcceleratorSelector in interaction with application, DeviceSelector, and Device. Sources: [AP_SWS_SHWA_00412], [AP_SWS_SHWA_00413]
Lifecycle
Instantiation of AcceleratorSelector is typically expected to occur application-specifically or via corresponding factory mechanisms prior to the first device request. Question Q-933e42753f63687c (open) Destruction takes place as soon as the selection logic is no longer required for the respective application component; the specification does not prescribe specific intermediate states or lifecycle phases.
Regarding concurrency, both provided operations—SelectDevice() and operator()—are explicitly specified as not thread-safe ("not thread-safe") ([AP_SWS_SHWA_00412], [AP_SWS_SHWA_00413]). Although both methods are declared as const, concurrent calls on the same instance or to the same underlying hardware resources must be synchronized externally by the caller.
Usage Path
Interaction with AcceleratorSelector takes place via two alternative usage paths: direct automatic selection and individual candidate evaluation. Via the virtual method SelectDevice(), the application directly requests the selection of a suitable device according to the implemented strategy ([AP_SWS_SHWA_00413]). In the success case, the call returns a Device instance encapsulated in a ara::core::Result.
Alternatively, the overloaded call operator operator() allows step-by-step evaluation of individual known devices ([AP_SWS_SHWA_00412]). The integer value (int) returned by operator() presumably represents a relative suitability score that the application itself can use to perform ranking or filtering. Interpretation: SelectDevice() encapsulates the complete selection strategy autonomously, while operator() enables fine-grained comparisons of individual devices. Question Q-e2de44ef0c9e936d (open)
Both operations are declared as noexcept and guarantee exception safety ([AP_SWS_SHWA_00412], [AP_SWS_SHWA_00413]). Errors are conveyed exclusively via return type ara::core::Result. The following error codes from range ShwaErrorCode are specified:
ShwaErrorCode::kResourceBusy: The operation could not be performed because the resource in question is currently busy or occupied ([AP_SWS_SHWA_00412], [AP_SWS_SHWA_00413]).
ShwaErrorCode::kFeatureNotSupported: A property requested for selection or evaluation is not supported by the platform or device ([AP_SWS_SHWA_00412], [AP_SWS_SHWA_00413]).
For both functions, it is specified that no rollback semantics exist (no_rollback_semantics) ([AP_SWS_SHWA_00412], [AP_SWS_SHWA_00413]). If an error occurs, a previous system or hardware state is not automatically restored. Callers must check the error code of the Result object and, if necessary, initiate retries or alternative selection paths.
This guide was generated by an AI based on the specification for AUTOSAR Adaptive R25-11.
Bewertet beziehungsweise selektiert ein Device entsprechend der Selektor-Strategie.
Scope
class ara::shwa::AcceleratorSelector
Thread Safety
not thread-safe no_rollback_semantics ShwaErrorCode::k ResourceBusy The operation could not be performed because the resource is currently busy no_rollback_semantics
Exception Safety
exception safe
Errors
ShwaErrorCode::k FeatureNotSupported Used when a requested feature isn’t supported
Request a governed re-review of this record. The record is not changed immediately.
ara::core::Result< int > operator() (const Device &device) const noexcept override;
Bewertet beziehungsweise selektiert ein Device entsprechend der Selektor-Strategie.
Scope
class ara::shwa::AcceleratorSelector
Thread Safety
not thread-safe no_rollback_semantics ShwaErrorCode::k ResourceBusy The operation could not be performed because the resource is currently busy no_rollback_semantics
Exception Safety
exception safe
Errors
ShwaErrorCode::k FeatureNotSupported Used when a requested feature isn’t supported
Request a governed re-review of this record. The record is not changed immediately.
gemini-3.8-flash-low· 2026-10-13 · German original