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
26f775e2
Commit
26f775e2
authored
9 years ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
try to make interpolation more efficient
it's not more efficient.
parent
320cc68d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bfps/cpp/interpolator.cpp
+19
-9
19 additions, 9 deletions
bfps/cpp/interpolator.cpp
with
19 additions
and
9 deletions
bfps/cpp/interpolator.cpp
+
19
−
9
View file @
26f775e2
...
@@ -162,19 +162,29 @@ void interpolator<rnumber, interp_neighbours>::operator()(
...
@@ -162,19 +162,29 @@ void interpolator<rnumber, interp_neighbours>::operator()(
this
->
compute_beta
(
deriv
[
2
],
xx
[
2
],
bz
);
this
->
compute_beta
(
deriv
[
2
],
xx
[
2
],
bz
);
}
}
std
::
fill_n
(
dest
,
3
,
0
);
std
::
fill_n
(
dest
,
3
,
0
);
ptrdiff_t
bigiz
,
bigiy
,
bigix
;
for
(
int
iz
=
-
interp_neighbours
;
iz
<=
interp_neighbours
+
1
;
iz
++
)
for
(
int
iz
=
-
interp_neighbours
;
iz
<=
interp_neighbours
+
1
;
iz
++
)
{
bigiz
=
ptrdiff_t
(
xg
[
2
]
+
iz
);
for
(
int
iy
=
-
interp_neighbours
;
iy
<=
interp_neighbours
+
1
;
iy
++
)
for
(
int
iy
=
-
interp_neighbours
;
iy
<=
interp_neighbours
+
1
;
iy
++
)
{
bigiy
=
ptrdiff_t
(
MOD
(
xg
[
1
]
+
iy
,
this
->
descriptor
->
sizes
[
1
]));
for
(
int
ix
=
-
interp_neighbours
;
ix
<=
interp_neighbours
+
1
;
ix
++
)
for
(
int
ix
=
-
interp_neighbours
;
ix
<=
interp_neighbours
+
1
;
ix
++
)
{
bigix
=
ptrdiff_t
(
MOD
(
xg
[
0
]
+
ix
,
this
->
descriptor
->
sizes
[
2
]));
for
(
int
c
=
0
;
c
<
3
;
c
++
)
for
(
int
c
=
0
;
c
<
3
;
c
++
)
{
{
ptrdiff_t
tindex
=
((
ptrdiff_t
(
xg
[
2
]
+
iz
)
*
this
->
descriptor
->
sizes
[
1
]
+
ptrdiff_t
tindex
=
((
bigiz
*
this
->
descriptor
->
sizes
[
1
]
+
ptrdiff_t
(
MOD
(
xg
[
1
]
+
iy
,
this
->
descriptor
->
sizes
[
1
]))
)
*
this
->
descriptor
->
sizes
[
2
]
+
bigiy
)
*
this
->
descriptor
->
sizes
[
2
]
+
ptrdiff_t
(
MOD
(
xg
[
0
]
+
ix
,
this
->
descriptor
->
sizes
[
2
]))
)
*
3
+
c
+
this
->
buffer_size
;
bigix
)
*
3
+
c
+
this
->
buffer_size
;
dest
[
c
]
+=
(
this
->
f0
[
tindex
]
*
(
1
-
t
)
+
t
*
this
->
f1
[
tindex
])
*
(
bz
[
iz
+
interp_neighbours
]
*
dest
[
c
]
+=
(
this
->
f0
[
tindex
]
*
(
1
-
t
)
+
t
*
this
->
f1
[
tindex
])
*
(
bz
[
iz
+
interp_neighbours
]
*
by
[
iy
+
interp_neighbours
]
*
by
[
iy
+
interp_neighbours
]
*
bx
[
ix
+
interp_neighbours
]);
bx
[
ix
+
interp_neighbours
]);
}
}
}
}
}
}
}
template
class
interpolator
<
float
,
1
>;
template
class
interpolator
<
float
,
1
>;
template
class
interpolator
<
float
,
2
>;
template
class
interpolator
<
float
,
2
>;
...
...
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