[arrayfire] 109/408: TEST: Adding tests for non overlapping convolves

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:11:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/sid
in repository arrayfire.

commit 2ca72cbbe4ebf1d156cc501b5cfdad9fc2869ade
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date:   Mon Jul 6 14:24:18 2015 -0400

    TEST: Adding tests for non overlapping convolves
---
 test/fftconvolve.cpp | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/test/fftconvolve.cpp b/test/fftconvolve.cpp
index 8117ec0..ff961b0 100644
--- a/test/fftconvolve.cpp
+++ b/test/fftconvolve.cpp
@@ -651,3 +651,29 @@ TEST(Padding, fftConvolve2)
         ASSERT_EQ(max<double>(abs(c - d)) < 1E-5, true);
     }
 }
+
+TEST(FFTConvolve1, Interleaved)
+{
+    array a = randu(100, 1, 2);
+    array b = randu(20, 3);
+    array c = fftConvolve1(a, b);
+
+    for (int ii = 0; ii < 2; ii++) {
+        array c_ii = c(span, span, ii);
+        array d = fftConvolve1(a(span, 0, ii), b);
+        ASSERT_EQ(max<double>(abs(c_ii - d)) < 1E-5, true);
+    }
+}
+
+TEST(FFTConvolve2, Interleaved)
+{
+    array a = randu(100, 100, 2);
+    array b = randu(5, 5, 1, 3);
+    array c = fftConvolve2(a, b);
+
+    for (int ii = 0; ii < 3; ii++) {
+        array c_ii = c(span, span, span, ii);
+        array d = fftConvolve2(a, b(span, span, 0, ii));
+        ASSERT_EQ(max<double>(abs(c_ii - d)) < 1E-5, true);
+    }
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list