STLdoc
STLdocumentation
|
Classes | |
struct | adopt_d3d_access_lock_t |
Tag type to indicate the D3D access lock should be adopted rather than acquired. More... | |
class | scoped_d3d_access_lock |
RAII wrapper for a D3D access lock on an accelerator_view. More... | |
Functions | |
template<typename _Value_type , int _Rank> | |
array< _Value_type, _Rank > | make_array (const Concurrency::extent< _Rank > &_Extent, const Concurrency::accelerator_view &_Av, _In_ IUnknown *_D3D_buffer) __CPU_ONLY |
Create an array from a D3D buffer interface pointer. More... | |
template<typename _Value_type , int _Rank> | |
_Ret_ IUnknown * | get_buffer (const array< _Value_type, _Rank > &_Array) __CPU_ONLY |
Get the D3D buffer interface underlying an array. More... | |
int | abs (int _X) __GPU_ONLY |
Returns the absolute value of the argument More... | |
float | clamp (float _X, float _Min, float _Max) __GPU_ONLY |
Clamps _X to the specified _Min and _Max range More... | |
int | clamp (int _X, int _Min, int _Max) __GPU_ONLY |
Clamps _X to the specified _Min and _Max range More... | |
unsigned int | countbits (unsigned int _X) __GPU_ONLY |
Counts the number of set bits in _X More... | |
int | firstbithigh (int _X) __GPU_ONLY |
Gets the location of the first set bit in _X, starting from the highest order bit and working downward More... | |
int | firstbitlow (int _X) __GPU_ONLY |
Gets the location of the first set bit in _X, starting from the lowest order bit and working upward More... | |
int | imax (int _X, int _Y) __GPU_ONLY |
Determine the maximum numeric value of the arguments More... | |
int | imin (int _X, int _Y) __GPU_ONLY |
Determine the minimum numeric value of the arguments More... | |
unsigned int | umax (unsigned int _X, unsigned int _Y) __GPU_ONLY |
Determine the maximum numeric value of the arguments More... | |
unsigned int | umin (unsigned int _X, unsigned int _Y) __GPU_ONLY |
Determine the minimum numeric value of the arguments More... | |
float | mad (float _X, float _Y, float _Z) __GPU_ONLY |
Performs an arithmetic multiply/add operation on three arguments: _X * _Y + _Z More... | |
double | mad (double _X, double _Y, double _Z) __GPU_ONLY |
Performs an arithmetic multiply/add operation on three arguments: _X * _Y + _Z More... | |
int | mad (int _X, int _Y, int _Z) __GPU_ONLY |
Performs an arithmetic multiply/add operation on three arguments: _X * _Y + _Z More... | |
unsigned int | mad (unsigned int _X, unsigned int _Y, unsigned int _Z) __GPU_ONLY |
Performs an arithmetic multiply/add operation on three arguments: _X * _Y + _Z More... | |
float | noise (float _X) __GPU_ONLY |
Generates a random value using the Perlin noise algorithm More... | |
float | radians (float _X) __GPU_ONLY |
Converts _X from degrees to radians More... | |
float | rcp (float _X) __GPU_ONLY |
Calculates a fast, approximate reciprocal of the argument More... | |
unsigned int | reversebits (unsigned int _X) __GPU_ONLY |
Reverses the order of the bits in _X More... | |
float | saturate (float _X) __GPU_ONLY |
Clamps _X within the range of 0 to 1 More... | |
int | sign (int _X) __GPU_ONLY |
Returns the sign of the argument More... | |
float | smoothstep (float _Min, float _Max, float _X) __GPU_ONLY |
Returns a smooth Hermite interpolation between 0 and 1, if _X is in the range [_Min, _Max]. More... | |
float | step (float _Y, float _X) __GPU_ONLY |
Compares two values, returning 0 or 1 based on which value is greater More... | |
_AMPIMP _Ret_ IUnknown *__cdecl | get_device (const accelerator_view &_Av) |
Get the D3D device interface underlying a accelerator_view. More... | |
_AMPIMP accelerator_view __cdecl | create_accelerator_view (_In_ IUnknown *_D3D_device, queuing_mode _Qmode=queuing_mode_automatic) |
Create a accelerator_view from a D3D device interface pointer. More... | |
_AMPIMP accelerator_view __cdecl | create_accelerator_view (accelerator &_Accelerator, bool _Disable_timeout, queuing_mode _Qmode=queuing_mode_automatic) |
Create and return a new accelerator view on the specified accelerator. More... | |
_AMPIMP bool __cdecl | is_timeout_disabled (const accelerator_view &_Accelerator_view) |
Returns a boolean flag indicating if timeout is disabled for the specified accelerator_view. This corresponds to the D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT flag for Direct3D device creation. More... | |
_AMPIMP void __cdecl | d3d_access_lock (accelerator_view &_Av) |
Acquire a lock on an accelerator_view for the purpose of safely performing D3D operations on resources shared with the accelerator_view. The accelerator_view and all C++ AMP resources associated with this accelerator_view internally take this lock when performing operations and will block while another thread holds the D3D access lock. More... | |
_AMPIMP bool __cdecl | d3d_access_try_lock (accelerator_view &_Av) |
Attempt to acquire the D3D access lock on an accelerator_view without blocking. More... | |
_AMPIMP void __cdecl | d3d_access_unlock (accelerator_view &_Av) |
Release the D3D access lock on the given accelerator_view. If the calling thread does not hold the lock on the accelerator_view the results are undefined. More... | |
|
inline |
Returns the absolute value of the argument
_X | Integer value |
|
inline |
Clamps _X to the specified _Min and _Max range
_X | Floating-point value |
_Min | Floating-point value |
_Max | Floating-point value |
|
inline |
Clamps _X to the specified _Min and _Max range
_X | Integer value |
_Min | Integer value |
_Max | Integer value |
|
inline |
Counts the number of set bits in _X
_X | Unsigned integer value |
_AMPIMP accelerator_view __cdecl Concurrency::direct3d::create_accelerator_view | ( | _In_ IUnknown * | _D3D_device, |
queuing_mode | _Qmode = queuing_mode_automatic |
||
) |
Create a accelerator_view from a D3D device interface pointer.
_D3D_device | The D3D device interface pointer to create the accelerator_view from. |
_Qmode | The queuing_mode to be used for the newly created accelerator_view. This parameter has a default value of queuing_mode_automatic. |
_AMPIMP accelerator_view __cdecl Concurrency::direct3d::create_accelerator_view | ( | accelerator & | _Accelerator, |
bool | _Disable_timeout, | ||
queuing_mode | _Qmode = queuing_mode_automatic |
||
) |
Create and return a new accelerator view on the specified accelerator.
_Accelerator | The accelerator on which the new accelerator_view is to be created. |
_Disable_timeout | A boolean parameter that specifies whether timeout should be disabled for the newly created accelerator_view. This corresponds to the D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT flag for Direct3D device creation and is used to indicate if the operating system should allow workloads that take more than 2 seconds to execute, without resetting the device per the Windows timeout detection and recovery mechanism. Use of this flag is recommended if you need to perform time consuming tasks on the accelerator_view. |
_Qmode | The queuing_mode to be used for the newly created accelerator_view. This parameter has a default value of queuing_mode_automatic. |
Acquire a lock on an accelerator_view for the purpose of safely performing D3D operations on resources shared with the accelerator_view. The accelerator_view and all C++ AMP resources associated with this accelerator_view internally take this lock when performing operations and will block while another thread holds the D3D access lock.
This lock is non-recursive: It is undefined behavior to call this function from a thread that already holds the lock. It is undefined behavior to perform operations on the accelerator_view or any data container associated with the accelerator_view from the thread that holds the D3D access lock.
See also scoped_d3d_access_lock, a RAII-style class for a scope-based D3D access lock.
_Av | The accelerator_view to lock. |
Attempt to acquire the D3D access lock on an accelerator_view without blocking.
_Av | The accelerator_view to lock. |
Release the D3D access lock on the given accelerator_view. If the calling thread does not hold the lock on the accelerator_view the results are undefined.
_Av | The accelerator_view for which the lock is to be released. |
|
inline |
Gets the location of the first set bit in _X, starting from the highest order bit and working downward
_X | Integer value |
|
inline |
Gets the location of the first set bit in _X, starting from the lowest order bit and working upward
_X | Integer value |
_Ret_ IUnknown* Concurrency::direct3d::get_buffer | ( | const array< _Value_type, _Rank > & | _Array | ) |
Get the D3D buffer interface underlying an array.
_Rank | The rank of the array to get underlying D3D buffer of. |
_Value_type | The type of the elements in the array to get underlying D3D buffer of. |
_Array | A array on a D3D accelerator_view for which the underlying D3D buffer interface is returned. |
Get the D3D device interface underlying a accelerator_view.
_Av | The D3D accelerator_view for which the underlying D3D device interface is returned. |
|
inline |
Determine the maximum numeric value of the arguments
_X | Integer value |
_Y | Integer value |
|
inline |
Determine the minimum numeric value of the arguments
_X | Integer value |
_Y | Integer value |
_AMPIMP bool __cdecl Concurrency::direct3d::is_timeout_disabled | ( | const accelerator_view & | _Accelerator_view | ) |
Returns a boolean flag indicating if timeout is disabled for the specified accelerator_view. This corresponds to the D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT flag for Direct3D device creation.
_Accelerator_view | The accelerator_view for which the timeout disabled setting is to be queried. |
|
inline |
Performs an arithmetic multiply/add operation on three arguments: _X * _Y + _Z
_X | Floating-point value |
_Y | Floating-point value |
_Z | Floating-point value |
|
inline |
Performs an arithmetic multiply/add operation on three arguments: _X * _Y + _Z
_X | Floating-point value |
_Y | Floating-point value |
_Z | Floating-point value |
|
inline |
Performs an arithmetic multiply/add operation on three arguments: _X * _Y + _Z
_X | Integer value |
_Y | Integer value |
_Z | Integer value |
|
inline |
Performs an arithmetic multiply/add operation on three arguments: _X * _Y + _Z
_X | Unsigned integer value |
_Y | Unsigned integer value |
_Z | Unsigned integer value |
array< _Value_type, _Rank > Concurrency::direct3d::make_array | ( | const Concurrency::extent< _Rank > & | _Extent, |
const Concurrency::accelerator_view & | _Av, | ||
_In_ IUnknown * | _D3D_buffer | ||
) |
Create an array from a D3D buffer interface pointer.
_Rank | The rank of the array to be created from the D3D buffer. |
_Value_type | The type of the elements of the array to be created from the D3D buffer. |
_Extent | An extent that describes the shape of the array aggregate. |
_Av | A D3D accelerator_view on which the array is to be created. |
_D3D_buffer | IUnknown interface pointer of the D3D buffer to create the array from. |
|
inline |
Generates a random value using the Perlin noise algorithm
_X | Floating-point value from which to generate Perlin noise |
|
inline |
Converts _X from degrees to radians
_X | Floating-point value |
|
inline |
Calculates a fast, approximate reciprocal of the argument
_X | Floating-point value |
|
inline |
Reverses the order of the bits in _X
_X | Unsigned integer value |
|
inline |
Clamps _X within the range of 0 to 1
_X | Floating-point value |
|
inline |
Returns the sign of the argument
_X | Integer value |
|
inline |
Returns a smooth Hermite interpolation between 0 and 1, if _X is in the range [_Min, _Max].
_X | Floating-point value |
_Min | Floating-point value |
_Max | Floating-point value |
|
inline |
Compares two values, returning 0 or 1 based on which value is greater
_Y | Floating-point value |
_X | Floating-point value |
|
inline |
Determine the maximum numeric value of the arguments
_X | Integer value |
_Y | Integer value |
|
inline |
Determine the minimum numeric value of the arguments
_X | Integer value |
_Y | Integer value |