HCC
HCC is a single-source, C/C++ compiler for heterogeneous computing. It's optimized with HSA (http://www.hsafoundation.com/).
|
Represents a logical (isolated) accelerator view of a compute accelerator. More...
#include <amp.h>
Public Member Functions | |
accelerator_view (const accelerator_view &other) | |
Copy-constructs an accelerator_view object. More... | |
accelerator_view & | operator= (const accelerator_view &other) |
Assigns an accelerator_view object to "this" accelerator_view object and returns a reference to "this" object. More... | |
queuing_mode | get_queuing_mode () const |
Returns the queuing mode that this accelerator_view was created with. More... | |
bool | get_is_auto_selection () |
Returns a boolean value indicating whether the accelerator view when passed to a parallel_for_each would result in automatic selection of an appropriate execution target by the runtime. More... | |
unsigned int | get_version () const |
Returns a 32-bit unsigned integer representing the version number of this accelerator view. More... | |
accelerator | get_accelerator () const |
Returns the accelerator that this accelerator_view has been created on. | |
bool | get_is_debug () const |
Returns a boolean value indicating whether the accelerator_view supports debugging through extensive error reporting. More... | |
void | wait () |
Performs a blocking wait for completion of all commands submitted to the accelerator view prior to calling wait(). | |
void | flush () |
Sends the queued up commands in the accelerator_view to the device for execution. More... | |
completion_future | create_marker () |
This command inserts a marker event into the accelerator_view's command queue. More... | |
bool | operator== (const accelerator_view &other) const |
Compares "this" accelerator_view with the passed accelerator_view object to determine if they represent the same underlying object. More... | |
bool | operator!= (const accelerator_view &other) const |
Compares "this" accelerator_view with the passed accelerator_view object to determine if they represent different underlying objects. More... | |
Friends | |
class | accelerator |
template<typename Q , int K> | |
class | array |
template<typename Q , int K> | |
class | array_view |
template<typename Kernel , int dim_ext> | |
void | Kalmar::mcw_cxxamp_launch_kernel (const std::shared_ptr< Kalmar::KalmarQueue > &, size_t *, size_t *, const Kernel &) |
template<typename Kernel , int dim_ext> | |
std::shared_future< void > * | Kalmar::mcw_cxxamp_launch_kernel_async (const std::shared_ptr< Kalmar::KalmarQueue > &, size_t *, size_t *, const Kernel &) |
template<int N, typename Kernel > | |
void | parallel_for_each (Concurrency::extent< N >, const Kernel &) |
template<int N, typename Kernel > | |
void | parallel_for_each (const accelerator_view &, Concurrency::extent< N >, const Kernel &) |
template<typename Kernel > | |
void | parallel_for_each (const accelerator_view &, Concurrency::extent< 1 >, const Kernel &) |
template<typename Kernel > | |
void | parallel_for_each (const accelerator_view &, Concurrency::extent< 2 >, const Kernel &) |
template<typename Kernel > | |
void | parallel_for_each (const accelerator_view &, Concurrency::extent< 3 >, const Kernel &) |
template<int D0, typename Kernel > | |
void | parallel_for_each (tiled_extent< D0 >, const Kernel &) |
template<int D0, typename Kernel > | |
void | parallel_for_each (const accelerator_view &, tiled_extent< D0 >, const Kernel &) |
template<int D0, int D1, typename Kernel > | |
void | parallel_for_each (tiled_extent< D0, D1 >, const Kernel &) |
template<int D0, int D1, typename Kernel > | |
void | parallel_for_each (const accelerator_view &, tiled_extent< D0, D1 >, const Kernel &) |
template<int D0, int D1, int D2, typename Kernel > | |
void | parallel_for_each (tiled_extent< D0, D1, D2 >, const Kernel &) |
template<int D0, int D1, int D2, typename Kernel > | |
void | parallel_for_each (const accelerator_view &, tiled_extent< D0, D1, D2 >, const Kernel &) |
Represents a logical (isolated) accelerator view of a compute accelerator.
An object of this type can be obtained by calling the default_view property or create_view member functions on an accelerator object.
|
inline |
Copy-constructs an accelerator_view object.
This function does a shallow copy with the newly created accelerator_view object pointing to the same underlying view as the "other" parameter.
[in] | other | The accelerator_view object to be copied. |
|
inline |
This command inserts a marker event into the accelerator_view's command queue.
This marker is returned as a completion_future object. When all commands that were submitted prior to the marker event creation have completed, the future is ready.
|
inline |
Sends the queued up commands in the accelerator_view to the device for execution.
An accelerator_view internally maintains a buffer of commands such as data transfers between the host memory and device buffers, and kernel invocations (parallel_for_each calls). This member function sends the commands to the device for processing. Normally, these commands are sent to the GPU automatically whenever the runtime determines that they need to be, such as when the command buffer is full or when waiting for transfer of data from the device buffers to host memory. The flush member function will send the commands manually to the device.
Calling this member function incurs an overhead and must be used with discretion. A typical use of this member function would be when the CPU waits for an arbitrary amount of time and would like to force the execution of queued device commands in the meantime. It can also be used to ensure that resources on the accelerator are reclaimed after all references to them have been removed.
Because flush operates asynchronously, it can return either before or after the device finishes executing the buffered commands. However, the commands will eventually always complete.
If the queuing_mode is queuing_mode_immediate, this function does nothing.
|
inline |
Returns a boolean value indicating whether the accelerator view when passed to a parallel_for_each would result in automatic selection of an appropriate execution target by the runtime.
In other words, this is the accelerator view that will be automatically selected if parallel_for_each is invoked without explicitly specifying an accelerator view.
|
inline |
Returns a boolean value indicating whether the accelerator_view supports debugging through extensive error reporting.
The is_debug property of the accelerator view is usually same as that of the parent accelerator.
|
inline |
Returns the queuing mode that this accelerator_view was created with.
See "Queuing Mode".
|
inline |
Returns a 32-bit unsigned integer representing the version number of this accelerator view.
The format of the integer is major.minor, where the major version number is in the high-order 16 bits, and the minor version number is in the low-order bits.
The version of the accelerator view is usually the same as that of the parent accelerator.
|
inline |
Compares "this" accelerator_view with the passed accelerator_view object to determine if they represent different underlying objects.
[in] | other | The accelerator_view object to be compared against. |
|
inline |
Assigns an accelerator_view object to "this" accelerator_view object and returns a reference to "this" object.
This function does a shallow assignment with the newly created accelerator_view object pointing to the same underlying view as the passed accelerator_view parameter.
[in] | other | The accelerator_view object to be assigned from. |
|
inline |
Compares "this" accelerator_view with the passed accelerator_view object to determine if they represent the same underlying object.
[in] | other | The accelerator_view object to be compared against. |