[arrayfire] 226/284: Fix resize unit test.
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Sun Feb 7 18:59:36 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/experimental
in repository arrayfire.
commit 3389940d894d7425bdc30561901d06042dbf2606
Author: Umar Arshad <umar at arrayfire.com>
Date: Mon Jan 18 13:59:30 2016 -0500
Fix resize unit test.
---
src/backend/cpu/kernel/meanshift.hpp | 9 +++------
test/resize.cpp | 2 +-
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/backend/cpu/kernel/meanshift.hpp b/src/backend/cpu/kernel/meanshift.hpp
index f173b2f..54fb1a8 100644
--- a/src/backend/cpu/kernel/meanshift.hpp
+++ b/src/backend/cpu/kernel/meanshift.hpp
@@ -34,12 +34,9 @@ void meanShift(Array<T> out, const Array<T> in, const float s_sigma,
const dim_t radius = std::max((int)(space_ * 1.5f), 1);
const float cvar = c_sigma*c_sigma;
- std::vector<float> means;
- std::vector<float> centers;
- std::vector<float> tmpclrs;
- means.reserve(channels);
- centers.reserve(channels);
- tmpclrs.reserve(channels);
+ std::vector<float> means(channels);
+ std::vector<float> centers(channels);
+ std::vector<float> tmpclrs(channels);
T *outData = out.get();
const T * inData = in.get();
diff --git a/test/resize.cpp b/test/resize.cpp
index e0f1ea0..6c29e61 100644
--- a/test/resize.cpp
+++ b/test/resize.cpp
@@ -65,7 +65,7 @@ TYPED_TEST(Resize, InvalidDims)
{
if (noDoubleTests<TypeParam>()) return;
- vector<TypeParam> in(8,8);
+ vector<TypeParam> in(8*8);
af_array inArray = 0;
af_array outArray = 0;
--
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