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
TurTLE
TurTLE
Commits
0b26bc91
Commit
0b26bc91
authored
Nov 23, 2015
by
Chichi Lalescu
Browse files
more optimization attempts
parent
8f405148
Changes
10
Hide whitespace changes
Inline
Side-by-side
bfps/cpp/Lagrange_polys.hpp
View file @
0b26bc91
...
...
@@ -28,14 +28,14 @@
#define LAGRANGE_POLYS
void
beta_Lagrange_n1
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_Lagrange_n2
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_Lagrange_n3
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_Lagrange_n4
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_Lagrange_n5
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_Lagrange_n6
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_Lagrange_n7
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_Lagrange_n8
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_Lagrange_n1
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_Lagrange_n2
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_Lagrange_n3
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_Lagrange_n4
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_Lagrange_n5
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_Lagrange_n6
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_Lagrange_n7
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_Lagrange_n8
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
#endif//LAGRANGE_POLYS
bfps/cpp/interpolator.hpp
View file @
0b26bc91
...
...
@@ -40,9 +40,9 @@
#define INTERPOLATOR
typedef
void
(
*
base_polynomial_values
)(
int
derivative
,
double
fraction
,
double
*
destination
);
const
int
derivative
,
const
double
fraction
,
double
*
__restrict__
destination
);
template
<
class
rnumber
,
int
interp_neighbours
>
class
interpolator
...
...
@@ -59,7 +59,7 @@ class interpolator
base_polynomial_values
BETA_POLYS
);
~
interpolator
();
void
operator
()(
double
t
,
int
*
xg
,
double
*
xx
,
double
*
dest
,
int
*
deriv
=
NULL
);
void
operator
()(
double
t
,
int
*
__restrict__
xg
,
double
*
__restrict__
xx
,
double
*
__restrict__
dest
,
int
*
deriv
=
NULL
);
/* destroys input */
int
read_rFFTW
(
void
*
src
);
};
...
...
bfps/cpp/particles.hpp
View file @
0b26bc91
...
...
@@ -107,19 +107,19 @@ class particles
/* an Euler step is needed to compute an estimate of future positions,
* which is needed for synchronization.
* */
void
jump_estimate
(
double
*
jump_length
);
void
get_rhs
(
double
*
x
,
double
*
rhs
);
void
get_rhs
(
double
t
,
double
*
x
,
double
*
rhs
);
void
jump_estimate
(
double
*
__restrict__
jump_length
);
void
get_rhs
(
double
*
__restrict__
x
,
double
*
__restrict__
rhs
);
void
get_rhs
(
double
t
,
double
*
__restrict__
x
,
double
*
__restrict__
rhs
);
int
get_rank
(
double
z
);
// get rank for given value of z
void
synchronize
();
void
synchronize_single_particle_state
(
int
p
,
double
*
x
,
int
source_id
=
-
1
);
void
get_grid_coordinates
(
double
*
x
,
int
*
xg
,
double
*
xx
);
void
synchronize_single_particle_state
(
int
p
,
double
*
__restrict__
x
,
int
source_id
=
-
1
);
void
get_grid_coordinates
(
double
*
__restrict__
x
,
int
*
__restrict__
xg
,
double
*
__restrict__
xx
);
void
sample_vec_field
(
interpolator
<
rnumber
,
interp_neighbours
>
*
vec
,
double
t
,
double
*
x
,
double
*
y
,
double
*
__restrict__
x
,
double
*
__restrict__
y
,
const
bool
synch
=
false
,
int
*
deriv
=
NULL
);
inline
void
sample_vec_field
(
interpolator
<
rnumber
,
interp_neighbours
>
*
field
,
double
*
vec_values
)
...
...
bfps/cpp/spline_n1.hpp
View file @
0b26bc91
...
...
@@ -28,9 +28,9 @@
#define SPLINE_N1
void
beta_n1_m0
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n1_m1
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n1_m2
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n1_m0
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n1_m1
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n1_m2
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
#endif//SPLINE_N1
bfps/cpp/spline_n2.hpp
View file @
0b26bc91
...
...
@@ -28,11 +28,11 @@
#define SPLINE_N2
void
beta_n2_m0
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n2_m1
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n2_m2
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n2_m3
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n2_m4
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n2_m0
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n2_m1
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n2_m2
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n2_m3
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n2_m4
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
#endif//SPLINE_N2
bfps/cpp/spline_n3.hpp
View file @
0b26bc91
...
...
@@ -28,13 +28,13 @@
#define SPLINE_N3
void
beta_n3_m0
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n3_m1
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n3_m2
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n3_m3
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n3_m4
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n3_m5
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n3_m6
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n3_m0
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n3_m1
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n3_m2
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n3_m3
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n3_m4
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n3_m5
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n3_m6
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
#endif//SPLINE_N3
bfps/cpp/spline_n4.hpp
View file @
0b26bc91
...
...
@@ -28,15 +28,15 @@
#define SPLINE_N4
void
beta_n4_m0
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n4_m1
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n4_m2
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n4_m3
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n4_m4
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n4_m5
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n4_m6
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n4_m7
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n4_m8
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n4_m0
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n4_m1
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n4_m2
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n4_m3
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n4_m4
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n4_m5
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n4_m6
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n4_m7
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n4_m8
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
#endif//SPLINE_N4
bfps/cpp/spline_n5.hpp
View file @
0b26bc91
...
...
@@ -28,17 +28,17 @@
#define SPLINE_N5
void
beta_n5_m0
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n5_m1
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n5_m2
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n5_m3
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n5_m4
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n5_m5
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n5_m6
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n5_m7
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n5_m8
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n5_m9
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n5_m10
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n5_m0
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n5_m1
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n5_m2
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n5_m3
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n5_m4
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n5_m5
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n5_m6
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n5_m7
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n5_m8
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n5_m9
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n5_m10
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
#endif//SPLINE_N5
bfps/cpp/spline_n6.hpp
View file @
0b26bc91
...
...
@@ -28,19 +28,19 @@
#define SPLINE_N6
void
beta_n6_m0
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n6_m1
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n6_m2
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n6_m3
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n6_m4
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n6_m5
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n6_m6
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n6_m7
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n6_m8
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n6_m9
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n6_m10
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n6_m11
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n6_m12
(
int
deriv
,
double
x
,
double
*
poly_val
);
void
beta_n6_m0
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n6_m1
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n6_m2
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n6_m3
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n6_m4
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n6_m5
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n6_m6
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n6_m7
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n6_m8
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n6_m9
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n6_m10
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n6_m11
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
void
beta_n6_m12
(
const
int
deriv
,
const
double
x
,
double
*
__restrict__
poly_val
);
#endif//SPLINE_N6
tox_plain.ini
View file @
0b26bc91
...
...
@@ -12,10 +12,10 @@ commands =
#python tests/test_plain.py -n 256 --run --initialize --ncpu 8 --niter_todo 8 --precision single --wd "data/single"
python
tests/test_plain.py
\
-n
128
--run
--initialize
--ncpu
4
\
--nparticles
0
--niter_todo
24
\
--nparticles
10
0
--niter_todo
24
\
--precision
single
--wd
"data/single"
\
--kMeta
3.0
\
--multiplejob
--kMeta
3.0
#
\
#
--multiplejob
#python tests/test_plain.py -n 32 --run --initialize --multiplejob --ncpu 2 --nparticles 16 --niter_todo 64 --precision single --wd "data/single"
#python tests/test_plain.py -n 32 --run --initialize --multiplejob --ncpu 2 --nparticles 16 --niter_todo 64 --precision double --wd "data/double"
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