Skip to content

Commit b078255

Browse files
committed
safer convolution
1 parent fef0f37 commit b078255

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/LatAnalyze/Numerical/DWT.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ void filterConvolution(MatType &out, const MatType &data,
3838
{
3939
Index n = data.rows(), nf = n*filter.size();
4040

41+
if (&out == &data)
42+
{
43+
LATAN_ERROR(Argument, "filter convolution does not support in-place operation");
44+
}
4145
out.resizeLike(data);
4246
out.fill(0.);
4347
for (unsigned int i = 0; i < filter.size(); ++i)

0 commit comments

Comments
 (0)