Skip to content

Commit

Permalink
[arcane,materials] Corrige compilation HIP.
Browse files Browse the repository at this point in the history
Définit les méthodes '_setBit()' and '_hasBit()' dans la classe associée
  • Loading branch information
grospelliergilles committed Sep 30, 2024
1 parent 84987ba commit b80a498
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,34 +52,6 @@ AcceleratorMeshMaterialSynchronizerImpl(IMeshMaterialMng* material_mng)
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

AcceleratorMeshMaterialSynchronizerImpl::
~AcceleratorMeshMaterialSynchronizerImpl()
{
}

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

inline void AcceleratorMeshMaterialSynchronizerImpl::
_setBit(Arcane::DataViewGetterSetter<unsigned char> bytes, Integer position)
{
Integer bit = position % 8;
unsigned char temp = bytes;
temp |= (Byte)(1 << bit);
bytes = temp;
}

inline bool AcceleratorMeshMaterialSynchronizerImpl::
_hasBit(Arcane::DataViewGetterSetter<unsigned char> bytes, Integer position)
{
Integer bit = position % 8;
unsigned char temp = bytes;
return temp & (1 << bit);
}

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class AcceleratorMeshMaterialSynchronizerImpl
public:

explicit AcceleratorMeshMaterialSynchronizerImpl(IMeshMaterialMng* material_mng);
~AcceleratorMeshMaterialSynchronizerImpl();

public:

Expand All @@ -76,8 +75,19 @@ class AcceleratorMeshMaterialSynchronizerImpl

public:

ARCCORE_HOST_DEVICE inline static void _setBit(Arcane::DataViewGetterSetter<unsigned char> bytes, Integer position);
ARCCORE_HOST_DEVICE inline static bool _hasBit(Arcane::DataViewGetterSetter<unsigned char> bytes, Integer position);
ARCCORE_HOST_DEVICE static void _setBit(Arcane::DataViewGetterSetter<unsigned char> bytes, Integer position)
{
Integer bit = position % 8;
unsigned char temp = bytes;
temp |= (Byte)(1 << bit);
bytes = temp;
}
ARCCORE_HOST_DEVICE static bool _hasBit(Arcane::DataViewGetterSetter<unsigned char> bytes, Integer position)
{
Integer bit = position % 8;
unsigned char temp = bytes;
return temp & (1 << bit);
}

private:

Expand Down

0 comments on commit b80a498

Please sign in to comment.