Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
TurTLE
TurTLE
Commits
8f405148
Commit
8f405148
authored
9 years ago
by
Chichi Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
use __restrict__ keyword for arrays
I think it helps...
parent
3693ed36
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bfps/cpp/fluid_solver.hpp
+9
-9
9 additions, 9 deletions
bfps/cpp/fluid_solver.hpp
bfps/cpp/fluid_solver_base.hpp
+12
-12
12 additions, 12 deletions
bfps/cpp/fluid_solver_base.hpp
tox_plain.ini
+4
-4
4 additions, 4 deletions
tox_plain.ini
with
25 additions
and
25 deletions
bfps/cpp/fluid_solver.hpp
+
9
−
9
View file @
8f405148
...
...
@@ -83,19 +83,19 @@ class fluid_solver:public fluid_solver_base<rnumber>
~
fluid_solver
(
void
);
void
compute_gradient_statistics
(
rnumber
(
*
vec
)[
2
],
double
*
moments
,
ptrdiff_t
*
histograms_1D
,
ptrdiff_t
*
histogram_QR2D
,
rnumber
(
*
__restrict__
vec
)[
2
],
double
*
__restrict__
moments
,
ptrdiff_t
*
__restrict__
histograms_1D
,
ptrdiff_t
*
__restrict__
histogram_QR2D
,
double
max_estimates
[
3
],
int
nbins_1D
=
256
,
int
nbins_2D
=
64
);
void
compute_vorticity
(
void
);
void
compute_velocity
(
rnumber
(
*
vorticity
)[
2
]);
void
compute_pressure
(
rnumber
(
*
pressure
)[
2
]);
void
compute_Eulerian_acceleration
(
rnumber
*
dst
);
void
compute_Lagrangian_acceleration
(
rnumber
*
dst
);
void
compute_velocity
(
rnumber
(
*
__restrict__
vorticity
)[
2
]);
void
compute_pressure
(
rnumber
(
*
__restrict__
pressure
)[
2
]);
void
compute_Eulerian_acceleration
(
rnumber
*
__restrict__
dst
);
void
compute_Lagrangian_acceleration
(
rnumber
*
__restrict__
dst
);
void
ift_velocity
();
void
dft_velocity
();
void
ift_vorticity
();
...
...
@@ -103,7 +103,7 @@ class fluid_solver:public fluid_solver_base<rnumber>
void
omega_nonlin
(
int
src
);
void
step
(
double
dt
);
void
impose_zero_modes
(
void
);
void
add_forcing
(
rnumber
(
*
acc_field
)[
2
],
rnumber
(
*
vort_field
)[
2
],
rnumber
factor
);
void
add_forcing
(
rnumber
(
*
__restrict__
acc_field
)[
2
],
rnumber
(
*
__restrict__
vort_field
)[
2
],
rnumber
factor
);
int
read
(
char
field
,
char
representation
);
int
write
(
char
field
,
char
representation
);
...
...
This diff is collapsed.
Click to expand it.
bfps/cpp/fluid_solver_base.hpp
+
12
−
12
View file @
8f405148
...
...
@@ -82,20 +82,20 @@ class fluid_solver_base
unsigned
FFTW_PLAN_RIGOR
=
FFTW_ESTIMATE
);
~
fluid_solver_base
();
void
low_pass_Fourier
(
cnumber
*
a
,
int
howmany
,
double
kmax
);
void
dealias
(
cnumber
*
a
,
int
howmany
);
void
force_divfree
(
cnumber
*
a
);
void
symmetrize
(
cnumber
*
a
,
int
howmany
);
void
clean_up_real_space
(
rnumber
*
a
,
int
howmany
);
void
cospectrum
(
cnumber
*
a
,
cnumber
*
b
,
double
*
spec
);
void
cospectrum
(
cnumber
*
a
,
cnumber
*
b
,
double
*
spec
,
const
double
k2exponent
);
double
autocorrel
(
cnumber
*
a
);
void
compute_rspace_stats
(
rnumber
*
a
,
double
*
moments
,
ptrdiff_t
*
hist
,
void
low_pass_Fourier
(
cnumber
*
__restrict__
a
,
int
howmany
,
double
kmax
);
void
dealias
(
cnumber
*
__restrict__
a
,
int
howmany
);
void
force_divfree
(
cnumber
*
__restrict__
a
);
void
symmetrize
(
cnumber
*
__restrict__
a
,
int
howmany
);
void
clean_up_real_space
(
rnumber
*
__restrict__
a
,
int
howmany
);
void
cospectrum
(
cnumber
*
__restrict__
a
,
cnumber
*
__restrict__
b
,
double
*
__restrict__
spec
);
void
cospectrum
(
cnumber
*
__restrict__
a
,
cnumber
*
__restrict__
b
,
double
*
__restrict__
spec
,
const
double
k2exponent
);
double
autocorrel
(
cnumber
*
__restrict__
a
);
void
compute_rspace_stats
(
rnumber
*
__restrict__
a
,
double
*
__restrict__
moments
,
ptrdiff_t
*
__restrict__
hist
,
double
max_estimate
[
4
],
int
nbins
=
256
);
void
compute_vector_gradient
(
rnumber
(
*
A
)[
2
],
rnumber
(
*
source
)[
2
]);
void
compute_vector_gradient
(
rnumber
(
*
__restrict__
A
)[
2
],
rnumber
(
*
__restrict__
source
)[
2
]);
void
write_spectrum
(
const
char
*
fname
,
cnumber
*
a
,
const
double
k2exponent
=
0.0
);
void
fill_up_filename
(
const
char
*
base_name
,
char
*
full_name
);
int
read_base
(
const
char
*
fname
,
rnumber
*
data
);
...
...
This diff is collapsed.
Click to expand it.
tox_plain.ini
+
4
−
4
View file @
8f405148
...
...
@@ -11,11 +11,11 @@ commands =
cp
-r
{toxinidir}/tests
{envtmpdir}
#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
64
--run
--initialize
--ncpu
4
\
--nparticles
100
0
--niter_todo
96
\
-n
128
--run
--initialize
--ncpu
4
\
--nparticles
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"
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