ATLAS Offline Software
Identifier_g.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ISF_FASTCALOGPU_Identifier_GPU
6 #define ISF_FASTCALOGPU_Identifier_GPU
7 
8 
9 # ifdef __CUDACC__
10 # define CUDA_HOSTDEV __host__ __device__
11 # else
12 # define CUDA_HOSTDEV
13 # endif
14 
16 public:
17  typedef long long value_type;
18 
19  typedef enum bit_defs_enum {
20  NBITS = sizeof( value_type ) * 8, // bits per byte
21  MAX_BIT = ( static_cast<value_type>( 1 ) << ( NBITS - 1 ) ),
22  ALL_BITS = ~( static_cast<value_type>( 0 ) )
24 
25  typedef enum max_value_type_enum {
26  // max_value = 0xFFFFFFFFFFFFFFFFULL
27  max_value = ~( static_cast<value_type>( 0 ) )
29 
33 
34  CUDA_HOSTDEV operator value_type() const { return m_id; }
35 
37  m_id = old;
38  return ( *this );
39  };
41  m_id = value;
42  return ( *this );
43  };
44  CUDA_HOSTDEV bool operator==( const Identifier_Gpu& other ) const { return ( m_id == other.m_id ); }
45  CUDA_HOSTDEV bool operator!=( const Identifier_Gpu& other ) const { return ( m_id != other.m_id ); }
46  CUDA_HOSTDEV bool operator<( const Identifier_Gpu& other ) const { return ( m_id < other.m_id ); }
47  CUDA_HOSTDEV bool operator>( const Identifier_Gpu& other ) const { return ( m_id > other.m_id ); }
48  CUDA_HOSTDEV bool operator<=( const Identifier_Gpu& other ) const { return ( m_id <= other.m_id ); }
49  CUDA_HOSTDEV bool operator>=( const Identifier_Gpu& other ) const { return ( m_id >= other.m_id ); }
52 
53 protected:
55 };
56 
57 #endif
Identifier_Gpu::NBITS
@ NBITS
Definition: Identifier_g.h:20
Identifier_Gpu::m_id
value_type m_id
Definition: Identifier_g.h:54
Identifier_Gpu::max_value
@ max_value
Definition: Identifier_g.h:27
Identifier_Gpu::operator=
CUDA_HOSTDEV Identifier_Gpu & operator=(const Identifier_Gpu &old)
Definition: Identifier_g.h:36
Identifier_Gpu::MAX_BIT
@ MAX_BIT
Definition: Identifier_g.h:21
athena.value
value
Definition: athena.py:122
Identifier_Gpu::operator==
CUDA_HOSTDEV bool operator==(const Identifier_Gpu &other) const
Definition: Identifier_g.h:44
Identifier_Gpu::max_value_type
enum Identifier_Gpu::max_value_type_enum max_value_type
Identifier_Gpu::value_type
long long value_type
Definition: Identifier_g.h:17
Identifier_Gpu::operator==
CUDA_HOSTDEV bool operator==(Identifier_Gpu::value_type other) const
Definition: Identifier_g.h:50
Identifier_Gpu::Identifier_Gpu
CUDA_HOSTDEV Identifier_Gpu(const Identifier_Gpu &value)
Definition: Identifier_g.h:31
Identifier_Gpu::bit_defs_enum
bit_defs_enum
Definition: Identifier_g.h:19
Identifier_Gpu::ALL_BITS
@ ALL_BITS
Definition: Identifier_g.h:22
Identifier_Gpu::operator>=
CUDA_HOSTDEV bool operator>=(const Identifier_Gpu &other) const
Definition: Identifier_g.h:49
Identifier_Gpu::operator<
CUDA_HOSTDEV bool operator<(const Identifier_Gpu &other) const
Definition: Identifier_g.h:46
Identifier_Gpu::operator>
CUDA_HOSTDEV bool operator>(const Identifier_Gpu &other) const
Definition: Identifier_g.h:47
Identifier_Gpu
Definition: Identifier_g.h:15
Identifier_Gpu::operator=
CUDA_HOSTDEV Identifier_Gpu & operator=(value_type value)
Definition: Identifier_g.h:40
Identifier_Gpu::max_value_type_enum
max_value_type_enum
Definition: Identifier_g.h:25
Identifier_Gpu::operator!=
CUDA_HOSTDEV bool operator!=(Identifier_Gpu::value_type other) const
Definition: Identifier_g.h:51
Identifier_Gpu::operator!=
CUDA_HOSTDEV bool operator!=(const Identifier_Gpu &other) const
Definition: Identifier_g.h:45
Identifier_Gpu::bit_defs
enum Identifier_Gpu::bit_defs_enum bit_defs
Identifier_Gpu::Identifier_Gpu
CUDA_HOSTDEV Identifier_Gpu(value_type value)
Definition: Identifier_g.h:32
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CSV_InDetExporter.old
old
Definition: CSV_InDetExporter.py:145
Identifier_Gpu::Identifier_Gpu
CUDA_HOSTDEV Identifier_Gpu()
Definition: Identifier_g.h:30
Identifier_Gpu::operator<=
CUDA_HOSTDEV bool operator<=(const Identifier_Gpu &other) const
Definition: Identifier_g.h:48
value_type
Definition: EDM_MasterSearch.h:11
CUDA_HOSTDEV
#define CUDA_HOSTDEV
Definition: Identifier_g.h:12