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_00405] wording not yet importedUpstream: RS_SHWA_00006
class GpuSelector : public DeviceSelector {...};
Die Spezifikation definiert diesen Klassentyp mit der gezeigten Schnittstelle.
Enables the evaluation and targeted selection of suitable GPU hardware accelerators based on specific criteria.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 7fc4b1cc3332ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Enables the evaluation and targeted selection of suitable GPU hardware accelerators based on specific criteria.
The class serves to identify and select suitable graphics processors for hardware-accelerated computations in the shwa module. Via interface [AP_SWS_SHWA_00406], the instance evaluates individual devices based on a selector strategy, while [AP_SWS_SHWA_00407] directly selects an optimal target device. Since all calls are defined as not thread-safe, use in concurrent contexts requires explicit synchronization by the caller. Possible error states such as occupied resources are signaled deterministically without exceptions via error codes.
Context
Class ara::shwa::GpuSelector acts in AUTOSAR Adaptive module shwa (Shared Hardware Acceleration) as a selection component for graphics processing units (GPUs). As a specialization of base class DeviceSelector, it undertakes the targeted evaluation and selection of hardware resources for computationally intensive acceleration tasks. Typical scenarios include parallel data processing, machine learning pipelines, or image processing algorithms that place specific demands on the executing computing unit. Within the platform architecture, the class mediates between the higher-level application and the available hardware devices (Device) by applying implemented selection strategies to candidate devices [AP_SWS_SHWA_00406]. This decouples the application logic from hardware-specific detection and evaluation mechanisms.
Lifecycle
Instantiation of ara::shwa::GpuSelector is typically performed by the requesting application component before execution on hardware accelerators is initiated. Interpretation: Since the class inherits from DeviceSelector and exposes no mutable internal states according to the interface definition, it is likely to be operated primarily as a lightweight strategy instance or stateless function object. Question Q-66cfb57fe39be17d (open) The lifetime of the instance is usually tied to the device initialization phase. Regarding concurrency, it should be noted that both operator()[AP_SWS_SHWA_00406] and SelectDevice()[AP_SWS_SHWA_00407] are specified as not thread-safe (not thread-safe). If access occurs from multiple threads, the calling application must ensure external synchronization. Both methods, however, are declared as noexcept and guarantee full exception safety (exception safe).
Usage Path
The interface supports two complementary interaction patterns for hardware selection: manual evaluation of individual candidates and autonomous allocation. In iterative evaluation, the application passes existing devices to call operator operator()[AP_SWS_SHWA_00406]. This checks the respective Device according to the configured strategy and returns the result in the form of a ara::core::Result<int>. Interpretation: The returned integer value is likely to represent a suitability score, by means of which the application can establish a ranking among multiple GPUs. Question Q-7b7666aedeedc755 (open)
Alternatively, the application can call method SelectDevice()[AP_SWS_SHWA_00407]. In this case, the selector autonomously determines the most suitable device from the available resources and directly returns a ara::core::Result<Device>. This path is suitable for systems in which the allocation decision is to be delegated entirely to the selector.
Since no C++ exceptions are thrown, the class signals error conditions exclusively via return type ara::core::Result. Identical error definitions apply to both methods, and no automatic rollback mechanisms exist (no_rollback_semantics) [AP_SWS_SHWA_00406], [AP_SWS_SHWA_00407]:
ShwaErrorCode::kResourceBusy: The operation could not be executed because the requested hardware resource is currently occupied [AP_SWS_SHWA_00406], [AP_SWS_SHWA_00407]. The application can repeat the call at a later point in time or switch to an alternative GPU.
ShwaErrorCode::kFeatureNotSupported: The requested feature or required device functionality is not supported by the target platform or device [AP_SWS_SHWA_00406], [AP_SWS_SHWA_00407].
This guide was created by an AI system based on the specification of AUTOSAR Adaptive R25-11.
Bewertet beziehungsweise selektiert ein Device entsprechend der Selektor-Strategie.
Scope
class ara::shwa::GpuSelector
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::GpuSelector
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