Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
La programmation parallèle pour les gens
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
baptiste.coudray
La programmation parallèle pour les gens
Commits
e753a027
Verified
Commit
e753a027
authored
3 years ago
by
baptiste.coudray
Browse files
Options
Downloads
Patches
Plain Diff
Added comment
parent
95a1cd5e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+0
-1
0 additions, 1 deletion
README.md
futhark_mpi/dispatch.c
+2
-0
2 additions, 0 deletions
futhark_mpi/dispatch.c
with
2 additions
and
1 deletion
README.md
+
0
−
1
View file @
e753a027
...
...
@@ -25,7 +25,6 @@ When the tools are installed, you need to navigate into a project folder `cd <fo
*
`elementary_cuda`
*
Execute tests with
`mpirun -n <nb_tasks> <elementary_seq|mc|opencl|cuda> <height> <width>`
### Game of Life
*
Uncomment
`#include "../game_of_life/gol.h"`
in
`dispatch.h`
...
...
This diff is collapsed.
Click to expand it.
futhark_mpi/dispatch.c
+
2
−
0
View file @
e753a027
...
...
@@ -213,6 +213,7 @@ static void find_best_factors(int n, int factors[2]) {
int
factor2
=
n
/
i
;
int
current_difference
=
abs
(
result
[
0
]
-
result
[
1
]);
int
new_difference
=
abs
(
factor1
-
factor2
);
/* The minimum difference will be the most efficient dispatching */
if
(
first_pass
||
current_difference
>
new_difference
)
{
result
[
0
]
=
factor1
;
result
[
1
]
=
factor2
;
...
...
@@ -238,6 +239,7 @@ static void find_network_dimensions(struct dispatch_context *dc) {
if
(
dc
->
n_dimensions
==
3
)
{
int
factors
[
2
]
=
{
0
};
find_best_factors
(
dc
->
network_dimensions
[
1
],
factors
);
/* We prefer to have more columns than depths */
if
(
factors
[
0
]
<
factors
[
1
])
{
dc
->
network_dimensions
[
1
]
=
factors
[
1
];
dc
->
network_dimensions
[
2
]
=
factors
[
0
];
...
...
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