VTK-m  2.0
Namespaces | Typedefs | Enumerations | Functions
Atomic.h File Reference
#include <vtkm/List.h>
#include <vtkm/internal/Windows.h>
#include <atomic>
#include <cstdint>
#include <cstring>
#include <vtkmstd/bit_cast.h>

Go to the source code of this file.

Namespaces

 vtkm
 Groups connected points that have the same field value.
 

Typedefs

using vtkm::AtomicTypePreferred = vtkm::UInt32
 The preferred type to use for atomic operations. More...
 
using vtkm::AtomicTypesSupported = vtkm::List< vtkm::UInt32, vtkm::UInt64 >
 A list of types that can be used with atomic operations. More...
 

Enumerations

enum  vtkm::MemoryOrder {
  vtkm::MemoryOrder::Relaxed, vtkm::MemoryOrder::Acquire, vtkm::MemoryOrder::Release, vtkm::MemoryOrder::AcquireAndRelease,
  vtkm::MemoryOrder::SequentiallyConsistent
}
 Specifies memory order semantics for atomic operations. More...
 

Functions

template<typename T >
VTKM_EXEC_CONTvtkm::AtomicLoad (T *const pointer, vtkm::MemoryOrder order=vtkm::MemoryOrder::Acquire)
 Atomic function to load a value from a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicNot (T *pointer, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to NOT bits to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONT bool vtkm::AtomicCompareExchange (T *shared, T *expected, T desired, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function that replaces a value given a condition. More...
 
template<typename T >
VTKM_EXEC_CONT void vtkm::AtomicStore (T *pointer, T value, vtkm::MemoryOrder order=vtkm::MemoryOrder::Release)
 Atomic function to save a value to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONT void vtkm::AtomicStore (T *pointer, detail::OppositeSign< T > value, vtkm::MemoryOrder order=vtkm::MemoryOrder::Release)
 Atomic function to save a value to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicAdd (T *pointer, T operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to add a value to a shared memory location. More...
 
template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr>
VTKM_EXEC_CONTvtkm::AtomicAdd (T *pointer, detail::OppositeSign< T > operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to add a value to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicAnd (T *pointer, T operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to AND bits to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicAnd (T *pointer, detail::OppositeSign< T > operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to AND bits to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicOr (T *pointer, T operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to OR bits to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicOr (T *pointer, detail::OppositeSign< T > operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to OR bits to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicXor (T *pointer, T operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to XOR bits to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicXor (T *pointer, detail::OppositeSign< T > operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to XOR bits to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONT void vtkm::AtomicStore (T *pointer, T value, vtkm::MemoryOrder order=vtkm::MemoryOrder::Release)
 Atomic function to save a value to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONT void vtkm::AtomicStore (T *pointer, detail::OppositeSign< T > value, vtkm::MemoryOrder order=vtkm::MemoryOrder::Release)
 Atomic function to save a value to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicAdd (T *pointer, T operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to add a value to a shared memory location. More...
 
template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr>
VTKM_EXEC_CONTvtkm::AtomicAdd (T *pointer, detail::OppositeSign< T > operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to add a value to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicAnd (T *pointer, T operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to AND bits to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicAnd (T *pointer, detail::OppositeSign< T > operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to AND bits to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicOr (T *pointer, T operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to OR bits to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicOr (T *pointer, detail::OppositeSign< T > operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to OR bits to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicXor (T *pointer, T operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to XOR bits to a shared memory location. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::AtomicXor (T *pointer, detail::OppositeSign< T > operand, vtkm::MemoryOrder order=vtkm::MemoryOrder::SequentiallyConsistent)
 Atomic function to XOR bits to a shared memory location. More...