[arrayfire] 219/408: Fix signed-usigned comp warnings
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:12:01 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 62b03603b3a8f2ea6d65bf589629c4840471edd1
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Mon Aug 10 15:02:31 2015 -0400
Fix signed-usigned comp warnings
---
src/api/c/assign.cpp | 2 +-
test/getting_started.cpp | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/api/c/assign.cpp b/src/api/c/assign.cpp
index 6b7a18e..00dcc05 100644
--- a/src/api/c/assign.cpp
+++ b/src/api/c/assign.cpp
@@ -235,7 +235,7 @@ af_err af_assign_gen(af_array *out,
}
bool is_vector = true;
- for (uint i = 0; is_vector && i < oDims.ndims() - 1; i++) {
+ for (int i = 0; is_vector && i < oDims.ndims() - 1; i++) {
is_vector &= oDims[i] == 1;
}
diff --git a/test/getting_started.cpp b/test/getting_started.cpp
index 7d77757..12d0b6b 100644
--- a/test/getting_started.cpp
+++ b/test/getting_started.cpp
@@ -47,7 +47,7 @@ TEST(GettingStarted, SNIPPET_getting_started_gen)
output.resize(zeros.elements());
zeros.host(&output.front());
ASSERT_EQ(f32, zeros.type());
- for(unsigned i = 0; i < zeros.elements(); i++) ASSERT_FLOAT_EQ(0, output[i]);
+ for(dim_t i = 0; i < zeros.elements(); i++) ASSERT_FLOAT_EQ(0, output[i]);
}
if (!noDoubleTests<double>()) {
@@ -55,15 +55,15 @@ TEST(GettingStarted, SNIPPET_getting_started_gen)
vector<double> output(ones.elements());
ones.host(&output.front());
ASSERT_EQ(f64, ones.type());
- for(unsigned i = 0; i < ones.elements(); i++) ASSERT_FLOAT_EQ(1, output[i]);
+ for(dim_t i = 0; i < ones.elements(); i++) ASSERT_FLOAT_EQ(1, output[i]);
}
{
vector<float> output;
output.resize(iden.elements());
iden.host(&output.front());
- for(unsigned i = 0; i < iden.dims(0); i++)
- for(unsigned j = 0; j < iden.dims(1); j++)
+ for(dim_t i = 0; i < iden.dims(0); i++)
+ for(dim_t j = 0; j < iden.dims(1); j++)
if(i == j) ASSERT_FLOAT_EQ(1, output[i * iden.dims(0) + j]);
else ASSERT_FLOAT_EQ(0, output[i * iden.dims(0) + j]);
}
--
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