DPC++ Runtime
Runtime libraries for oneAPI DPC++

Memory access functions which perform per-lane atomic update using given operation. "Per-lane" means that the atomicity guarantees of a vector atomic operation are the same as of N independent scalar atomic operations per lane (N is number of lanes). More...

Collaboration diagram for Atomic memory access.:

Functions

template<atomic_op Op, typename Tx , int N, typename Toffset >
__ESIMD_API simd< Tx, N > sycl::_V1::ext::intel::esimd::atomic_update (Tx *p, simd< Toffset, N > offset, simd< Tx, N > src0, simd_mask< N > mask)
 Single-argument variant of the atomic update operation. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset , typename RegionTy = region1d_t<Toffset, N, 1>>
__ESIMD_API simd< Tx, N > sycl::_V1::ext::intel::esimd::atomic_update (Tx *p, simd_view< Toffset, RegionTy > offsets, simd< Tx, N > src0, simd_mask< N > mask)
 A variation of atomic_update API with offsets represented as simd_view object. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset >
__ESIMD_API std::enable_if_t< std::is_integral_v< Toffset > &&((Op !=atomic_op::store &&Op !=atomic_op::xchg)||N==1), simd< Tx, N > > sycl::_V1::ext::intel::esimd::atomic_update (Tx *p, Toffset offset, simd< Tx, N > src0, simd_mask< N > mask)
 A variation of atomic_update API with offset represented as scalar object. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset >
__ESIMD_API simd< Tx, N > sycl::_V1::ext::intel::esimd::atomic_update (Tx *p, simd< Toffset, N > offset, simd_mask< N > mask)
 No-argument variant of the atomic update operation. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset , typename RegionTy = region1d_t<Toffset, N, 1>>
__ESIMD_API simd< Tx, N > sycl::_V1::ext::intel::esimd::atomic_update (Tx *p, simd_view< Toffset, RegionTy > offsets, simd_mask< N > mask=1)
 A variation of atomic_update API with offsets represented as simd_view object. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset >
__ESIMD_API std::enable_if_t< std::is_integral_v< Toffset >, simd< Tx, N > > sycl::_V1::ext::intel::esimd::atomic_update (Tx *p, Toffset offset, simd_mask< N > mask=1)
 A variation of atomic_update API with offset represented as scalar. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset >
__ESIMD_API simd< Tx, N > sycl::_V1::ext::intel::esimd::atomic_update (Tx *p, simd< Toffset, N > offset, simd< Tx, N > src0, simd< Tx, N > src1, simd_mask< N > mask)
 
template<atomic_op Op, typename Tx , int N, typename Toffset , typename RegionTy = region1d_t<Toffset, N, 1>>
__ESIMD_API simd< Tx, N > sycl::_V1::ext::intel::esimd::atomic_update (Tx *p, simd_view< Toffset, RegionTy > offsets, simd< Tx, N > src0, simd< Tx, N > src1, simd_mask< N > mask)
 A variation of atomic_update API with offsets represented as simd_view object. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset >
__ESIMD_API std::enable_if_t< std::is_integral_v< Toffset >, simd< Tx, N > > sycl::_V1::ext::intel::esimd::atomic_update (Tx *p, Toffset offset, simd< Tx, N > src0, simd< Tx, N > src1, simd_mask< N > mask)
 A variation of atomic_update API with offsets represented as scalar. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy >
__ESIMD_API std::enable_if_t< std::is_integral_v< Toffset > &&!std::is_pointer< AccessorTy >::value, simd< Tx, N > > sycl::_V1::ext::intel::esimd::atomic_update (AccessorTy acc, simd< Toffset, N > offset, simd< Tx, N > src0, simd_mask< N > mask)
 Single-argument variant of the atomic update operation. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy , typename RegionTy = region1d_t<Toffset, N, 1>>
__ESIMD_API std::enable_if_t< std::is_integral_v< Toffset > &&!std::is_pointer< AccessorTy >::value, simd< Tx, N > > sycl::_V1::ext::intel::esimd::atomic_update (AccessorTy acc, simd_view< Toffset, RegionTy > offsets, simd< Tx, N > src0, simd_mask< N > mask)
 A variation of atomic_update API with offsets represented as simd_view object. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy >
__ESIMD_API std::enable_if_t< std::is_integral_v< Toffset > &&!std::is_pointer< AccessorTy >::value &&((Op !=atomic_op::store &&Op !=atomic_op::xchg)||N==1), simd< Tx, N > > sycl::_V1::ext::intel::esimd::atomic_update (AccessorTy acc, Toffset offset, simd< Tx, N > src0, simd_mask< N > mask)
 A variation of atomic_update API with offset represented as scalar object. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy >
__ESIMD_API __ESIMD_API std::enable_if_t< std::is_integral_v< Toffset > &&!std::is_pointer< AccessorTy >::value, simd< Tx, N > > sycl::_V1::ext::intel::esimd::atomic_update (AccessorTy acc, simd< Toffset, N > offset, simd_mask< N > mask)
 No-argument variant of the atomic update operation. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy , typename RegionTy = region1d_t<Toffset, N, 1>>
__ESIMD_API std::enable_if_t< std::is_integral_v< Toffset > &&!std::is_pointer< AccessorTy >::value, simd< Tx, N > > sycl::_V1::ext::intel::esimd::atomic_update (AccessorTy acc, simd_view< Toffset, RegionTy > offsets, simd_mask< N > mask)
 A variation of atomic_update API with offsets represented as simd_view object. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy >
__ESIMD_API std::enable_if_t< std::is_integral_v< Toffset > &&!std::is_pointer< AccessorTy >::value, simd< Tx, N > > sycl::_V1::ext::intel::esimd::atomic_update (AccessorTy acc, Toffset offset, simd_mask< N > mask)
 A variation of atomic_update API with offset represented as scalar. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy >
__ESIMD_API std::enable_if_t< std::is_integral_v< Toffset > &&!std::is_pointer< AccessorTy >::value, simd< Tx, N > > sycl::_V1::ext::intel::esimd::atomic_update (AccessorTy acc, simd< Toffset, N > offset, simd< Tx, N > src0, simd< Tx, N > src1, simd_mask< N > mask)
 
template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy , typename RegionTy = region1d_t<Toffset, N, 1>>
__ESIMD_API std::enable_if_t< std::is_integral_v< Toffset > &&!std::is_pointer< AccessorTy >::value, simd< Tx, N > > sycl::_V1::ext::intel::esimd::atomic_update (AccessorTy acc, simd_view< Toffset, RegionTy > offsets, simd< Tx, N > src0, simd< Tx, N > src1, simd_mask< N > mask)
 A variation of atomic_update API with offsets represented as simd_view object. More...
 
template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy >
__ESIMD_API std::enable_if_t< std::is_integral_v< Toffset > &&!std::is_pointer< AccessorTy >::value, simd< Tx, N > > sycl::_V1::ext::intel::esimd::atomic_update (AccessorTy acc, Toffset offset, simd< Tx, N > src0, simd< Tx, N > src1, simd_mask< N > mask)
 A variation of atomic_update API with offsets represented as scalar. More...
 

Detailed Description

Memory access functions which perform per-lane atomic update using given operation. "Per-lane" means that the atomicity guarantees of a vector atomic operation are the same as of N independent scalar atomic operations per lane (N is number of lanes).

Function Documentation

◆ atomic_update() [1/18]

template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy >
__ESIMD_API std::enable_if_t<std::is_integral_v<Toffset> && !std::is_pointer<AccessorTy>::value, simd<Tx, N> > sycl::_V1::ext::intel::esimd::atomic_update ( AccessorTy  acc,
simd< Toffset, N >  offset,
simd< Tx, N >  src0,
simd< Tx, N >  src1,
simd_mask< N >  mask 
)

Atomically updates N memory locations represented by an accessor and a vector of offsets and returns a vector of old values found at the memory locations before update. The update operation has 2 additional arguments.

Template Parameters
OpThe atomic operation - can be one of the following: atomic_op::cmpxchg, atomic_op::fcmpwr.
TxThe vector element type.
NThe number of memory locations to update.
AccessorTytype of the SYCL accessor.
Parameters
accThe SYCL accessor.
offsetThe vector of 32-bit or 64-bit offsets in bytes. 64-bit offsets are supported only when stateless memory accesses are enforced, i.e. accessor based accesses are automatically converted to stateless accesses.
src0The first additional argument (new value).
src1The second additional argument (expected value).
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1590 of file memory.hpp.

References sycl::_V1::ext::intel::esimd::get_surface_index().

◆ atomic_update() [2/18]

template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy >
__ESIMD_API std::enable_if_t<std::is_integral_v<Toffset> && !std::is_pointer<AccessorTy>::value, simd<Tx, N> > sycl::_V1::ext::intel::esimd::atomic_update ( AccessorTy  acc,
simd< Toffset, N >  offset,
simd< Tx, N >  src0,
simd_mask< N >  mask 
)

Single-argument variant of the atomic update operation.

Atomically updates N memory locations represented by an accessor and a vector of offsets, and returns a vector of old values found at the memory locations before update. The update operation has 1 additional argument.

Template Parameters
OpThe atomic operation - can be one of the following: atomic_op::add, atomic_op::sub, atomic_op::min, atomic_op::max, atomic_op::xchg, atomic_op::bit_and, atomic_op::bit_or, atomic_op::bit_xor, atomic_op::minsint, atomic_op::maxsint, atomic_op::fmax, atomic_op::fmin, atomic_op::store.
TxThe vector element type.
NThe number of memory locations to update.
AccessorTytype of the SYCL accessor.
Parameters
accThe SYCL accessor.
offsetThe vector of 32-bit or 64-bit offsets in bytes. 64-bit offsets are supported only when stateless memory accesses are enforced, i.e. accessor based accesses are automatically converted to stateless accesses.
src0The additional argument.
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1357 of file memory.hpp.

References sycl::_V1::ext::oneapi::fmax(), sycl::_V1::ext::oneapi::fmin(), and sycl::_V1::ext::intel::esimd::get_surface_index().

◆ atomic_update() [3/18]

template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy >
__ESIMD_API __ESIMD_API std::enable_if_t<std::is_integral_v<Toffset> && !std::is_pointer<AccessorTy>::value, simd<Tx, N> > sycl::_V1::ext::intel::esimd::atomic_update ( AccessorTy  acc,
simd< Toffset, N >  offset,
simd_mask< N >  mask 
)

No-argument variant of the atomic update operation.

Atomically updates N memory locations represented by an accessor and a vector of offsets, and returns a vector of old values found at the memory locations before update. The update operation has no arguments in addition to the value at the memory location.

Template Parameters
OpThe atomic operation - can be atomic_op::inc or atomic_op::dec, atomic_op::load.
TxThe vector element type.
NThe number of memory locations to update.
AccessorTytype of the SYCL accessor.
Parameters
accThe SYCL accessor.
offsetThe vector of 32-bit or 64-bit offsets in bytes. 64-bit offsets are supported only when stateless memory accesses are enforced, i.e. accessor based accesses are automatically converted to stateless accesses.
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1482 of file memory.hpp.

References sycl::_V1::ext::intel::esimd::get_surface_index().

◆ atomic_update() [4/18]

template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy , typename RegionTy = region1d_t<Toffset, N, 1>>
__ESIMD_API std::enable_if_t<std::is_integral_v<Toffset> && !std::is_pointer<AccessorTy>::value, simd<Tx, N> > sycl::_V1::ext::intel::esimd::atomic_update ( AccessorTy  acc,
simd_view< Toffset, RegionTy >  offsets,
simd< Tx, N >  src0,
simd< Tx, N >  src1,
simd_mask< N >  mask 
)

A variation of atomic_update API with offsets represented as simd_view object.

Template Parameters
OpThe atomic operation - can be one of the following: atomic_op::cmpxchg, atomic_op::fcmpwr.
TxThe vector element type.
NThe number of memory locations to update.
AccessorTytype of the SYCL accessor.
Parameters
accThe SYCL accessor.
offsetThe simd_view of 32-bit or 64-bit offsets in bytes. 64-bit offsets are supported only when stateless memory accesses are enforced, i.e. accessor based accesses are automatically converted to stateless accesses.
src0The first additional argument (new value).
src1The second additional argument (expected value).
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1637 of file memory.hpp.

◆ atomic_update() [5/18]

template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy , typename RegionTy = region1d_t<Toffset, N, 1>>
__ESIMD_API std::enable_if_t<std::is_integral_v<Toffset> && !std::is_pointer<AccessorTy>::value, simd<Tx, N> > sycl::_V1::ext::intel::esimd::atomic_update ( AccessorTy  acc,
simd_view< Toffset, RegionTy >  offsets,
simd< Tx, N >  src0,
simd_mask< N >  mask 
)

A variation of atomic_update API with offsets represented as simd_view object.

Template Parameters
OpThe atomic operation - can be one of the following: atomic_op::add, atomic_op::sub, atomic_op::min, atomic_op::max, atomic_op::xchg, atomic_op::bit_and, atomic_op::bit_or, atomic_op::bit_xor, atomic_op::minsint, atomic_op::maxsint, atomic_op::fmax, atomic_op::fmin, atomic_op::store.
TxThe vector element type.
NThe number of memory locations to update.
AccessorTytype of the SYCL accessor.
Parameters
accThe SYCL accessor.
offsetsThe simd_view of 32-bit or 64-bit offsets in bytes. 64-bit offsets are supported only when stateless memory accesses are enforced, i.e. accessor based accesses are automatically converted to stateless accesses.
src0The additional argument.
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1417 of file memory.hpp.

◆ atomic_update() [6/18]

template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy , typename RegionTy = region1d_t<Toffset, N, 1>>
__ESIMD_API std::enable_if_t<std::is_integral_v<Toffset> && !std::is_pointer<AccessorTy>::value, simd<Tx, N> > sycl::_V1::ext::intel::esimd::atomic_update ( AccessorTy  acc,
simd_view< Toffset, RegionTy >  offsets,
simd_mask< N >  mask 
)

A variation of atomic_update API with offsets represented as simd_view object.

Template Parameters
OpThe atomic operation - can be atomic_op::inc or atomic_op::dec, atomic_op::load.
TxThe vector element type.
NThe number of memory locations to update.
AccessorTytype of the SYCL accessor.
Parameters
accThe SYCL accessor.
offsetThe simd_view of 32-bit or 64-bit offsets in bytes. 64-bit offsets are supported only when stateless memory accesses are enforced, i.e. accessor based accesses are automatically converted to stateless accesses.
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1532 of file memory.hpp.

◆ atomic_update() [7/18]

template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy >
__ESIMD_API std::enable_if_t<std::is_integral_v<Toffset> && !std::is_pointer<AccessorTy>::value, simd<Tx, N> > sycl::_V1::ext::intel::esimd::atomic_update ( AccessorTy  acc,
Toffset  offset,
simd< Tx, N >  src0,
simd< Tx, N >  src1,
simd_mask< N >  mask 
)

A variation of atomic_update API with offsets represented as scalar.

Template Parameters
OpThe atomic operation - can be one of the following: atomic_op::cmpxchg, atomic_op::fcmpwr.
TxThe vector element type.
NThe number of memory locations to update.
AccessorTytype of the SYCL accessor.
Parameters
accThe SYCL accessor.
offsetThe scalar 32-bit or 64-bit offset in bytes. 64-bit offset are supported only when stateless memory accesses are enforced, i.e. accessor based accesses are automatically converted to stateless accesses.
src0The first additional argument (new value).
src1The second additional argument (expected value).
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1666 of file memory.hpp.

◆ atomic_update() [8/18]

template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy >
__ESIMD_API std::enable_if_t< std::is_integral_v<Toffset> && !std::is_pointer<AccessorTy>::value && ((Op != atomic_op::store && Op != atomic_op::xchg) || N == 1), simd<Tx, N> > sycl::_V1::ext::intel::esimd::atomic_update ( AccessorTy  acc,
Toffset  offset,
simd< Tx, N >  src0,
simd_mask< N >  mask 
)

A variation of atomic_update API with offset represented as scalar object.

Template Parameters
OpThe atomic operation - can be one of the following: atomic_op::add, atomic_op::sub, atomic_op::min, atomic_op::max, atomic_op::xchg, atomic_op::bit_and, atomic_op::bit_or, atomic_op::bit_xor, atomic_op::minsint, atomic_op::maxsint, atomic_op::fmax, atomic_op::fmin atomic_op::store.
TxThe vector element type.
NThe number of memory locations to update.
AccessorTytype of the SYCL accessor.
Parameters
accThe SYCL accessor.
offsetThe scalar 32-bit or 64-bit offset in bytes. 64-bit offset are supported only when stateless memory accesses are enforced, i.e. accessor based accesses are automatically converted to stateless accesses.
src0The additional argument.
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1449 of file memory.hpp.

◆ atomic_update() [9/18]

template<atomic_op Op, typename Tx , int N, typename Toffset , typename AccessorTy >
__ESIMD_API std::enable_if_t<std::is_integral_v<Toffset> && !std::is_pointer<AccessorTy>::value, simd<Tx, N> > sycl::_V1::ext::intel::esimd::atomic_update ( AccessorTy  acc,
Toffset  offset,
simd_mask< N >  mask 
)

A variation of atomic_update API with offset represented as scalar.

Template Parameters
OpThe atomic operation - can be atomic_op::inc or atomic_op::dec, atomic_op::load.
TxThe vector element type.
NThe number of memory locations to update.
AccessorTytype of the SYCL accessor.
Parameters
accThe SYCL accessor.
offsetThe scalar 32-bit or 64-bit offset in bytes. 64-bit offset are supported only when stateless memory accesses are enforced, i.e. accessor based accesses are automatically converted to stateless accesses.
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1559 of file memory.hpp.

◆ atomic_update() [10/18]

template<atomic_op Op, typename Tx , int N, typename Toffset >
__ESIMD_API simd<Tx, N> sycl::_V1::ext::intel::esimd::atomic_update ( Tx *  p,
simd< Toffset, N >  offset,
simd< Tx, N >  src0,
simd< Tx, N >  src1,
simd_mask< N >  mask 
)

Atomically updates N memory locations represented by a USM pointer and a vector of offsets relative to the pointer, and returns a vector of old values found at the memory locations before update. The update operation has 2 additional arguments.

Template Parameters
OpThe atomic operation - can be one of the following: atomic_op::cmpxchg, atomic_op::fcmpwr.
TxThe vector element type.
NThe number of memory locations to update.
Parameters
pThe USM pointer.
offsetThe vector of 32-bit or 64-bit offsets in bytes.
src0The first additional argument (new value).
src1The second additional argument (expected value).
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1259 of file memory.hpp.

◆ atomic_update() [11/18]

template<atomic_op Op, typename Tx , int N, typename Toffset >
__ESIMD_API simd<Tx, N> sycl::_V1::ext::intel::esimd::atomic_update ( Tx *  p,
simd< Toffset, N >  offset,
simd< Tx, N >  src0,
simd_mask< N >  mask 
)

Single-argument variant of the atomic update operation.

Atomically updates N memory locations represented by a USM pointer and a vector of offsets relative to the pointer, and returns a vector of old values found at the memory locations before update. The update operation has 1 additional argument.

Template Parameters
OpThe atomic operation - can be one of the following: atomic_op::add, atomic_op::sub, atomic_op::min, atomic_op::max, atomic_op::xchg, atomic_op::bit_and, atomic_op::bit_or, atomic_op::bit_xor, atomic_op::minsint, atomic_op::maxsint, atomic_op::fmax, atomic_op::fmin, atomic_op::store.
TxThe vector element type.
NThe number of memory locations to update.
Parameters
pThe USM pointer.
offsetThe vector of 32-bit or 64-bit offsets in bytes.
src0The additional argument.
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1069 of file memory.hpp.

References sycl::_V1::ext::oneapi::fmax(), and sycl::_V1::ext::oneapi::fmin().

◆ atomic_update() [12/18]

template<atomic_op Op, typename Tx , int N, typename Toffset >
__ESIMD_API simd<Tx, N> sycl::_V1::ext::intel::esimd::atomic_update ( Tx *  p,
simd< Toffset, N >  offset,
simd_mask< N >  mask 
)

No-argument variant of the atomic update operation.

Atomically updates N memory locations represented by a USM pointer and a vector of offsets relative to the pointer, and returns a vector of old values found at the memory locations before update. The update operation has no arguments in addition to the value at the memory location.

Template Parameters
OpThe atomic operation - can be atomic_op::inc or atomic_op::dec, atomic_op::load.
TxThe vector element type.
NThe number of memory locations to update.
Parameters
pThe USM pointer.
offsetThe vector of 32-bit or 64-bit offsets in bytes.
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1173 of file memory.hpp.

◆ atomic_update() [13/18]

template<atomic_op Op, typename Tx , int N, typename Toffset , typename RegionTy = region1d_t<Toffset, N, 1>>
__ESIMD_API simd<Tx, N> sycl::_V1::ext::intel::esimd::atomic_update ( Tx *  p,
simd_view< Toffset, RegionTy >  offsets,
simd< Tx, N >  src0,
simd< Tx, N >  src1,
simd_mask< N >  mask 
)

A variation of atomic_update API with offsets represented as simd_view object.

Template Parameters
OpThe atomic operation - can be one of the following: atomic_op::cmpxchg, atomic_op::fcmpwr.
TxThe vector element type.
NThe number of memory locations to update.
Parameters
pThe USM pointer.
offsetThe simd_view of 32-bit or 64-bit offsets in bytes.
src0The first additional argument (new value).
src1The second additional argument (expected value).
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1297 of file memory.hpp.

◆ atomic_update() [14/18]

template<atomic_op Op, typename Tx , int N, typename Toffset , typename RegionTy = region1d_t<Toffset, N, 1>>
__ESIMD_API simd<Tx, N> sycl::_V1::ext::intel::esimd::atomic_update ( Tx *  p,
simd_view< Toffset, RegionTy >  offsets,
simd< Tx, N >  src0,
simd_mask< N >  mask 
)

A variation of atomic_update API with offsets represented as simd_view object.

Template Parameters
OpThe atomic operation - can be one of the following: atomic_op::add, atomic_op::sub, atomic_op::min, atomic_op::max, atomic_op::xchg, atomic_op::bit_and, atomic_op::bit_or, atomic_op::bit_xor, atomic_op::minsint, atomic_op::maxsint, atomic_op::fmax, atomic_op::fmin, atomic_op::store.
TxThe vector element type.
NThe number of memory locations to update.
Parameters
pThe USM pointer.
offsetThe simd_view of 32-bit or 64-bit offsets in bytes.
src0The additional argument.
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1120 of file memory.hpp.

◆ atomic_update() [15/18]

template<atomic_op Op, typename Tx , int N, typename Toffset , typename RegionTy = region1d_t<Toffset, N, 1>>
__ESIMD_API simd<Tx, N> sycl::_V1::ext::intel::esimd::atomic_update ( Tx *  p,
simd_view< Toffset, RegionTy >  offsets,
simd_mask< N >  mask = 1 
)

A variation of atomic_update API with offsets represented as simd_view object.

Template Parameters
OpThe atomic operation - can be atomic_op::inc or atomic_op::dec, atomic_op::load.
TxThe vector element type.
NThe number of memory locations to update.
Parameters
pThe USM pointer.
offsetThe simd_view of 32-bit or 64-bit offsets in bytes.
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1213 of file memory.hpp.

◆ atomic_update() [16/18]

template<atomic_op Op, typename Tx , int N, typename Toffset >
__ESIMD_API std::enable_if_t<std::is_integral_v<Toffset>, simd<Tx, N> > sycl::_V1::ext::intel::esimd::atomic_update ( Tx *  p,
Toffset  offset,
simd< Tx, N >  src0,
simd< Tx, N >  src1,
simd_mask< N >  mask 
)

A variation of atomic_update API with offsets represented as scalar.

Template Parameters
OpThe atomic operation - can be one of the following: atomic_op::cmpxchg, atomic_op::fcmpwr.
TxThe vector element type.
NThe number of memory locations to update.
Parameters
pThe USM pointer.
offsetThe scalar 32-bit or 64-bit offset in bytes.
src0The first additional argument (new value).
src1The second additional argument (expected value).
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1320 of file memory.hpp.

◆ atomic_update() [17/18]

template<atomic_op Op, typename Tx , int N, typename Toffset >
__ESIMD_API std::enable_if_t< std::is_integral_v<Toffset> && ((Op != atomic_op::store && Op != atomic_op::xchg) || N == 1), simd<Tx, N> > sycl::_V1::ext::intel::esimd::atomic_update ( Tx *  p,
Toffset  offset,
simd< Tx, N >  src0,
simd_mask< N >  mask 
)

A variation of atomic_update API with offset represented as scalar object.

Template Parameters
OpThe atomic operation - can be one of the following: atomic_op::add, atomic_op::sub, atomic_op::min, atomic_op::max, atomic_op::xchg, atomic_op::bit_and, atomic_op::bit_or, atomic_op::bit_xor, atomic_op::minsint, atomic_op::maxsint, atomic_op::fmax, atomic_op::fmin atomic_op::store.
TxThe vector element type.
NThe number of memory locations to update.
Parameters
pThe USM pointer.
offsetThe scalar 32-bit or 64-bit offsets in bytes.
src0The additional argument.
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1149 of file memory.hpp.

◆ atomic_update() [18/18]

template<atomic_op Op, typename Tx , int N, typename Toffset >
__ESIMD_API std::enable_if_t<std::is_integral_v<Toffset>, simd<Tx, N> > sycl::_V1::ext::intel::esimd::atomic_update ( Tx *  p,
Toffset  offset,
simd_mask< N >  mask = 1 
)

A variation of atomic_update API with offset represented as scalar.

Template Parameters
OpThe atomic operation - can be atomic_op::inc or atomic_op::dec, atomic_op::load.
TxThe vector element type.
NThe number of memory locations to update.
Parameters
pThe USM pointer.
offsetThe scalar 32-bit or 64-bit offset in bytes.
maskOperation mask, only locations with non-zero in the corresponding mask element are updated.
Returns
A vector of the old values at the memory locations before the update.

Definition at line 1235 of file memory.hpp.