Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Jahns
yaxt
Commits
8b1395aa
Commit
8b1395aa
authored
Mar 23, 2020
by
Thomas Jahns
🤸
Browse files
Use loop to shorten redundant code.
parent
535298e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_redist_collection_static_parallel.c
View file @
8b1395aa
...
...
@@ -97,15 +97,14 @@ int main(void) {
=
{{
0
,
(
Xt_int
)(
rank
*
size
)},
{(
Xt_int
)
size
,
(
Xt_int
)(
size
*
size
-
(
rank
+
1
)
*
size
)}};
indices_a_
[
0
]
=
xt_idxsection_new
(
start
,
2
,
global_size
,
local_size
,
local_start
[
0
]);
indices_a_
[
1
]
=
xt_idxsection_new
(
start
,
2
,
global_size
,
local_size
,
local_start
[
1
]);
for
(
size_t
i
=
0
;
i
<
2
;
++
i
)
indices_a_
[
i
]
=
xt_idxsection_new
(
start
,
2
,
global_size
,
local_size
,
local_start
[
i
]);
indices_a
=
xt_idxlist_collection_new
(
indices_a_
,
2
);
xt_idxlist_delete
(
indices_a_
[
0
]);
xt_idxlist_delete
(
indices_a_
[
1
]);
for
(
size_t
i
=
0
;
i
<
2
;
++
i
)
xt_idxlist_delete
(
indices_a_
[
i
]);
}
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment