Block-Structured AMR Software Framework
amrex::ParticleIDWrapper Struct Reference

#include <AMReX_Particle.H>

Public Member Functions

 ~ParticleIDWrapper () noexcept=default
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE ParticleIDWrapper (uint64_t &idata) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE ParticleIDWrapper (const ParticleIDWrapper &rhs)=default
 
 ParticleIDWrapper (ParticleIDWrapper &&)=delete
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE ParticleIDWrapperoperator= (const ParticleIDWrapper &pidw) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE ParticleIDWrapperoperator= (ParticleIDWrapper &&pidw) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE ParticleIDWrapperoperator= (const Long id) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE operator Long () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void make_invalid () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void make_valid () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool is_valid () const noexcept
 

Public Attributes

uint64_t * m_idata
 

Constructor & Destructor Documentation

◆ ~ParticleIDWrapper()

amrex::ParticleIDWrapper::~ParticleIDWrapper ( )
defaultnoexcept

◆ ParticleIDWrapper() [1/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleIDWrapper::ParticleIDWrapper ( uint64_t &  idata)
inlinenoexcept

◆ ParticleIDWrapper() [2/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleIDWrapper::ParticleIDWrapper ( const ParticleIDWrapper rhs)
default

◆ ParticleIDWrapper() [3/3]

amrex::ParticleIDWrapper::ParticleIDWrapper ( ParticleIDWrapper &&  )
delete

Member Function Documentation

◆ is_valid()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::ParticleIDWrapper::is_valid ( ) const
inlinenoexcept

Check the particle is valid, via the sign of the id.

Returns true if the particle is valid (the id is positive), otherwise false (invalid particle).

◆ make_invalid()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::ParticleIDWrapper::make_invalid ( ) const
inlinenoexcept

Mark the particle as invalid

Swaps the is_valid (sign) bit to invalid. This is NOT identical to id = -id, but it is equally reversible via make_valid().

◆ make_valid()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::ParticleIDWrapper::make_valid ( ) const
inlinenoexcept

Mark the particle as valid

Swaps the is_valid (sign) bit to valid. This is NOT identical to id = -id, but it is equally reversible via make_invalid().

◆ operator Long()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleIDWrapper::operator Long ( ) const
inlinenoexcept

◆ operator=() [1/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE ParticleIDWrapper& amrex::ParticleIDWrapper::operator= ( const Long  id)
inlinenoexcept

◆ operator=() [2/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE ParticleIDWrapper& amrex::ParticleIDWrapper::operator= ( const ParticleIDWrapper pidw)
inlinenoexcept

◆ operator=() [3/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE ParticleIDWrapper& amrex::ParticleIDWrapper::operator= ( ParticleIDWrapper &&  pidw)
inlinenoexcept

Member Data Documentation

◆ m_idata

uint64_t* amrex::ParticleIDWrapper::m_idata

The documentation for this struct was generated from the following file: