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_00408] wording not yet importedUpstream: RS_SHWA_00006
class CpuSelector : public DeviceSelector {...};
Die Spezifikation definiert diesen Klassentyp mit der gezeigten Schnittstelle.
Enables the evaluation and targeted selection of hardware devices based on a selector strategy.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 89675708a89bProvenanceOpen questions (3)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Enables the evaluation and targeted selection of hardware devices based on a selector strategy.
Class ara::shwa::CpuSelector serves in module shwa for evaluating and targeted selection of hardware devices according to a specific selector strategy [AP_SWS_SHWA_00410]. Application software can evaluate individual device candidates via operator() or directly determine a suitable target device via method SelectDevice()[AP_SWS_SHWA_00409]. As essential constraints, the interfaces are specified as not thread-safe, provide no rollback semantics, and report potential errors such as occupied resources exclusively via ara::core::Result.
Context
Class ara::shwa::CpuSelector is part of the hardware acceleration module (shwa) within the AUTOSAR Adaptive Platform. It derives from base interface DeviceSelector and specializes the functional selection of execution devices. Its primary responsibility is to evaluate hardware devices (Device) based on a selector strategy or to select a suitable device directly [AP_SWS_SHWA_00409], [AP_SWS_SHWA_00410].
In the overall system, CpuSelector acts as a link between requesting software components and available hardware units. While DeviceSelector provides the general interface, CpuSelector as a selector strategy is likely aimed specifically at CPU-based hardware resources, as suggested by the class name. Question Q-32abbae13e272c68 (open) Application software includes this class to make sound decisions about resource suitability prior to work dispatch.
Lifecycle
Instances of CpuSelector are created in the application context or by higher-level manager instances to provide selection strategies. The central evaluation and selection operations are declared as const, which is why the instance behaves statelessly toward the outside during its use and does not modify any internal selection states [AP_SWS_SHWA_00409], [AP_SWS_SHWA_00410].
Regarding concurrency, neither SelectDevice()[AP_SWS_SHWA_00410] nor operator()[AP_SWS_SHWA_00409] is thread-safe (not thread-safe). Because the methods are specified as not thread-safe, concurrent accesses to the same instance of CpuSelector presumably must be synchronized by the caller. Question Q-fced1ce242dea2c2 (open) At the end of the lifecycle, the selector is torn down without special rollback procedures.
Usage Path
Typical interaction with CpuSelector comprises either the individual evaluation of single candidates or the direct query for the optimal target device. For candidate inspection, the caller passes a device reference to operator()(const Device &device)[AP_SWS_SHWA_00409]. The return of operator() as ara::core::Result<int> is likely to represent a numerical evaluation metric (score) for the passed Device, by which multiple devices can be compared. Question Q-33885b34ba761592 (open)
If the application wants to leave the selection entirely to the strategy, it calls SelectDevice()[AP_SWS_SHWA_00410]. This method internally determines the suitable device and returns a ara::core::Result<Device> that encapsulates the selected target device.
Both methods are declared with noexcept and guarantee full exception safety (exception safe) [AP_SWS_SHWA_00409], [AP_SWS_SHWA_00410]. Occurring error conditions are not reported via C++ exceptions, but are returned via the error domain in ara::core::Result.
The following error values from ShwaErrorCode are specified for both methods:
ShwaErrorCode::kResourceBusy: The evaluation or selection could not be executed because the addressed resource is currently busy [AP_SWS_SHWA_00409], [AP_SWS_SHWA_00410].
ShwaErrorCode::kFeatureNotSupported: A requested device property or selector function is not supported by the system [AP_SWS_SHWA_00409], [AP_SWS_SHWA_00410].
As a precondition for operator(), a valid Device reference must be available. Both functions forego rollback semantics (no_rollback_semantics), which is why no automatic cleanup of previous system states occurs in the event of an error [AP_SWS_SHWA_00409], [AP_SWS_SHWA_00410].
This guide was generated 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::CpuSelector
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::CpuSelector
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