Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
demo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
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
Show more breadcrumbs
Georgiana Mania
demo
Commits
40eda742
Commit
40eda742
authored
1 month ago
by
Joerg Behrens
Browse files
Options
Downloads
Patches
Plain Diff
extend update_column to borders
parent
20177b70
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.cpp
+5
-2
5 additions, 2 deletions
main.cpp
with
5 additions
and
2 deletions
main.cpp
+
5
−
2
View file @
40eda742
...
...
@@ -97,9 +97,12 @@ void show_view(const std::string &label, const ViewType &view, const bool with_v
template
<
typename
ViewType
>
inline
HOST_DEVICE_ATTRIBUTES
void
update_column
(
ViewType
&
v
)
{
const
int
nlev
=
v
.
extent
(
0
);
{
int
k
=
0
;
v
(
k
)
+=
v
(
k
+
1
)
/
10000
;}
for
(
int
k
=
1
;
k
<
nlev
-
1
;
++
k
)
{
v
(
k
)
=
v
(
k
)
+
v
(
k
-
1
)
/
100
+
v
(
k
+
1
)
/
10000
;
v
(
k
)
+
=
v
(
k
-
1
)
/
100
+
v
(
k
+
1
)
/
10000
;
}
{
int
k
=
nlev
-
1
;
v
(
k
)
+=
v
(
k
-
1
)
/
100
;}
}
...
...
@@ -107,7 +110,7 @@ template<typename ViewType>
inline
HOST_DEVICE_ATTRIBUTES
void
update_field
(
ViewType
&
v
,
int
i0
,
AllLevels
all
,
int
i2
)
{
const
int
nlev
=
v
.
extent
(
1
);
check_bounds
(
i0
,
i2
,
v
.
extent
(
0
),
v
.
extent
(
2
));
auto
column
=
subview
(
v
,
i0
,
Kokkos
::
ALL
,
i2
);
auto
column
=
subview
(
v
,
i0
,
Kokkos
::
ALL
,
i2
);
// why can't we use the RHS as argument to update_column directly?
update_column
(
column
);
}
...
...
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