Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
836e76b0
Commit
836e76b0
authored
Mar 13, 2017
by
Pierre BLANCHARD
Browse files
Fixed vectorization of Gaussian kernel.
parent
9920a299
Changes
1
Hide whitespace changes
Inline
Side-by-side
Src/Kernels/Interpolation/FInterpMatrixKernel_Covariance.hpp
View file @
836e76b0
...
...
@@ -144,8 +144,7 @@ struct FInterpMatrixKernelGauss : FAbstractCorrelationKernel<FReal>
dist2
+=
distX
*
distX
;
}
// TODO AVX???
return
FMath
::
Exp
(
-
FReal
(
0.5
)
*
dist2
);
return
FMath
::
Exp
(
FMath
::
ConvertTo
<
ValueClass
,
FReal
>
(
-
0.5
)
*
dist2
);
}
...
...
@@ -164,9 +163,10 @@ struct FInterpMatrixKernelGauss : FAbstractCorrelationKernel<FReal>
ValueClass
block
[
1
],
ValueClass
blockDerivative
[
3
])
const
{
block
[
0
]
=
this
->
evaluate
(
x1
,
y1
,
z1
,
x2
,
y2
,
z2
);
blockDerivative
[
0
]
=
-
block
[
0
]
*
(
x1
-
x2
)
/
(
lengthScale_
*
lengthScale_
);
blockDerivative
[
1
]
=
-
block
[
0
]
*
(
y1
-
y2
)
/
(
lengthScale_
*
lengthScale_
);
blockDerivative
[
2
]
=
-
block
[
0
]
*
(
z1
-
z2
)
/
(
lengthScale_
*
lengthScale_
);
const
ValueClass
lengthScaleOpt
=
FMath
::
ConvertTo
<
ValueClass
,
FReal
>
(
-
1
/
(
lengthScale_
*
lengthScale_
));
blockDerivative
[
0
]
=
block
[
0
]
*
(
x1
-
x2
)
*
lengthScaleOpt
;
blockDerivative
[
1
]
=
block
[
0
]
*
(
y1
-
y2
)
*
lengthScaleOpt
;
blockDerivative
[
2
]
=
block
[
0
]
*
(
z1
-
z2
)
*
lengthScaleOpt
;
}
/*
...
...
Write
Preview
Markdown
is supported
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