HCC
HCC is a single-source, C/C++ compiler for heterogeneous computing. It's optimized with HSA (http://www.hsafoundation.com/).
Classes | Typedefs | Functions | Variables
Concurrency Namespace Reference

C++ AMP namespace. More...

Classes

struct  __has_data
 
struct  __has_size
 
struct  __is_container
 
class  accelerator
 Represents a physical accelerated computing device. More...
 
class  accelerator_view
 Represents a logical (isolated) accelerator view of a compute accelerator. More...
 
class  array
 Represents an N-dimensional region of memory (with type T) located on an accelerator. More...
 
struct  array_projection_helper
 
struct  array_projection_helper< T, 1 >
 
class  array_view
 The array_view<T,N> type represents a possibly cached view into the data held in an array<T,N>, or a section thereof. More...
 
class  array_view< const T, N >
 The partial specialization array_view<const T,N> represents a view over elements of type const T with rank N. More...
 
class  completion_future
 This class is the return type of all C++ AMP asynchronous APIs and has an interface analogous to std::shared_future<void>. More...
 
struct  copy_bidir
 
struct  copy_bidir< T, N, N >
 
struct  copy_input
 
struct  copy_input< InputIter, T, N, N >
 
struct  copy_output
 
struct  copy_output< OutputIter, T, N, N >
 
struct  do_copy
 
struct  do_copy< Iter, T, 1 >
 
struct  do_copy< T *, T, 1 >
 
struct  do_copy< T *, T, N >
 
class  extent
 Represents a unique position in N-dimensional space. More...
 
struct  pfe_helper
 
struct  pfe_helper< 0, Kernel, _Tp >
 
class  pfe_wrapper
 
struct  projection_helper
 
struct  projection_helper< const T, 1 >
 
struct  projection_helper< const T, N >
 
struct  projection_helper< T, 1 >
 
class  tile_barrier
 The tile_barrier class is a capability class that is only creatable by the system, and passed to a tiled parallel_for_each function object as part of the tiled_index parameter. More...
 
class  tiled_extent
 Represents an extent subdivided into 1-, 2-, or 3-dimensional tiles. More...
 
class  tiled_extent< D0, 0, 0 >
 Represents an extent subdivided into 1-, 2-, or 3-dimensional tiles. More...
 
class  tiled_extent< D0, D1, 0 >
 Represents an extent subdivided into 1-, 2-, or 3-dimensional tiles. More...
 
class  tiled_index
 Represents a set of related indices subdivided into 1-, 2-, or 3-dimensional tiles. More...
 
class  tiled_index< D0, 0, 0 >
 Represents a set of related indices subdivided into 1-, 2-, or 3-dimensional tiles. More...
 
class  tiled_index< D0, D1, 0 >
 Represents a set of related indices subdivided into 1-, 2-, or 3-dimensional tiles. More...
 

Typedefs

template<int N>
using index = Kalmar::index< N >
 Represents a unique position in N-dimensional space.
 
using runtime_exception = Kalmar::runtime_exception
 
using invalid_compute_domain = Kalmar::invalid_compute_domain
 
using accelerator_view_removed = Kalmar::accelerator_view_removed
 

Functions

void all_memory_fence (const tile_barrier &)
 Establishes a thread-tile scoped memory fence for both global and tile-static memory operations. More...
 
void global_memory_fence (const tile_barrier &)
 Establishes a thread-tile scoped memory fence for global (but not tile-static) memory operations. More...
 
void tile_static_memory_fence (const tile_barrier &)
 Establishes a thread-tile scoped memory fence for tile-static (but not global) memory operations. More...
 
template<int N>
const Concurrency::extent< N > & check (const Concurrency::extent< N > &ext)
 
template<typename T , int N>
void copy (const array< T, N > &src, array< T, N > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename OutputIter , typename T , int N>
void copy (const array_view< T, N > &src, OutputIter destBegin)
 The contents of a source array are copied into "dest" starting with iterator destBegin. More...
 
template<typename OutputIter , typename T , int N>
void copy (const array< T, N > &src, OutputIter destBegin)
 The contents of a source array are copied into "dest" starting with iterator destBegin. More...
 
template<typename T , int N>
completion_future copy_async (const array< T, N > &src, array< T, N > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename T , int N>
completion_future copy_async (const array< T, N > &src, const array_view< T, N > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename OutputIter , typename T , int N>
completion_future copy_async (const array< T, N > &src, OutputIter destBegin)
 The contents of a source array are copied into "dest" starting with iterator destBegin. More...
 
template<typename OutputIter , typename T , int N>
completion_future copy_async (const array_view< T, N > &src, OutputIter destBegin)
 The contents of a source array are copied into "dest" starting with iterator destBegin. More...
 
template<typename T , int N>
completion_future copy_async (const array< T, N > &src, const array< T, N > &dest)
 
template<typename T , int N>
completion_future copy_async (const array_view< const T, N > &src, const array< T, N > &dest)
 
template<typename T , int N>
completion_future copy_async (const array_view< T, N > &src, const array< T, N > &dest)
 
template<int N, typename Kernel >
void parallel_for_each (const accelerator_view &, extent< N > compute_domain, const Kernel &f)
 
template<int D0, int D1, int D2, typename Kernel >
void parallel_for_each (const accelerator_view &accl_view, tiled_extent< D0, D1, D2 > compute_domain, const Kernel &f)
 
template<int D0, int D1, typename Kernel >
void parallel_for_each (const accelerator_view &accl_view, tiled_extent< D0, D1 > compute_domain, const Kernel &f)
 
template<int D0, typename Kernel >
void parallel_for_each (const accelerator_view &accl_view, tiled_extent< D0 > compute_domain, const Kernel &f)
 
template<int N, typename Kernel >
void parallel_for_each (extent< N > compute_domain, const Kernel &f)
 
template<int D0, int D1, int D2, typename Kernel >
void parallel_for_each (tiled_extent< D0, D1, D2 > compute_domain, const Kernel &f)
 
template<int D0, int D1, typename Kernel >
void parallel_for_each (tiled_extent< D0, D1 > compute_domain, const Kernel &f)
 
template<int D0, typename Kernel >
void parallel_for_each (tiled_extent< D0 > compute_domain, const Kernel &f)
 
template<int N, typename Kernel >
 __attribute__ ((noinline, used)) void parallel_for_each(const accelerator_view &av
 
 for (int i=0;i< N;i++)
 
 if (av.get_accelerator().get_device_path()==L"cpu")
 
const pfe_wrapper< N, Kernel > _pf (compute_domain, f)
 
template<typename Kernel >
 __attribute__ ((noinline, used)) void parallel_for_each(const accelerator_view &av
 
 if (static_cast< size_t >(compute_domain[1])*static_cast< size_t >(compute_domain[2]) > 4294967295L) throw invalid_compute_domain("Extent size too large.")
 
 if (static_cast< size_t >(compute_domain[0])*static_cast< size_t >(compute_domain[2]) > 4294967295L) throw invalid_compute_domain("Extent size too large.")
 
 if (static_cast< size_t >(compute_domain[0])*static_cast< size_t >(compute_domain[1])*static_cast< size_t >(compute_domain[2]) > 4294967295L) throw invalid_compute_domain("Extent size too large.")
 
 if (ext%tile!=0)
 
template<int D0, int D1, typename Kernel >
 __attribute__ ((noinline, used)) void parallel_for_each(const accelerator_view &av
 
 if ((ext[0]%tile[0]!=0)||(ext[1]%tile[1]!=0))
 
template<int D0, int D1, int D2, typename Kernel >
 __attribute__ ((noinline, used)) void parallel_for_each(const accelerator_view &av
 
 if ((ext[0]%tile[0]!=0)||(ext[1]%tile[1]!=0)||(ext[2]%tile[2]!=0))
 
template<typename T , int N>
void copy (const array_view< const T, N > &src, const array_view< T, N > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename T , int N>
void copy (const array_view< T, N > &src, const array_view< T, N > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename T >
void copy (const array_view< const T, 1 > &src, const array_view< T, 1 > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename T , int N>
void copy (const array< T, N > &src, const array_view< T, N > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename T >
void copy (const array< T, 1 > &src, const array_view< T, 1 > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename T , int N>
void copy (const array_view< const T, N > &src, array< T, N > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename T , int N>
void copy (const array_view< T, N > &src, array< T, N > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename T >
void copy (const array_view< const T, 1 > &src, array< T, 1 > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename InputIter , typename T , int N>
void copy (InputIter srcBegin, InputIter srcEnd, const array_view< T, N > &dest)
 The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest". More...
 
template<typename InputIter , typename T , int N>
void copy (InputIter srcBegin, const array_view< T, N > &dest)
 The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest". More...
 
template<typename InputIter , typename T , int N>
void copy (InputIter srcBegin, InputIter srcEnd, array< T, N > &dest)
 The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest". More...
 
template<typename InputIter , typename T , int N>
void copy (InputIter srcBegin, array< T, N > &dest)
 The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest". More...
 
template<int N>
extent< N > operator+ (const extent< N > &lhs, const extent< N > &rhs)
 Adds (or subtracts) two objects of extent<N> to form a new extent. More...
 
template<int N>
extent< N > operator- (const extent< N > &lhs, const extent< N > &rhs)
 Adds (or subtracts) two objects of extent<N> to form a new extent. More...
 
template<int N>
extent< N > operator+ (const extent< N > &ext, int value)
 Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands. More...
 
template<int N>
extent< N > operator+ (int value, const extent< N > &ext)
 Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands. More...
 
template<int N>
extent< N > operator- (const extent< N > &ext, int value)
 Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands. More...
 
template<int N>
extent< N > operator- (int value, const extent< N > &ext)
 Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands. More...
 
template<int N>
extent< N > operator* (const extent< N > &ext, int value)
 Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands. More...
 
template<int N>
extent< N > operator* (int value, const extent< N > &ext)
 Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands. More...
 
template<int N>
extent< N > operator/ (const extent< N > &ext, int value)
 Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands. More...
 
template<int N>
extent< N > operator/ (int value, const extent< N > &ext)
 Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands. More...
 
template<int N>
extent< N > operator% (const extent< N > &ext, int value)
 Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands. More...
 
template<int N>
extent< N > operator% (int value, const extent< N > &ext)
 Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands. More...
 
template<typename T , int N>
completion_future copy_async (const array_view< const T, N > &src, array< T, N > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename T , int N>
completion_future copy_async (const array_view< T, N > &src, array< T, N > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename T , int N>
completion_future copy_async (const array_view< const T, N > &src, const array_view< T, N > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename T , int N>
completion_future copy_async (const array_view< T, N > &src, const array_view< T, N > &dest)
 The contents of "src" are copied into "dest". More...
 
template<typename InputIter , typename T , int N>
completion_future copy_async (InputIter srcBegin, InputIter srcEnd, array< T, N > &dest)
 The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest". More...
 
template<typename InputIter , typename T , int N>
completion_future copy_async (InputIter srcBegin, array< T, N > &dest)
 The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest". More...
 
template<typename InputIter , typename T , int N>
completion_future copy_async (InputIter srcBegin, InputIter srcEnd, const array_view< T, N > &dest)
 The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest". More...
 
template<typename InputIter , typename T , int N>
completion_future copy_async (InputIter srcBegin, const array_view< T, N > &dest)
 The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest". More...
 
unsigned int atomic_exchange (unsigned int *dest, unsigned int val)
 Atomically read the value stored in dest , replace it with the value given in val and return the old value to the caller. More...
 
int atomic_exchange (int *dest, int val)
 Atomically read the value stored in dest , replace it with the value given in val and return the old value to the caller. More...
 
float atomic_exchange (float *dest, float val)
 Atomically read the value stored in dest , replace it with the value given in val and return the old value to the caller. More...
 
unsigned int atomic_compare_exchange (unsigned int *dest, unsigned int *expected_val, unsigned int val)
 These functions attempt to perform these three steps atomically: More...
 
int atomic_compare_exchange (int *dest, int *expected_val, int val)
 These functions attempt to perform these three steps atomically: More...
 
unsigned atomic_fetch_add (unsigned *x, unsigned y)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
int atomic_fetch_add (int *x, int y)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
float atomic_fetch_add (float *x, float y)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
unsigned atomic_fetch_sub (unsigned *x, unsigned y)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
int atomic_fetch_sub (int *x, int y)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
float atomic_fetch_sub (float *x, float y)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
unsigned atomic_fetch_and (unsigned *x, unsigned y)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
int atomic_fetch_and (int *x, int y)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
unsigned atomic_fetch_or (unsigned *x, unsigned y)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
int atomic_fetch_or (int *x, int y)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
unsigned atomic_fetch_xor (unsigned *x, unsigned y)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
int atomic_fetch_xor (int *x, int y)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
int atomic_fetch_max (int *dest, int val)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
unsigned int atomic_fetch_max (unsigned int *dest, unsigned int val)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
int atomic_fetch_min (int *dest, int val)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
unsigned int atomic_fetch_min (unsigned int *dest, unsigned int val)
 Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest. More...
 
int atomic_fetch_inc (int *_Dest)
 Atomically increment or decrement the value stored at the location point to by dest. More...
 
unsigned int atomic_fetch_inc (unsigned int *_Dest)
 Atomically increment or decrement the value stored at the location point to by dest. More...
 
int atomic_fetch_dec (int *_Dest)
 Atomically increment or decrement the value stored at the location point to by dest. More...
 
unsigned int atomic_fetch_dec (unsigned int *_Dest)
 Atomically increment or decrement the value stored at the location point to by dest. More...
 

Variables

extent< N > compute_domain
 
extent< N > const Kernel & f
 
size_t ext [3]
 
size_t tile = compute_domain.tile_dim0
 

Detailed Description

C++ AMP namespace.

Function Documentation

void Concurrency::all_memory_fence ( const tile_barrier )

Establishes a thread-tile scoped memory fence for both global and tile-static memory operations.

This function does not imply a barrier and is therefore permitted in divergent code.

Referenced by Concurrency::tile_barrier::wait_with_tile_static_memory_fence().

unsigned int Concurrency::atomic_compare_exchange ( unsigned int *  dest,
unsigned int *  expected_val,
unsigned int  val 
)

These functions attempt to perform these three steps atomically:

  1. Read the value stored in the location pointed to by dest
  2. Compare the value read in the previous step with the value contained in the location pointed by expected_val
  3. Carry the following operations depending on the result of the comparison of the previous step: a. If the values are identical, then the function tries to atomically change the value pointed by dest to the value in val. The function indicates by its return value whether this transformation has been successful or not. b. If the values are not identical, then the function stores the value read in step (1) into the location pointed to by expected_val, and returns false.
Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[out]expected_valA pointer to a local variable or function parameter. Upon calling the function, the location pointed by expected_val contains the value the caller expects dest to contain. Upon return from the function, expected_val will contain the most recent value read from dest.
[in]valThe new value to be stored in the location pointed to be dest
Returns
The return value indicates whether the function has been successful in atomically reading, comparing and modifying the contents of the memory location.

Referenced by copy_async().

int Concurrency::atomic_compare_exchange ( int *  dest,
int *  expected_val,
int  val 
)

These functions attempt to perform these three steps atomically:

  1. Read the value stored in the location pointed to by dest
  2. Compare the value read in the previous step with the value contained in the location pointed by expected_val
  3. Carry the following operations depending on the result of the comparison of the previous step: a. If the values are identical, then the function tries to atomically change the value pointed by dest to the value in val. The function indicates by its return value whether this transformation has been successful or not. b. If the values are not identical, then the function stores the value read in step (1) into the location pointed to by expected_val, and returns false.
Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[out]expected_valA pointer to a local variable or function parameter. Upon calling the function, the location pointed by expected_val contains the value the caller expects dest to contain. Upon return from the function, expected_val will contain the most recent value read from dest.
[in]valThe new value to be stored in the location pointed to be dest
Returns
The return value indicates whether the function has been successful in atomically reading, comparing and modifying the contents of the memory location.
unsigned int Concurrency::atomic_exchange ( unsigned int *  dest,
unsigned int  val 
)

Atomically read the value stored in dest , replace it with the value given in val and return the old value to the caller.

This function provides overloads for int , unsigned int and float parameters.

Parameters
[out]destA pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe new value to be stored in the location pointed to be dest
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.

Referenced by copy_async().

int Concurrency::atomic_exchange ( int *  dest,
int  val 
)

Atomically read the value stored in dest , replace it with the value given in val and return the old value to the caller.

This function provides overloads for int , unsigned int and float parameters.

Parameters
[out]destA pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe new value to be stored in the location pointed to be dest
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.
float Concurrency::atomic_exchange ( float *  dest,
float  val 
)

Atomically read the value stored in dest , replace it with the value given in val and return the old value to the caller.

This function provides overloads for int , unsigned int and float parameters.

Parameters
[out]destA pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe new value to be stored in the location pointed to be dest
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.
unsigned Concurrency::atomic_fetch_add ( unsigned *  x,
unsigned  y 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.

Referenced by copy_async().

int Concurrency::atomic_fetch_add ( int *  x,
int  y 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.
float Concurrency::atomic_fetch_add ( float *  x,
float  y 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.
unsigned Concurrency::atomic_fetch_and ( unsigned *  x,
unsigned  y 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.

Referenced by copy_async().

int Concurrency::atomic_fetch_and ( int *  x,
int  y 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.
int Concurrency::atomic_fetch_dec ( int *  _Dest)

Atomically increment or decrement the value stored at the location point to by dest.

Parameters
[in,out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.

Referenced by copy_async().

unsigned int Concurrency::atomic_fetch_dec ( unsigned int *  _Dest)

Atomically increment or decrement the value stored at the location point to by dest.

Parameters
[in,out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.
int Concurrency::atomic_fetch_inc ( int *  _Dest)

Atomically increment or decrement the value stored at the location point to by dest.

Parameters
[in,out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.

Referenced by copy_async().

unsigned int Concurrency::atomic_fetch_inc ( unsigned int *  _Dest)

Atomically increment or decrement the value stored at the location point to by dest.

Parameters
[in,out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.
int Concurrency::atomic_fetch_max ( int *  dest,
int  val 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.

Referenced by copy_async().

unsigned int Concurrency::atomic_fetch_max ( unsigned int *  dest,
unsigned int  val 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.
int Concurrency::atomic_fetch_min ( int *  dest,
int  val 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.

Referenced by copy_async().

unsigned int Concurrency::atomic_fetch_min ( unsigned int *  dest,
unsigned int  val 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.
unsigned Concurrency::atomic_fetch_or ( unsigned *  x,
unsigned  y 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.

Referenced by copy_async().

int Concurrency::atomic_fetch_or ( int *  x,
int  y 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.
unsigned Concurrency::atomic_fetch_sub ( unsigned *  x,
unsigned  y 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.

Referenced by copy_async().

int Concurrency::atomic_fetch_sub ( int *  x,
int  y 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.
float Concurrency::atomic_fetch_sub ( float *  x,
float  y 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.
unsigned Concurrency::atomic_fetch_xor ( unsigned *  x,
unsigned  y 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.

Referenced by copy_async().

int Concurrency::atomic_fetch_xor ( int *  x,
int  y 
)

Atomically read the value stored in dest, apply the binary numerical operation specific to the function with the read value and val serving as input operands, and store the result back to the location pointed by dest.

In terms of sequential semantics, the operation performed by any of the above function is described by the following piece of pseudo-code:

*dest = *dest $\otimes$ val;

Where the operation denoted by $\otimes$ is one of: addition (atomic_fetch_add), subtraction (atomic_fetch_sub), find maximum (atomic_fetch_max), find minimum (atomic_fetch_min), bit-wise AND (atomic_fetch_and), bit-wise OR (atomic_fetch_or), bit-wise XOR (atomic_fetch_xor).

Parameters
[out]destAn pointer to the location which needs to be atomically modified. The location may reside within a concurrency::array or concurrency::array_view or within a tile_static variable.
[in]valThe second operand which participates in the calculation of the binary operation whose result is stored into the location pointed to be dest.
Returns
These functions return the old value which was previously stored at dest, and that was atomically replaced. These functions always succeed.
template<typename T , int N>
void Concurrency::copy ( const array_view< const T, N > &  src,
const array_view< T, N > &  dest 
)

The contents of "src" are copied into "dest".

If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array_view<T,N> (or array_view<const T, N>) to be copied from.
[out]destAn object of type array_view<T,N> to be copied to.

References Concurrency::array_view< T, N >::get_extent().

Referenced by Concurrency::array< T, N >::array(), copy(), copy_async(), Concurrency::array< T, N >::copy_to(), Concurrency::array_view< T, N >::copy_to(), Concurrency::array_view< const T, N >::copy_to(), Concurrency::array< T, N >::operator std::vector< T >(), Concurrency::array< T, N >::view_as(), Concurrency::array_view< T, N >::view_as(), and Concurrency::array_view< const T, N >::view_as().

template<typename T , int N>
void Concurrency::copy ( const array_view< T, N > &  src,
const array_view< T, N > &  dest 
)

The contents of "src" are copied into "dest".

If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array_view<T,N> (or array_view<const T, N>) to be copied from.
[out]destAn object of type array_view<T,N> to be copied to.

References copy().

template<typename T , int N>
void Concurrency::copy ( const array< T, N > &  src,
const array_view< T, N > &  dest 
)

The contents of "src" are copied into "dest".

If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array<T,N> to be copied from.
[out]destAn object of type array_view<T,N> to be copied to.

References Concurrency::array_view< T, N >::get_extent().

template<typename T , int N>
void Concurrency::copy ( const array< T, N > &  src,
array< T, N > &  dest 
)

The contents of "src" are copied into "dest".

The source and destination may reside on different accelerators. If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array<T,N> to be copied from.
[out]destAn object of type array<T,N> to be copied to.
template<typename T , int N>
void Concurrency::copy ( const array_view< const T, N > &  src,
array< T, N > &  dest 
)

The contents of "src" are copied into "dest".

If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array_view<T,N> (or array_view<const T, N>) to be copied from.
[out]destAn object of type array<T,N> to be copied to.

References Concurrency::array< T, N >::get_extent().

template<typename T , int N>
void Concurrency::copy ( const array_view< T, N > &  src,
array< T, N > &  dest 
)

The contents of "src" are copied into "dest".

If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array_view<T,N> (or array_view<const T, N>) to be copied from.
[out]destAn object of type array<T,N> to be copied to.

References copy().

template<typename InputIter , typename T , int N>
void Concurrency::copy ( InputIter  srcBegin,
InputIter  srcEnd,
const array_view< T, N > &  dest 
)

The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest".

If the number of elements in the iterator range is not equal to "dest.extent.size()", an exception is thrown.

In the overloads which don't take an end-iterator it is assumed that the source iterator is able to provide at least dest.extent.size() elements, but no checking is performed (nor possible).

Parameters
[in]srcBeginAn iterator to the first element of a source container.
[in]srcEndAn interator to the end of a source container.
[out]destAn object of type array_view<T,N> to be copied to.
template<typename InputIter , typename T , int N>
void Concurrency::copy ( InputIter  srcBegin,
InputIter  srcEnd,
array< T, N > &  dest 
)

The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest".

If the number of elements in the iterator range is not equal to "dest.extent.size()", an exception is thrown.

In the overloads which don't take an end-iterator it is assumed that the source iterator is able to provide at least dest.extent.size() elements, but no checking is performed (nor possible).

Parameters
[in]srcBeginAn iterator to the first element of a source container.
[in]srcEndAn interator to the end of a source container.
[out]destAn object of type array<T,N> to be copied to.

References Concurrency::array< T, N >::get_extent().

template<typename InputIter , typename T , int N>
void Concurrency::copy ( InputIter  srcBegin,
const array_view< T, N > &  dest 
)

The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest".

If the number of elements in the iterator range is not equal to "dest.extent.size()", an exception is thrown.

In the overloads which don't take an end-iterator it is assumed that the source iterator is able to provide at least dest.extent.size() elements, but no checking is performed (nor possible).

Parameters
[in]srcBeginAn iterator to the first element of a source container.
[in]srcEndAn interator to the end of a source container.
[out]destAn object of type array_view<T,N> to be copied to.

References copy(), and Concurrency::array_view< T, N >::get_extent().

template<typename InputIter , typename T , int N>
void Concurrency::copy ( InputIter  srcBegin,
array< T, N > &  dest 
)

The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest".

If the number of elements in the iterator range is not equal to "dest.extent.size()", an exception is thrown.

In the overloads which don't take an end-iterator it is assumed that the source iterator is able to provide at least dest.extent.size() elements, but no checking is performed (nor possible).

Parameters
[in]srcBeginAn iterator to the first element of a source container.
[in]srcEndAn interator to the end of a source container.
[out]destAn object of type array<T,N> to be copied to.

References copy(), and Concurrency::array< T, N >::get_extent().

template<typename OutputIter , typename T , int N>
void Concurrency::copy ( const array_view< T, N > &  src,
OutputIter  destBegin 
)

The contents of a source array are copied into "dest" starting with iterator destBegin.

If the number of elements in the range starting destBegin in the destination container is smaller than "src.extent.size()", the behavior is undefined.

Parameters
[in]srcAn object of type array_view<T,N> to be copied from.
[out]destBeginAn output iterator addressing the position of the first element in the destination container.
template<typename OutputIter , typename T , int N>
void Concurrency::copy ( const array< T, N > &  src,
OutputIter  destBegin 
)

The contents of a source array are copied into "dest" starting with iterator destBegin.

If the number of elements in the range starting destBegin in the destination container is smaller than "src.extent.size()", the behavior is undefined.

Parameters
[in]srcAn object of type array<T,N> to be copied from.
[out]destBeginAn output iterator addressing the position of the first element in the destination container.
template<typename T >
void Concurrency::copy ( const array< T, 1 > &  src,
const array_view< T, 1 > &  dest 
)

The contents of "src" are copied into "dest".

If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array<T,N> to be copied from.
[out]destAn object of type array_view<T,N> to be copied to.

References Concurrency::array_view< T, N >::get_extent().

template<typename T >
void Concurrency::copy ( const array_view< const T, 1 > &  src,
array< T, 1 > &  dest 
)

The contents of "src" are copied into "dest".

If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array_view<T,N> (or array_view<const T, N>) to be copied from.
[out]destAn object of type array<T,N> to be copied to.

References Concurrency::array< T, N >::get_extent().

template<typename T >
void Concurrency::copy ( const array_view< const T, 1 > &  src,
const array_view< T, 1 > &  dest 
)

The contents of "src" are copied into "dest".

If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array_view<T,N> (or array_view<const T, N>) to be copied from.
[out]destAn object of type array_view<T,N> to be copied to.

References Concurrency::array_view< T, N >::get_extent().

template<typename T , int N>
completion_future Concurrency::copy_async ( const array< T, N > &  src,
array< T, N > &  dest 
)

The contents of "src" are copied into "dest".

The source and destination may reside on different accelerators. If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array<T,N> to be copied from.
[out]destAn object of type array<T,N> to be copied to.

References copy().

Referenced by copy_async(), and Concurrency::completion_future::then().

template<typename T , int N>
completion_future Concurrency::copy_async ( const array< T, N > &  src,
const array_view< T, N > &  dest 
)

The contents of "src" are copied into "dest".

If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array<T,N> to be copied from.
[out]destAn object of type array_view<T,N> to be copied to.

References copy().

template<typename T , int N>
completion_future Concurrency::copy_async ( const array_view< const T, N > &  src,
array< T, N > &  dest 
)

The contents of "src" are copied into "dest".

If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array_view<T,N> (or array_view<const T, N>) to be copied from.
[out]destAn object of type array<T,N> to be copied to.

References copy().

template<typename T , int N>
completion_future Concurrency::copy_async ( const array_view< T, N > &  src,
array< T, N > &  dest 
)

The contents of "src" are copied into "dest".

If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array_view<T,N> (or array_view<const T, N>) to be copied from.
[out]destAn object of type array<T,N> to be copied to.

References copy().

template<typename T , int N>
completion_future Concurrency::copy_async ( const array_view< const T, N > &  src,
const array_view< T, N > &  dest 
)

The contents of "src" are copied into "dest".

If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array_view<T,N> (or array_view<const T, N>) to be copied from.
[out]destAn object of type array_view<T,N> to be copied to.

References copy().

template<typename T , int N>
completion_future Concurrency::copy_async ( const array_view< T, N > &  src,
const array_view< T, N > &  dest 
)

The contents of "src" are copied into "dest".

If the extents of "src" and "dest" don't match, a runtime exception is thrown.

Parameters
[in]srcAn object of type array_view<T,N> (or array_view<const T, N>) to be copied from.
[out]destAn object of type array_view<T,N> to be copied to.

References copy().

template<typename InputIter , typename T , int N>
completion_future Concurrency::copy_async ( InputIter  srcBegin,
InputIter  srcEnd,
array< T, N > &  dest 
)

The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest".

If the number of elements in the iterator range is not equal to "dest.extent.size()", an exception is thrown.

In the overloads which don't take an end-iterator it is assumed that the source iterator is able to provide at least dest.extent.size() elements, but no checking is performed (nor possible).

Parameters
[in]srcBeginAn iterator to the first element of a source container.
[in]srcEndAn interator to the end of a source container.
[out]destAn object of type array<T,N> to be copied to.

References copy().

template<typename InputIter , typename T , int N>
completion_future Concurrency::copy_async ( InputIter  srcBegin,
array< T, N > &  dest 
)

The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest".

If the number of elements in the iterator range is not equal to "dest.extent.size()", an exception is thrown.

In the overloads which don't take an end-iterator it is assumed that the source iterator is able to provide at least dest.extent.size() elements, but no checking is performed (nor possible).

Parameters
[in]srcBeginAn iterator to the first element of a source container.
[in]srcEndAn interator to the end of a source container.
[out]destAn object of type array<T,N> to be copied to.

References copy().

template<typename InputIter , typename T , int N>
completion_future Concurrency::copy_async ( InputIter  srcBegin,
InputIter  srcEnd,
const array_view< T, N > &  dest 
)

The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest".

If the number of elements in the iterator range is not equal to "dest.extent.size()", an exception is thrown.

In the overloads which don't take an end-iterator it is assumed that the source iterator is able to provide at least dest.extent.size() elements, but no checking is performed (nor possible).

Parameters
[in]srcBeginAn iterator to the first element of a source container.
[in]srcEndAn interator to the end of a source container.
[out]destAn object of type array_view<T,N> to be copied to.

References copy().

template<typename InputIter , typename T , int N>
completion_future Concurrency::copy_async ( InputIter  srcBegin,
const array_view< T, N > &  dest 
)

The contents of a source container from the iterator range [srcBegin,srcEnd) are copied into "dest".

If the number of elements in the iterator range is not equal to "dest.extent.size()", an exception is thrown.

In the overloads which don't take an end-iterator it is assumed that the source iterator is able to provide at least dest.extent.size() elements, but no checking is performed (nor possible).

Parameters
[in]srcBeginAn iterator to the first element of a source container.
[in]srcEndAn interator to the end of a source container.
[out]destAn object of type array_view<T,N> to be copied to.

References copy().

template<typename OutputIter , typename T , int N>
completion_future Concurrency::copy_async ( const array< T, N > &  src,
OutputIter  destBegin 
)

The contents of a source array are copied into "dest" starting with iterator destBegin.

If the number of elements in the range starting destBegin in the destination container is smaller than "src.extent.size()", the behavior is undefined.

Parameters
[in]srcAn object of type array<T,N> to be copied from.
[out]destBeginAn output iterator addressing the position of the first element in the destination container.

References copy().

template<typename OutputIter , typename T , int N>
completion_future Concurrency::copy_async ( const array_view< T, N > &  src,
OutputIter  destBegin 
)

The contents of a source array are copied into "dest" starting with iterator destBegin.

If the number of elements in the range starting destBegin in the destination container is smaller than "src.extent.size()", the behavior is undefined.

Parameters
[in]srcAn object of type array_view<T,N> to be copied from.
[out]destBeginAn output iterator addressing the position of the first element in the destination container.

References atomic_compare_exchange(), atomic_exchange(), atomic_fetch_add(), atomic_fetch_and(), atomic_fetch_dec(), atomic_fetch_inc(), atomic_fetch_max(), atomic_fetch_min(), atomic_fetch_or(), atomic_fetch_sub(), atomic_fetch_xor(), copy(), and copy_async().

void Concurrency::global_memory_fence ( const tile_barrier )

Establishes a thread-tile scoped memory fence for global (but not tile-static) memory operations.

This function does not imply a barrier and is therefore permitted in divergent code.

Referenced by Concurrency::tile_barrier::wait_with_tile_static_memory_fence().

template<int N>
extent<N> Concurrency::operator% ( const extent< N > &  ext,
int  value 
)

Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands.

The result extent<N> is such that for a given operator $\oplus$, result[i] = ext[i] $\oplus$ value or result[i] = value $\oplus$ ext[i] for every i from 0 to N-1.

Parameters
[in]extThe extent<N> operand
[in]valueThe integer operand
template<int N>
extent<N> Concurrency::operator% ( int  value,
const extent< N > &  ext 
)

Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands.

The result extent<N> is such that for a given operator $\oplus$, result[i] = ext[i] $\oplus$ value or result[i] = value $\oplus$ ext[i] for every i from 0 to N-1.

Parameters
[in]extThe extent<N> operand
[in]valueThe integer operand
template<int N>
extent<N> Concurrency::operator* ( const extent< N > &  ext,
int  value 
)

Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands.

The result extent<N> is such that for a given operator $\oplus$, result[i] = ext[i] $\oplus$ value or result[i] = value $\oplus$ ext[i] for every i from 0 to N-1.

Parameters
[in]extThe extent<N> operand
[in]valueThe integer operand
template<int N>
extent<N> Concurrency::operator* ( int  value,
const extent< N > &  ext 
)

Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands.

The result extent<N> is such that for a given operator $\oplus$, result[i] = ext[i] $\oplus$ value or result[i] = value $\oplus$ ext[i] for every i from 0 to N-1.

Parameters
[in]extThe extent<N> operand
[in]valueThe integer operand
template<int N>
extent<N> Concurrency::operator+ ( const extent< N > &  lhs,
const extent< N > &  rhs 
)

Adds (or subtracts) two objects of extent<N> to form a new extent.

The result extent<N> is such that for a given operator $\oplus$, result[i] = leftExt[i] $\oplus$ rightExt[i] for every i from 0 to N-1.

Parameters
[in]lhsThe left-hand extent<N> to be compared.
[in]rhsThe right-hand extent<N> to be compared.
template<int N>
extent<N> Concurrency::operator+ ( const extent< N > &  ext,
int  value 
)

Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands.

The result extent<N> is such that for a given operator $\oplus$, result[i] = ext[i] $\oplus$ value or result[i] = value $\oplus$ ext[i] for every i from 0 to N-1.

Parameters
[in]extThe extent<N> operand
[in]valueThe integer operand
template<int N>
extent<N> Concurrency::operator+ ( int  value,
const extent< N > &  ext 
)

Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands.

The result extent<N> is such that for a given operator $\oplus$, result[i] = ext[i] $\oplus$ value or result[i] = value $\oplus$ ext[i] for every i from 0 to N-1.

Parameters
[in]extThe extent<N> operand
[in]valueThe integer operand
template<int N>
extent<N> Concurrency::operator- ( const extent< N > &  lhs,
const extent< N > &  rhs 
)

Adds (or subtracts) two objects of extent<N> to form a new extent.

The result extent<N> is such that for a given operator $\oplus$, result[i] = leftExt[i] $\oplus$ rightExt[i] for every i from 0 to N-1.

Parameters
[in]lhsThe left-hand extent<N> to be compared.
[in]rhsThe right-hand extent<N> to be compared.
template<int N>
extent<N> Concurrency::operator- ( const extent< N > &  ext,
int  value 
)

Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands.

The result extent<N> is such that for a given operator $\oplus$, result[i] = ext[i] $\oplus$ value or result[i] = value $\oplus$ ext[i] for every i from 0 to N-1.

Parameters
[in]extThe extent<N> operand
[in]valueThe integer operand
template<int N>
extent<N> Concurrency::operator- ( int  value,
const extent< N > &  ext 
)

Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands.

The result extent<N> is such that for a given operator $\oplus$, result[i] = ext[i] $\oplus$ value or result[i] = value $\oplus$ ext[i] for every i from 0 to N-1.

Parameters
[in]extThe extent<N> operand
[in]valueThe integer operand
template<int N>
extent<N> Concurrency::operator/ ( const extent< N > &  ext,
int  value 
)

Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands.

The result extent<N> is such that for a given operator $\oplus$, result[i] = ext[i] $\oplus$ value or result[i] = value $\oplus$ ext[i] for every i from 0 to N-1.

Parameters
[in]extThe extent<N> operand
[in]valueThe integer operand
template<int N>
extent<N> Concurrency::operator/ ( int  value,
const extent< N > &  ext 
)

Binary arithmetic operations that produce a new extent<N> that is the result of performing the corresponding binary arithmetic operation on the elements of the extent operands.

The result extent<N> is such that for a given operator $\oplus$, result[i] = ext[i] $\oplus$ value or result[i] = value $\oplus$ ext[i] for every i from 0 to N-1.

Parameters
[in]extThe extent<N> operand
[in]valueThe integer operand
void Concurrency::tile_static_memory_fence ( const tile_barrier )

Establishes a thread-tile scoped memory fence for tile-static (but not global) memory operations.

This function does not imply a barrier and is therefore permitted in divergent code.

Referenced by Concurrency::tile_barrier::wait_with_tile_static_memory_fence().

Variable Documentation

size_t Concurrency::ext
Initial value:
= {static_cast<size_t>(compute_domain[N - 1]),
static_cast<size_t>(compute_domain[N - 2]),
static_cast<size_t>(compute_domain[N - 3])}
tiled_extent< D0, D1, D2 > const Kernel & Concurrency::f
Initial value:
{
size_t compute_domain_size = 1