Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pystencils_walberla
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stephan Seitz
pystencils_walberla
Commits
7b71b052
Commit
7b71b052
authored
6 years ago
by
Martin Bauer
Browse files
Options
Downloads
Patches
Plain Diff
pystencils_walberla: configurable inner-outer split width
parent
0cdd23d8
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
pystencils_walberla/templates/SweepInnerOuter.tmpl.cpp
+11
-11
11 additions, 11 deletions
pystencils_walberla/templates/SweepInnerOuter.tmpl.cpp
pystencils_walberla/templates/SweepInnerOuter.tmpl.h
+3
-2
3 additions, 2 deletions
pystencils_walberla/templates/SweepInnerOuter.tmpl.h
with
14 additions
and
13 deletions
pystencils_walberla/templates/SweepInnerOuter.tmpl.cpp
+
11
−
11
View file @
7b71b052
...
@@ -77,7 +77,7 @@ void {{class_name}}::inner( IBlock * block{%if target is equalto 'gpu'%} , cudaS
...
@@ -77,7 +77,7 @@ void {{class_name}}::inner( IBlock * block{%if target is equalto 'gpu'%} , cudaS
{{
kernel
|
generate_block_data_to_field_extraction
|
indent
(
4
)}}
{{
kernel
|
generate_block_data_to_field_extraction
|
indent
(
4
)}}
CellInterval
inner
=
{{
field
}}
->
xyzSize
();
CellInterval
inner
=
{{
field
}}
->
xyzSize
();
inner
.
expand
(
-
1
);
inner
.
expand
(
Cell
(
-
outerWidth_
[
0
],
-
outerWidth_
[
1
],
-
outerWidth_
[
2
])
);
{{
kernel
|
generate_call
(
stream
=
'
stream
'
,
cell_interval
=
'
inner
'
)
|
indent
(
4
)}}
{{
kernel
|
generate_call
(
stream
=
'
stream
'
,
cell_interval
=
'
inner
'
)
|
indent
(
4
)}}
}
}
...
@@ -91,23 +91,23 @@ void {{class_name}}::outer( IBlock * block{%if target is equalto 'gpu'%} , cudaS
...
@@ -91,23 +91,23 @@ void {{class_name}}::outer( IBlock * block{%if target is equalto 'gpu'%} , cudaS
{
{
CellInterval
ci
;
CellInterval
ci
;
{{
field
}}
->
getSliceBeforeGhostLayer
(
stencil
::
T
,
ci
,
1
,
false
);
{{
field
}}
->
getSliceBeforeGhostLayer
(
stencil
::
T
,
ci
,
outerWidth_
[
2
]
,
false
);
layers_
.
push_back
(
ci
);
layers_
.
push_back
(
ci
);
{{
field
}}
->
getSliceBeforeGhostLayer
(
stencil
::
B
,
ci
,
1
,
false
);
{{
field
}}
->
getSliceBeforeGhostLayer
(
stencil
::
B
,
ci
,
outerWidth_
[
2
]
,
false
);
layers_
.
push_back
(
ci
);
layers_
.
push_back
(
ci
);
{{
field
}}
->
getSliceBeforeGhostLayer
(
stencil
::
N
,
ci
,
1
,
false
);
{{
field
}}
->
getSliceBeforeGhostLayer
(
stencil
::
N
,
ci
,
outerWidth_
[
1
]
,
false
);
ci
.
expand
(
Cell
(
0
,
0
,
-
1
));
ci
.
expand
(
Cell
(
0
,
0
,
-
outerWidth_
[
2
]
));
layers_
.
push_back
(
ci
);
layers_
.
push_back
(
ci
);
{{
field
}}
->
getSliceBeforeGhostLayer
(
stencil
::
S
,
ci
,
1
,
false
);
{{
field
}}
->
getSliceBeforeGhostLayer
(
stencil
::
S
,
ci
,
outerWidth_
[
1
]
,
false
);
ci
.
expand
(
Cell
(
0
,
0
,
-
1
));
ci
.
expand
(
Cell
(
0
,
0
,
-
outerWidth_
[
2
]
));
layers_
.
push_back
(
ci
);
layers_
.
push_back
(
ci
);
{{
field
}}
->
getSliceBeforeGhostLayer
(
stencil
::
E
,
ci
,
1
,
false
);
{{
field
}}
->
getSliceBeforeGhostLayer
(
stencil
::
E
,
ci
,
outerWidth_
[
0
]
,
false
);
ci
.
expand
(
Cell
(
0
,
-
1
,
-
1
));
ci
.
expand
(
Cell
(
0
,
-
outerWidth_
[
1
],
-
outerWidth_
[
2
]
));
layers_
.
push_back
(
ci
);
layers_
.
push_back
(
ci
);
{{
field
}}
->
getSliceBeforeGhostLayer
(
stencil
::
W
,
ci
,
1
,
false
);
{{
field
}}
->
getSliceBeforeGhostLayer
(
stencil
::
W
,
ci
,
outerWidth_
[
0
]
,
false
);
ci
.
expand
(
Cell
(
0
,
-
1
,
-
1
));
ci
.
expand
(
Cell
(
0
,
-
outerWidth_
[
1
],
-
outerWidth_
[
2
]
));
layers_
.
push_back
(
ci
);
layers_
.
push_back
(
ci
);
}
}
...
...
This diff is collapsed.
Click to expand it.
pystencils_walberla/templates/SweepInnerOuter.tmpl.h
+
3
−
2
View file @
7b71b052
...
@@ -52,8 +52,8 @@ namespace {{namespace}} {
...
@@ -52,8 +52,8 @@ namespace {{namespace}} {
class
{{
class_name
}}
class
{{
class_name
}}
{
{
public:
public:
{{
class_name
}}(
{{
kernel
|
generate_constructor_parameters
}})
{{
class_name
}}(
{{
kernel
|
generate_constructor_parameters
}}
,
const
Cell
&
outerWidth
=
Cell
(
1
,
1
,
1
)
)
:
{{
kernel
|
generate_constructor_initializer_list
}}
:
{{
kernel
|
generate_constructor_initializer_list
}}
,
outerWidth_
(
outerWidth
)
{};
{};
{{
kernel
|
generate_destructor
(
class_name
)
|
indent
(
4
)
}}
{{
kernel
|
generate_destructor
(
class_name
)
|
indent
(
4
)
}}
...
@@ -98,6 +98,7 @@ private:
...
@@ -98,6 +98,7 @@ private:
cuda
::
ParallelStreams
parallelStreams_
;
cuda
::
ParallelStreams
parallelStreams_
;
{
%
endif
%
}
{
%
endif
%
}
Cell
outerWidth_
;
std
::
vector
<
CellInterval
>
layers_
;
std
::
vector
<
CellInterval
>
layers_
;
};
};
...
...
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