@@ -29,23 +29,23 @@ template <typename FirstEntry = int, typename NElem = int>
2929class RangeReference
3030{
3131 public:
32- GPUd () RangeReference(FirstEntry ent, NElem n) { set (ent, n); }
33- GPUdDefault () RangeReference(const RangeReference<FirstEntry, NElem>& src) = default ;
34- GPUdDefault () RangeReference() = default ;
35- GPUdDefault () ~RangeReference () = default ;
36- GPUd () void set (FirstEntry ent, NElem n)
32+ GPUhd () RangeReference(FirstEntry ent, NElem n) { set (ent, n); }
33+ GPUhdDefault () RangeReference(const RangeReference<FirstEntry, NElem>& src) = default ;
34+ GPUhdDefault () RangeReference() = default ;
35+ GPUhdDefault () ~RangeReference () = default ;
36+ GPUhd () void set (FirstEntry ent, NElem n)
3737 {
3838 mFirstEntry = ent;
3939 mEntries = n;
4040 }
41- GPUd () void clear () { set (0 , 0 ); }
42- GPUd () FirstEntry getFirstEntry () const { return mFirstEntry ; }
43- GPUd () FirstEntry getEntriesBound () const { return mFirstEntry + mEntries ; }
44- GPUd () NElem getEntries () const { return mEntries ; }
45- GPUd () void setFirstEntry (FirstEntry ent) { mFirstEntry = ent; }
46- GPUd () void setEntries (NElem n) { mEntries = n; }
47- GPUd () void changeEntriesBy (NElem inc) { mEntries += inc; }
48- GPUd () bool operator ==(const RangeReference& other) const
41+ GPUhd () void clear () { set (0 , 0 ); }
42+ GPUhd () FirstEntry getFirstEntry () const { return mFirstEntry ; }
43+ GPUhd () FirstEntry getEntriesBound () const { return mFirstEntry + mEntries ; }
44+ GPUhd () NElem getEntries () const { return mEntries ; }
45+ GPUhd () void setFirstEntry (FirstEntry ent) { mFirstEntry = ent; }
46+ GPUhd () void setEntries (NElem n) { mEntries = n; }
47+ GPUhd () void changeEntriesBy (NElem inc) { mEntries += inc; }
48+ GPUhd () bool operator ==(const RangeReference& other) const
4949 {
5050 return mFirstEntry == other.mFirstEntry && mEntries == other.mEntries ;
5151 }
@@ -68,21 +68,21 @@ class RangeRefComp
6868 static constexpr Base MaskN = ((0x1 << NBitsN) - 1 );
6969 static constexpr Base MaskR = (~Base (0 )) & (~MaskN);
7070 Base mData = 0 ; // /< packed 1st entry reference + N entries
71- GPUd () void sanityCheck ()
71+ GPUhd () void sanityCheck ()
7272 {
7373 static_assert (NBitsN < NBitsTotal, " NBitsN too large" );
7474 }
7575
7676 public:
77- GPUd () RangeRefComp(int ent, int n) { set (ent, n); }
78- GPUdDefault () RangeRefComp() = default ;
79- GPUdDefault () RangeRefComp(const RangeRefComp& src) = default ;
77+ GPUhd () RangeRefComp(int ent, int n) { set (ent, n); }
78+ GPUhdDefault () RangeRefComp() = default ;
79+ GPUhdDefault () RangeRefComp(const RangeRefComp& src) = default ;
8080 GPUhd () void set (int ent, int n)
8181 {
8282 mData = (Base (ent) << NBitsN) + (Base (n) & MaskN);
8383 }
84- GPUd () static constexpr Base getMaxFirstEntry () { return MaskR >> NBitsN; }
85- GPUd () static constexpr Base getMaxEntries () { return MaskN; }
84+ GPUhd () static constexpr Base getMaxFirstEntry () { return MaskR >> NBitsN; }
85+ GPUhd () static constexpr Base getMaxEntries () { return MaskN; }
8686 GPUhd () int getFirstEntry () const { return mData >> NBitsN; }
8787 GPUhd () int getEntries () const { return mData & ((0x1 << NBitsN) - 1 ); }
8888 GPUhd () int getEntriesBound () const { return getFirstEntry () + getEntries (); }
0 commit comments