DEENESPTFRRUARHIKOZHNL

class ara::shwa::Device

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_00301] wording not yet imported Upstream: RS_SHWA_00001, RS_SHWA_00015

class Device final {...};

Die Spezifikation definiert diesen Klassentyp mit der gezeigten Schnittstelle.

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

User GuideAI-GENERATED

Encapsulates and identifies hardware accelerators such as CPUs and GPUs for the safe execution of computationally intensive tasks.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 920debb94b23 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Encapsulates and identifies hardware accelerators such as CPUs and GPUs for the safe execution of computationally intensive tasks.

Serves to abstract and manage hardware accelerators within the Adaptive Platform AUTOSAR_AP_SWS_SafeHardwareAcceleration p. 12. Instances are created exclusively via factory methods such as Create() and offer operations for checking the device type as well as reading specific characteristics [AP_SWS_SHWA_00308], [AP_SWS_SHWA_00313]. Because the operations are not thread-safe, usage in multi-threaded environments requires external synchronization.

Context

The class ara::shwa::Device serves in the Safe Hardware Acceleration module as the primary abstraction for physical compute units AUTOSAR_AP_SWS_SafeHardwareAcceleration p. 12. Within the Adaptive Platform, it enables Adaptive Applications as well as other functional clusters to access and manage accelerator resources. A typical overall system combines instances of Device with execution queues and memory buffers to delegate compute-intensive tasks to accelerator hardware in a structured manner SWS_SafeHardwareAcceleration p. 22.

DeviceContext app Adaptive Application device ara::shwa::Device app->device erzeugt / fragt ab queues Queues & Buffers app->queues uses hardware Hardware-Beschleuniger (CPU, GPU, Accelerator) device->hardware abstrahiert queues->device referenziert

Context diagram: Integration of ara::shwa::Device in interaction with application, queues, and hardware. Sources: AUTOSAR_AP_SWS_SafeHardwareAcceleration p. 12, SWS_SafeHardwareAcceleration p. 22

Lifecycle

The creation of ara::shwa::Device objects is strictly controlled: the default constructor is explicitly deleted [AP_SWS_SHWA_00302]. Instances can be created exclusively via the static factory methods Create(), either without parameters for a default device [AP_SWS_SHWA_00308] or parameterized via a selector object by means of Create(const DeviceSelector&) [AP_SWS_SHWA_00309]. Both methods return a ara::core::Result<Device>.

Regarding resource ownership, the class possesses regular copy and move semantics: both copy constructor [AP_SWS_SHWA_00303] and copy assignment operator [AP_SWS_SHWA_00304] as well as move constructor [AP_SWS_SHWA_00305] and move assignment operator [AP_SWS_SHWA_00306] are declared as noexcept=default. Interpretation: Internally, the object is likely designed as a lightweight handle to the actual hardware resource, so that copies are possible without overhead and in an exception-safe manner. Question Q-a6ff4d89f19b0f36 (open) The lifetime of the physical hardware interface is tied to the runtime of the underlying driver or subsystem, while the instance can be passed along at the application level like a regular value type. All factory calls and methods of the class are specified as not thread-safe.

Usage Path

A typical usage path begins with instantiation via one of the factory methods. Following a successful return, the instance is inspected to determine the type of compute unit and query device-specific parameters. Subsequently, the device is typically assigned to queues and buffers to execute processing tasks.

  1. Instantiation: Calling Create() or Create(deviceSelector) to provide the device [AP_SWS_SHWA_00308], [AP_SWS_SHWA_00309].
  2. Type check: Validation of the hardware category via the predicates IsCpu() [AP_SWS_SHWA_00310], IsGpu() [AP_SWS_SHWA_00311], or IsAccelerator() [AP_SWS_SHWA_00312].
  3. Configuration query: Reading detailed device information via the template method GetInfo<InfoType>() [AP_SWS_SHWA_00313].
Typical initialization and information query of a DeviceApplicationDeviceCreate(deviceSelector)Result<Device>IsGpu()Result<bool>GetInfo<InfoType>()Result<ReturnType>

Sequence diagram: Typical sequence of initialization, type checking, and information querying. Sources: [AP_SWS_SHWA_00309], [AP_SWS_SHWA_00311], [AP_SWS_SHWA_00313]

Error Scenarios

Methods of ara::shwa::Device communicate error states deterministically via the error type ara::core::Result. The following error cases are specified:

With regard to exception safety, all operations are considered exception safe or are annotated with noexcept. Because the operations are not thread-safe, concurrent calls on the same instance or shared hardware resources must be synchronized by the application layer.

This guide is based on the AUTOSAR standard R25-11 and was generated automatically.

Member map

Constructors and destructor

1

Operators

1

Detail view

Select an entry in the outline.

Constructors and destructor

Device function 3

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

Overloads Device 3
Device ()=delete; AP_SWS_SHWA_00302
Device (Device &&dev) noexcept=default; AP_SWS_SHWA_00305
Device (Device const &dev) noexcept=default; AP_SWS_SHWA_00303

Methods

Create function 2

Erzeugt beziehungsweise liefert das in der Signatur beschriebene Objekt oder Ergebnis über den angegebenen Factory-Pfad.

Overloads Create 2
template <typename DeviceSelector> static ara::core::Result< Device > Create (const DeviceSelector &deviceSelector) noexcept; AP_SWS_SHWA_00309
static ara::core::Result< Device > Create () noexcept; AP_SWS_SHWA_00308
GetInfo function

Liest die durch die Signatur bezeichnete Information oder Eigenschaft aus dem Objekt.

template <typename InfoType> ara::core::Result< typename InfoType::ReturnType > GetInfo () const noexcept;
IsAccelerator function

Prüft die in der Signatur bezeichnete Eigenschaft des Devices oder der Queue.

ara::core::Result< bool > IsAccelerator () const noexcept;
IsCpu function

Prüft die in der Signatur bezeichnete Eigenschaft des Devices oder der Queue.

ara::core::Result< bool > IsCpu () const noexcept;
IsGpu function

Prüft die in der Signatur bezeichnete Eigenschaft des Devices oder der Queue.

ara::core::Result< bool > IsGpu () const noexcept;

Operators

operator= function 2

Stellt die in der Signatur ausgewiesene Index- beziehungsweise Zuweisungsoperation bereit.

Overloads = 2
Device & operator= (Device &&dev) noexcept=default; AP_SWS_SHWA_00306
Device & operator= (const Device &dev) noexcept=default; AP_SWS_SHWA_00304

Details

function Device [AP_SWS_SHWA_00302] Upstream: RS_SHWA_00015

Device ()=delete;

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

Scopeclass ara::shwa::Device

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00302
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00302@rel:R25-11#aef4a102
Content hash
aef4a102
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00302
Status: valid/unmigrated Version: rel:R25-11#aef4a102 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_00302@rel:R25-11#aef4a102
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 Device [AP_SWS_SHWA_00305] Upstream: RS_SHWA_00015

Device (Device &&dev) noexcept=default;

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

Scopeclass ara::shwa::Device
Exception Safetyexception safe

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00305
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00305@rel:R25-11#8a2c1f5f
Content hash
8a2c1f5f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00305
Status: valid/unmigrated Version: rel:R25-11#8a2c1f5f 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_00305@rel:R25-11#8a2c1f5f
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_00306] Upstream: RS_SHWA_00015

Device & operator= (Device &&dev) noexcept=default;

Stellt die in der Signatur ausgewiesene Index- beziehungsweise Zuweisungsoperation bereit.

Scopeclass ara::shwa::Device
Exception Safetyexception safe

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00306
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00306@rel:R25-11#bf26e06b
Content hash
bf26e06b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00306
Status: valid/unmigrated Version: rel:R25-11#bf26e06b 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_00306@rel:R25-11#bf26e06b
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_00304] Upstream: RS_SHWA_00015

Device & operator= (const Device &dev) noexcept=default;

Stellt die in der Signatur ausgewiesene Index- beziehungsweise Zuweisungsoperation bereit.

Scopeclass ara::shwa::Device
Exception Safetyexception safe

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00304
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00304@rel:R25-11#10c34f3d
Content hash
10c34f3d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00304
Status: valid/unmigrated Version: rel:R25-11#10c34f3d 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_00304@rel:R25-11#10c34f3d
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 Device [AP_SWS_SHWA_00303] Upstream: RS_SHWA_00015

Device (Device const &dev) noexcept=default;

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

Scopeclass ara::shwa::Device
Exception Safetyexception safe

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00303
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00303@rel:R25-11#0b94a2cf
Content hash
0b94a2cf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00303
Status: valid/unmigrated Version: rel:R25-11#0b94a2cf 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_00303@rel:R25-11#0b94a2cf
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 Create [AP_SWS_SHWA_00309] Upstream: RS_SHWA_00015, RS_SHWA_00006, RS_SHWA_00007

template <typename DeviceSelector> static ara::core::Result< Device > Create (const DeviceSelector &deviceSelector) noexcept;

Erzeugt beziehungsweise liefert das in der Signatur beschriebene Objekt oder Ergebnis über den angegebenen Factory-Pfad.

Scopeclass ara::shwa::Device
Thread Safetynot thread-safe rollback_semantics ShwaErrorCode::k ResourceBusy The operation could not be performed because the resource is currently busy 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_00309
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00309@rel:R25-11#aab7bd32
Content hash
aab7bd32
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00309
Status: valid/unmigrated Version: rel:R25-11#aab7bd32 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_00309@rel:R25-11#aab7bd32
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 Create [AP_SWS_SHWA_00308] Upstream: RS_SHWA_00015, RS_SHWA_00007

static ara::core::Result< Device > Create () noexcept;

Erzeugt beziehungsweise liefert das in der Signatur beschriebene Objekt oder Ergebnis über den angegebenen Factory-Pfad.

Scopeclass ara::shwa::Device
Thread Safetynot thread-safe rollback_semantics ShwaErrorCode::k ResourceBusy The operation could not be performed because the resource is currently busy 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_00308
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00308@rel:R25-11#6c55f83b
Content hash
6c55f83b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00308
Status: valid/unmigrated Version: rel:R25-11#6c55f83b 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_00308@rel:R25-11#6c55f83b
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 GetInfo [AP_SWS_SHWA_00313] Upstream: RS_SHWA_00014, RS_SHWA_00015, RS_SHWA_00007

template <typename InfoType> ara::core::Result< typename InfoType::ReturnType > GetInfo () const noexcept;

Liest die durch die Signatur bezeichnete Information oder Eigenschaft aus dem Objekt.

Scopeclass ara::shwa::Device
Thread Safetynot thread-safe 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_00313
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00313@rel:R25-11#bc5de536
Content hash
bc5de536
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00313
Status: valid/unmigrated Version: rel:R25-11#bc5de536 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_00313@rel:R25-11#bc5de536
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 IsAccelerator [AP_SWS_SHWA_00312] Upstream: RS_SHWA_00014, RS_SHWA_00015, RS_SHWA_00007

ara::core::Result< bool > IsAccelerator () const noexcept;

Prüft die in der Signatur bezeichnete Eigenschaft des Devices oder der Queue.

Scopeclass ara::shwa::Device
Thread Safetynot thread-safe rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::k ResourceBusy The operation could not be performed because the resource is currently busy

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00312
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00312@rel:R25-11#4ea7c619
Content hash
4ea7c619
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00312
Status: valid/unmigrated Version: rel:R25-11#4ea7c619 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_00312@rel:R25-11#4ea7c619
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 IsCpu [AP_SWS_SHWA_00310] Upstream: RS_SHWA_00014, RS_SHWA_00015, RS_SHWA_00007

ara::core::Result< bool > IsCpu () const noexcept;

Prüft die in der Signatur bezeichnete Eigenschaft des Devices oder der Queue.

Scopeclass ara::shwa::Device
Thread Safetynot thread-safe rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::k ResourceBusy The operation could not be performed because the resource is currently busy

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00310
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00310@rel:R25-11#d8084c02
Content hash
d8084c02
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00310
Status: valid/unmigrated Version: rel:R25-11#d8084c02 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_00310@rel:R25-11#d8084c02
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 IsGpu [AP_SWS_SHWA_00311] Upstream: RS_SHWA_00014, RS_SHWA_00015, RS_SHWA_00007

ara::core::Result< bool > IsGpu () const noexcept;

Prüft die in der Signatur bezeichnete Eigenschaft des Devices oder der Queue.

Scopeclass ara::shwa::Device
Thread Safetynot thread-safe rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::k ResourceBusy The operation could not be performed because the resource is currently busy

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00311
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00311@rel:R25-11#66b23ae4
Content hash
66b23ae4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00311
Status: valid/unmigrated Version: rel:R25-11#66b23ae4 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_00311@rel:R25-11#66b23ae4
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