[arrayfire] 154/408: Fixing the checks for skew
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:11:43 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 9564317ad8dc652b497b8053dc1c2cd04c3e1cbc
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date: Wed Jul 15 19:27:44 2015 -0400
Fixing the checks for skew
---
src/api/c/transform.cpp | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/api/c/transform.cpp b/src/api/c/transform.cpp
index cc17adc..74612d3 100644
--- a/src/api/c/transform.cpp
+++ b/src/api/c/transform.cpp
@@ -106,17 +106,25 @@ af_err af_scale(af_array *out, const af_array in, const float scale0, const floa
dim_t _odim0 = odim0, _odim1 = odim1;
float sx, sy;
- DIM_ASSERT(4, odim0 != 0);
- DIM_ASSERT(5, odim1 != 0);
-
if(_odim0 == 0 && _odim1 == 0) {
+
+ DIM_ASSERT(2, scale0 != 0);
+ DIM_ASSERT(3, scale1 != 0);
+
sx = 1.f / scale0, sy = 1.f / scale1;
_odim0 = idims[0] / sx;
_odim1 = idims[1] / sy;
+
} else if (scale0 == 0 && scale1 == 0) {
+
+ DIM_ASSERT(4, odim0 != 0);
+ DIM_ASSERT(5, odim1 != 0);
+
sx = idims[0] / (float)_odim0;
sy = idims[1] / (float)_odim1;
+
} else {
+
sx = 1.f / scale0, sy = 1.f / scale1;
}
--
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