Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
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
SWIFT
SWIFTsim
Commits
5a34ddcc
Commit
5a34ddcc
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Code formatting
parent
f9d4ed3b
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!320
Dopair1 vectorisation merge
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cache.h
+0
-1
0 additions, 1 deletion
src/cache.h
src/runner_doiact_vec.c
+1
-1
1 addition, 1 deletion
src/runner_doiact_vec.c
src/vector.h
+6
-4
6 additions, 4 deletions
src/vector.h
with
7 additions
and
6 deletions
src/cache.h
+
0
−
1
View file @
5a34ddcc
...
...
@@ -413,7 +413,6 @@ __attribute__((always_inline)) INLINE void cache_read_two_partial_cells_sorted(
cj_cache
->
vy
[
i
]
=
1
.
f
;
cj_cache
->
vz
[
i
]
=
1
.
f
;
}
}
/* @brief Clean the memory allocated by a #cache object.
...
...
This diff is collapsed.
Click to expand it.
src/runner_doiact_vec.c
+
1
−
1
View file @
5a34ddcc
...
...
@@ -991,7 +991,7 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
if
(
!
cell_is_drifted
(
ci
,
e
)
||
!
cell_is_drifted
(
cj
,
e
))
error
(
"Interacting undrifted cells."
);
/* Get the sort ID. */
double
shift
[
3
]
=
{
0
.
0
,
0
.
0
,
0
.
0
};
const
int
sid
=
space_getsid
(
e
->
s
,
&
ci
,
&
cj
,
shift
);
...
...
This diff is collapsed.
Click to expand it.
src/vector.h
+
6
−
4
View file @
5a34ddcc
...
...
@@ -109,10 +109,12 @@
/* Performs a horizontal add on the vector and adds the result to a float. */
#ifdef __ICC
#define VEC_HADD(a, b) b += _mm512_reduce_add_ps(a.v)
#else
/* _mm512_reduce_add_ps not present in GCC compiler. TODO: Implement intrinsic version.*/
#define VEC_HADD(a, b) { \
for( int i=0; i<VEC_SIZE; i++) b += a.f[i]; \
}
#else
/* _mm512_reduce_add_ps not present in GCC compiler. \
TODO: Implement intrinsic version.*/
#define VEC_HADD(a, b) \
{ \
for (int i = 0; i < VEC_SIZE; i++) b += a.f[i]; \
}
#endif
/* Calculates the number of set bits in the mask and adds the result to an int.
*/
...
...
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