get_device Function

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Returns the D3D device interface that's underlying an accelerator_view object.

IUnknown *get_device(
   const accelerator_view &_Rv
);

Parameters

  • _Rv
    The D3D accelerator_view object for which the underlying D3D device interface is returned.

Return Value

The IUnknown interface pointer of the D3D device that's underlying the accelerator_view object.

Remarks

The get_device function returns a D3D device interface pointer that's underlying the specified accelerator_view object. The function call fails and throws a runtime_exception if the specified accelerator_view object is not a D3D device resource view. If the function succeeds, it increments the reference count of the D3D device interface by calling AddRef on the interface. You must call Release on the returned interface after you are finished using it.

You must synchronize concurrent use of the accelerator_view object and the raw ID3D11Device interface from multiple host threads to make sure there is mutual exclusion. Unsynchronized concurrent usage of the accelerator_view object and the raw ID3D11Device interface causes undefined behavior.

Requirements

Header: amprt.h

Namespace: Concurrency::direct3d

See Also

Reference

Concurrency::direct3d Namespace