Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
5a34ddcc
Commit
5a34ddcc
authored
Apr 30, 2017
by
Matthieu Schaller
Browse files
Code formatting
parent
f9d4ed3b
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/cache.h
View file @
5a34ddcc
...
@@ -413,7 +413,6 @@ __attribute__((always_inline)) INLINE void cache_read_two_partial_cells_sorted(
...
@@ -413,7 +413,6 @@ __attribute__((always_inline)) INLINE void cache_read_two_partial_cells_sorted(
cj_cache
->
vy
[
i
]
=
1
.
f
;
cj_cache
->
vy
[
i
]
=
1
.
f
;
cj_cache
->
vz
[
i
]
=
1
.
f
;
cj_cache
->
vz
[
i
]
=
1
.
f
;
}
}
}
}
/* @brief Clean the memory allocated by a #cache object.
/* @brief Clean the memory allocated by a #cache object.
...
...
src/runner_doiact_vec.c
View file @
5a34ddcc
...
@@ -991,7 +991,7 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
...
@@ -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
))
if
(
!
cell_is_drifted
(
ci
,
e
)
||
!
cell_is_drifted
(
cj
,
e
))
error
(
"Interacting undrifted cells."
);
error
(
"Interacting undrifted cells."
);
/* Get the sort ID. */
/* Get the sort ID. */
double
shift
[
3
]
=
{
0
.
0
,
0
.
0
,
0
.
0
};
double
shift
[
3
]
=
{
0
.
0
,
0
.
0
,
0
.
0
};
const
int
sid
=
space_getsid
(
e
->
s
,
&
ci
,
&
cj
,
shift
);
const
int
sid
=
space_getsid
(
e
->
s
,
&
ci
,
&
cj
,
shift
);
...
...
src/vector.h
View file @
5a34ddcc
...
@@ -109,10 +109,12 @@
...
@@ -109,10 +109,12 @@
/* Performs a horizontal add on the vector and adds the result to a float. */
/* Performs a horizontal add on the vector and adds the result to a float. */
#ifdef __ICC
#ifdef __ICC
#define VEC_HADD(a, b) b += _mm512_reduce_add_ps(a.v)
#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.*/
#else
/* _mm512_reduce_add_ps not present in GCC compiler. \
#define VEC_HADD(a, b) { \
TODO: Implement intrinsic version.*/
for( int i=0; i<VEC_SIZE; i++) b += a.f[i]; \
#define VEC_HADD(a, b) \
}
{ \
for (int i = 0; i < VEC_SIZE; i++) b += a.f[i]; \
}
#endif
#endif
/* Calculates the number of set bits in the mask and adds the result to an int.
/* Calculates the number of set bits in the mask and adds the result to an int.
*/
*/
...
...
Write
Preview
Supports
Markdown
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