diff --git a/src/TNL/Meshes/Mesh.h b/src/TNL/Meshes/Mesh.h
index 3a6674af9303c5e7a540ad25aa2830533d9d590e..43ee0eeb65254f6abae26184da4319bb6d849705 100644
--- a/src/TNL/Meshes/Mesh.h
+++ b/src/TNL/Meshes/Mesh.h
@@ -113,6 +113,7 @@ class Mesh
       static constexpr bool entitiesAvailable();
 
       template< int Dimension >
+      __cuda_callable__
       GlobalIndexType getEntitiesCount() const;
 
       template< int Dimension >
@@ -126,6 +127,7 @@ class Mesh
 
       // duplicated for compatibility with grids
       template< typename EntityType >
+      __cuda_callable__
       GlobalIndexType getEntitiesCount() const;
 
       template< typename EntityType >
diff --git a/src/TNL/Meshes/MeshDetails/Mesh_impl.h b/src/TNL/Meshes/MeshDetails/Mesh_impl.h
index 02c22c853b3a5c6adec948d2f91bde53bd3a5e2b..8ec0af8ff6d074837360b554dc1fafcef28afbd5 100644
--- a/src/TNL/Meshes/MeshDetails/Mesh_impl.h
+++ b/src/TNL/Meshes/MeshDetails/Mesh_impl.h
@@ -132,6 +132,7 @@ entitiesAvailable()
 
 template< typename MeshConfig, typename Device >
    template< int Dimension >
+__cuda_callable__
 typename Mesh< MeshConfig, Device >::GlobalIndexType
 Mesh< MeshConfig, Device >::
 getEntitiesCount() const
@@ -166,6 +167,7 @@ getEntity( const GlobalIndexType& entityIndex ) const
 // duplicated for compatibility with grids
 template< typename MeshConfig, typename Device >
    template< typename Entity >
+__cuda_callable__
 typename Mesh< MeshConfig, Device >::GlobalIndexType
 Mesh< MeshConfig, Device >::
 getEntitiesCount() const
diff --git a/src/TNL/Meshes/MeshDetails/layers/MeshBoundaryTagsLayer.h b/src/TNL/Meshes/MeshDetails/layers/MeshBoundaryTagsLayer.h
index 282a7746465dff911d4d6e1891c8c67e6bc59926..edafd8cd01ca13d17a9b2a167b6cd9008e3b8a26 100644
--- a/src/TNL/Meshes/MeshDetails/layers/MeshBoundaryTagsLayer.h
+++ b/src/TNL/Meshes/MeshDetails/layers/MeshBoundaryTagsLayer.h
@@ -86,6 +86,7 @@ public:
       boundaryTags[ entityIndex ] = isBoundary;
    }
 
+   __cuda_callable__
    bool isBoundaryEntity( DimensionTag, const GlobalIndexType& entityIndex ) const
    {
       return boundaryTags[ entityIndex ];
@@ -161,21 +162,25 @@ public:
       return true;
    }
 
+   __cuda_callable__
    GlobalIndexType getBoundaryEntitiesCount( DimensionTag ) const
    {
       return boundaryIndices.getSize();
    }
 
+   __cuda_callable__
    GlobalIndexType getBoundaryEntityIndex( DimensionTag, const GlobalIndexType& i ) const
    {
       return boundaryIndices[ i ];
    }
 
+   __cuda_callable__
    GlobalIndexType getInteriorEntitiesCount( DimensionTag ) const
    {
       return interiorIndices.getSize();
    }
 
+   __cuda_callable__
    GlobalIndexType getInteriorEntityIndex( DimensionTag, const GlobalIndexType& i ) const
    {
       return interiorIndices[ i ];
diff --git a/src/TNL/Meshes/MeshDetails/layers/MeshStorageLayer.h b/src/TNL/Meshes/MeshDetails/layers/MeshStorageLayer.h
index 1cd25f675d01d0f671a1c92a5c608366a9e1a95e..dff2802d724df42bd4062eb6d34e94b1c7d02b8b 100644
--- a/src/TNL/Meshes/MeshDetails/layers/MeshStorageLayer.h
+++ b/src/TNL/Meshes/MeshDetails/layers/MeshStorageLayer.h
@@ -91,6 +91,7 @@ protected:
    }
 
    template< int Dimension >
+   __cuda_callable__
    typename EntityTraits< Dimension >::GlobalIndexType getBoundaryEntitiesCount() const
    {
       static_assert( EntityTraits< Dimension >::boundaryTagsEnabled, "You try to access boundary tags which are not configured for storage." );
@@ -106,6 +107,7 @@ protected:
    }
 
    template< int Dimension >
+   __cuda_callable__
    typename EntityTraits< Dimension >::GlobalIndexType getInteriorEntitiesCount() const
    {
       static_assert( EntityTraits< Dimension >::boundaryTagsEnabled, "You try to access boundary tags which are not configured for storage." );
@@ -227,6 +229,7 @@ public:
       return true;
    }
 
+   __cuda_callable__
    GlobalIndexType getEntitiesCount( DimensionTag ) const
    {
       return this->entities.getSize();
@@ -424,6 +427,7 @@ public:
       return true;
    }
 
+   __cuda_callable__
    GlobalIndexType getEntitiesCount( DimensionTag ) const
    {
       return this->vertices.getSize();