DEENESPTFRRUARHIKOZHNL

class ara::shwa::AcceleratorSelector

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 imported Upstream: RS_SHWA_00006

class AcceleratorSelector : public DeviceSelector {...};

Die Spezifikation definiert diesen Klassentyp mit der gezeigten Schnittstelle.

Header-Datei#include "ara/shwa/device_selector.h"
Scopenamespace ara::shwa

User GuideAI-GENERATED

Evaluates and selects hardware accelerator devices based on a selector strategy for adaptive applications.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ffcb3b3d577e Provenance Open 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]).

diag_selector_context Anwendung Anwendung AcceleratorSelector AcceleratorSelector Anwendung->AcceleratorSelector uses DeviceSelector DeviceSelector AcceleratorSelector->DeviceSelector spezialisiert Device Device AcceleratorSelector->Device selektiert / bewertet

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)

Evaluation and selection of accelerator devicesApplicationAcceleratorSelectorUse Case: KandidatenbewertungloopFor each candidate deviceoperator()(device)ara::core::Result<int> (Score)Use Case: Direct device selectionSelectDevice()ara::core::Result<Device>

Sequence diagram: Call sequence for device evaluation and device selection. Sources: [AP_SWS_SHWA_00412], [AP_SWS_SHWA_00413]

Error Scenarios

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:

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.

Methods

SelectDevice function

Bewertet beziehungsweise selektiert ein Device entsprechend der Selektor-Strategie.

virtual ara::core::Result< Device > SelectDevice () const noexcept override;

Operators

operator() function

Bewertet beziehungsweise selektiert ein Device entsprechend der Selektor-Strategie.

ara::core::Result< int > operator() (const Device &device) const noexcept override;

Details

function SelectDevice [AP_SWS_SHWA_00413] Upstream: RS_SHWA_00006, RS_SHWA_00007

virtual ara::core::Result< Device > SelectDevice () const noexcept override;

Bewertet beziehungsweise selektiert ein Device entsprechend der Selektor-Strategie.

Scopeclass ara::shwa::AcceleratorSelector
Thread Safetynot thread-safe no_rollback_semantics ShwaErrorCode::k ResourceBusy The operation could not be performed because the resource is currently busy no_rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::k FeatureNotSupported Used when a requested feature isn’t supported

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00413
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00413@rel:R25-11#2c9418b2
Content hash
2c9418b2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00413
Status: valid/unmigrated Version: rel:R25-11#2c9418b2 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/AP_SWS_SHWA_00413@rel:R25-11#2c9418b2
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function operator() [AP_SWS_SHWA_00412] Upstream: RS_SHWA_00006, RS_SHWA_00007

ara::core::Result< int > operator() (const Device &device) const noexcept override;

Bewertet beziehungsweise selektiert ein Device entsprechend der Selektor-Strategie.

Scopeclass ara::shwa::AcceleratorSelector
Thread Safetynot thread-safe no_rollback_semantics ShwaErrorCode::k ResourceBusy The operation could not be performed because the resource is currently busy no_rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::k FeatureNotSupported Used when a requested feature isn’t supported

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00412
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00412@rel:R25-11#3f4bde07
Content hash
3f4bde07
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00412
Status: valid/unmigrated Version: rel:R25-11#3f4bde07 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/AP_SWS_SHWA_00412@rel:R25-11#3f4bde07
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill