Starting from 2021-07-01, all LRZ GitLab users will be required to explicitly accept the GitLab Terms of Service. Please see the detailed information at https://doku.lrz.de/display/PUBLIC/GitLab and make sure that your projects conform to the requirements.

Commit 6702d5b8 authored by Hossain Mahmud's avatar Hossain Mahmud
Browse files

get rid of gcc warning from test-campvis. however, there is one remaining in...

get rid of gcc warning from test-campvis. however, there is one remaining in gtest-internal.h, and a few in concurrenthistogram.h. couldn't figure out the way around for those
parent 555fbd78
......@@ -128,16 +128,12 @@ TEST_F(ConcurrentHistogram1DTest, concurrentAddSampleTest) {
tbb::parallel_for(tbb::blocked_range<size_t>(0, samples.size()), [&] (const tbb::blocked_range<size_t>& range) {
for (size_t i = range.begin(); i != range.end(); ++i) {
std::vector<int> vec = samples[i];
int value[10];
for (int k = 0; k < getND(); k++) {
value[k] = vec[k];
}
_cgh->addSample(&(samples[i].front()));
}
});
for (int i = 0; i < getND(); i++) {
for (int j = 0; j < numBuckets[i]; j ++) {
for (size_t j = 0; j < numBuckets[i]; j ++) {
EXPECT_EQ(histogram[i], _cgh->getNumElements(j));
}
}
......@@ -159,16 +155,12 @@ TEST_F(ConcurrentHistogram2DTest, concurrentAddSampleTest) {
tbb::parallel_for(tbb::blocked_range<size_t>(0, samples.size()), [&] (const tbb::blocked_range<size_t>& range) {
for (size_t i = range.begin(); i != range.end(); ++i) {
std::vector<int> vec = samples[i];
int value[10];
for (int k = 0; k < getND(); k++) {
value[k] = vec[k];
}
_cgh->addSample(&(samples[i].front()));
}
});
for (int i = 0; i < getND(); i++) {
for (int j = 0; j < numBuckets[i]; j ++) {
for (size_t j = 0; j < numBuckets[i]; j ++) {
EXPECT_EQ(histogram[i], _cgh->getNumElements(j));
}
break;
......@@ -231,9 +223,6 @@ protected:
}
}
void computeHistogram() {
//for (int i = 0; i < 2; i++) {
// histogram[i] = numSamples / 2;
//}
int total = 0;
for (int i = 0; i < pow(2, ND); i++) {
histogram[i] = static_cast<int>(numSamples / pow(2, ND) );
......@@ -272,16 +261,12 @@ TEST_F(ConcurrentHistogram1DTestSpecific, concurrentAddSampleTest) {
tbb::parallel_for(tbb::blocked_range<size_t>(0, samples.size()), [&] (const tbb::blocked_range<size_t>& range) {
for (size_t i = range.begin(); i != range.end(); ++i) {
std::vector<int> vec = samples[i];
int value[10];
for (int k = 0; k < getND(); k++) {
value[k] = vec[k];
}
_cgh->addSample(&(samples[i].front()));
}
});
for (int i = 0; i < getND(); i++) {
for (int j = 0; j < numBuckets[i]; j ++) {
for (size_t j = 0; j < numBuckets[i]; j ++) {
EXPECT_EQ(histogram[i], _cgh->getNumElements(j));
}
}
......@@ -303,16 +288,12 @@ TEST_F(ConcurrentHistogram2DTestSpecific, concurrentAddSampleTest) {
tbb::parallel_for(tbb::blocked_range<size_t>(0, samples.size()), [&] (const tbb::blocked_range<size_t>& range) {
for (size_t i = range.begin(); i != range.end(); ++i) {
std::vector<int> vec = samples[i];
int value[10];
for (int k = 0; k < getND(); k++) {
value[k] = vec[k];
}
_cgh->addSample(&(samples[i].front()));
}
});
for (int i = 0; i < getND(); i++) {
for (int j = 0; j < numBuckets[i]; j ++) {
for (size_t j = 0; j < numBuckets[i]; j ++) {
EXPECT_EQ(histogram[i], _cgh->getNumElements(j));
}
break;
......
......@@ -83,7 +83,7 @@ TEST_F(StringUtilTest, parseFloatsTest) {
//std::vector<float> expected = {0, .12, 123, 0}; // You may use this if your compiler supports, C++11
EXPECT_EQ(expected.size(), parsed.size());
for (int i = 0; i < expected.size(); i++ ) {
for (size_t i = 0; i < expected.size(); i++ ) {
EXPECT_FLOAT_EQ(expected[i], StringUtils::fromString<float>(parsed[i].c_str()));
}
}
......@@ -103,7 +103,7 @@ TEST_F(StringUtilTest, splitTest) {
}
EXPECT_EQ(expected.size(), parsed.size());
for (int i = 0; i < expected.size(); i++ ) {
for (size_t i = 0; i < expected.size(); i++ ) {
EXPECT_EQ(expected[i], parsed[i]);
}
......@@ -120,7 +120,7 @@ TEST_F(StringUtilTest, splitTest) {
}
EXPECT_EQ(expected.size(), parsed.size());
for (int i = 0; i < expected.size(); i++ ) {
for (size_t i = 0; i < expected.size(); i++ ) {
EXPECT_EQ(expected[i], parsed[i]);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment