[arrayfire] 156/408: af_scale now checks for default parameters properly

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:11:44 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 d4cd847e710f628552b655a5b817cb3aa26c9a1c
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date:   Thu Jul 16 11:27:13 2015 -0400

    af_scale now checks for default parameters properly
---
 src/api/c/transform.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/api/c/transform.cpp b/src/api/c/transform.cpp
index 74612d3..c24c9f7 100644
--- a/src/api/c/transform.cpp
+++ b/src/api/c/transform.cpp
@@ -106,7 +106,7 @@ 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;
 
-        if(_odim0 == 0 && _odim1 == 0) {
+        if(_odim0 == 0 || _odim1 == 0) {
 
             DIM_ASSERT(2, scale0 != 0);
             DIM_ASSERT(3, scale1 != 0);
@@ -115,7 +115,7 @@ af_err af_scale(af_array *out, const af_array in, const float scale0, const floa
             _odim0 = idims[0] / sx;
             _odim1 = idims[1] / sy;
 
-        } else if (scale0 == 0 && scale1 == 0) {
+        } else if (scale0 == 0 || scale1 == 0) {
 
             DIM_ASSERT(4, odim0 != 0);
             DIM_ASSERT(5, odim1 != 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