Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
f8b230e9
There was an error fetching the commit references. Please try again later.
Commit
f8b230e9
authored
8 years ago
by
Jakub Klinkovský
Browse files
Options
Downloads
Patches
Plain Diff
Disabled mesh initializer for Devices::Cuda
parent
79135082
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/TNL/Meshes/Mesh.h
+21
-5
21 additions, 5 deletions
src/TNL/Meshes/Mesh.h
src/TNL/Meshes/MeshDetails/Mesh_impl.h
+13
-12
13 additions, 12 deletions
src/TNL/Meshes/MeshDetails/Mesh_impl.h
with
34 additions
and
17 deletions
src/TNL/Meshes/Mesh.h
+
21
−
5
View file @
f8b230e9
...
...
@@ -30,11 +30,31 @@ namespace Meshes {
template
<
typename
MeshConfig
>
class
MeshInitializer
;
template
<
typename
MeshConfig
,
typename
Device
,
typename
MeshType
>
class
MeshInitializableBase
{
public:
using
MeshTraitsType
=
MeshTraits
<
MeshConfig
,
Device
>
;
// The points and cellSeeds arrays will be reset when not needed to save memory.
bool
init
(
typename
MeshTraitsType
::
PointArrayType
&
points
,
typename
MeshTraitsType
::
CellSeedArrayType
&
cellSeeds
);
};
// The mesh cannot be initialized on CUDA GPU, so this specialization is empty.
template
<
typename
MeshConfig
,
typename
MeshType
>
class
MeshInitializableBase
<
MeshConfig
,
Devices
::
Cuda
,
MeshType
>
{
};
template
<
typename
MeshConfig
,
typename
Device
=
Devices
::
Host
>
class
Mesh
:
public
Object
,
protected
MeshStorageLayers
<
MeshConfig
,
Device
>
protected
MeshStorageLayers
<
MeshConfig
,
Device
>
,
public
MeshInitializableBase
<
MeshConfig
,
Device
,
Mesh
<
MeshConfig
,
Device
>
>
{
using
StorageBaseType
=
MeshStorageLayers
<
MeshConfig
,
Device
>
;
...
...
@@ -109,10 +129,6 @@ class Mesh
bool
operator
==
(
const
Mesh
&
mesh
)
const
;
// The points and cellSeeds arrays will be reset when not needed to save memory.
bool
init
(
typename
MeshTraitsType
::
PointArrayType
&
points
,
typename
MeshTraitsType
::
CellSeedArrayType
&
cellSeeds
);
void
writeProlog
(
Logger
&
logger
);
protected:
...
...
This diff is collapsed.
Click to expand it.
src/TNL/Meshes/MeshDetails/Mesh_impl.h
+
13
−
12
View file @
f8b230e9
...
...
@@ -22,6 +22,19 @@
namespace
TNL
{
namespace
Meshes
{
template
<
typename
MeshConfig
,
typename
Device
,
typename
MeshType
>
bool
MeshInitializableBase
<
MeshConfig
,
Device
,
MeshType
>::
init
(
typename
MeshTraitsType
::
PointArrayType
&
points
,
typename
MeshTraitsType
::
CellSeedArrayType
&
cellSeeds
)
{
MeshInitializer
<
typename
MeshType
::
Config
>
meshInitializer
;
if
(
!
meshInitializer
.
createMesh
(
points
,
cellSeeds
,
*
static_cast
<
MeshType
*>
(
this
)
)
)
return
false
;
return
true
;
}
template
<
typename
MeshConfig
,
typename
Device
>
constexpr
int
Mesh
<
MeshConfig
,
Device
>::
...
...
@@ -178,18 +191,6 @@ operator==( const Mesh& mesh ) const
return
StorageBaseType
::
operator
==
(
mesh
);
}
template
<
typename
MeshConfig
,
typename
Device
>
bool
Mesh
<
MeshConfig
,
Device
>::
init
(
typename
MeshTraitsType
::
PointArrayType
&
points
,
typename
MeshTraitsType
::
CellSeedArrayType
&
cellSeeds
)
{
MeshInitializer
<
MeshConfig
>
meshInitializer
;
if
(
!
meshInitializer
.
createMesh
(
points
,
cellSeeds
,
*
this
)
)
return
false
;
return
true
;
}
template
<
typename
MeshConfig
,
typename
Device
>
void
Mesh
<
MeshConfig
,
Device
>::
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment