diff --git a/examples/RangeISAMExample_plaza2.cpp b/examples/RangeISAMExample_plaza2.cpp index 252372f39..04632e9e3 100644 --- a/examples/RangeISAMExample_plaza2.cpp +++ b/examples/RangeISAMExample_plaza2.cpp @@ -82,7 +82,8 @@ vector readTriples() { ifstream is(data_file.c_str()); while (is) { - double t, sender, receiver, range; + double t, sender, range; + size_t receiver; is >> t >> sender >> receiver >> range; triples.push_back(RangeTriple(t, receiver, range)); } diff --git a/examples/TimeTBB.cpp b/examples/TimeTBB.cpp index 077331848..a35980836 100644 --- a/examples/TimeTBB.cpp +++ b/examples/TimeTBB.cpp @@ -134,7 +134,7 @@ map testWithMemoryAllocation() tbb::parallel_for(tbb::blocked_range(0, numberOfProblems), WorkerWithAllocation(results)); tbb::tick_count t1 = tbb::tick_count::now(); cout << "With memory allocation, grain size = " << grainSize << ", time = " << (t1 - t0).seconds() << endl; - timingResults[grainSize] = (t1 - t0).seconds(); + timingResults[(int)grainSize] = (t1 - t0).seconds(); } return timingResults; @@ -152,9 +152,9 @@ int main(int argc, char* argv[]) BOOST_FOREACH(size_t n, numThreads) { cout << "With " << n << " threads:" << endl; - tbb::task_scheduler_init init(n); - results[n].grainSizesWithoutAllocation = testWithoutMemoryAllocation(); - results[n].grainSizesWithAllocation = testWithMemoryAllocation(); + tbb::task_scheduler_init init((int)n); + results[(int)n].grainSizesWithoutAllocation = testWithoutMemoryAllocation(); + results[(int)n].grainSizesWithAllocation = testWithMemoryAllocation(); cout << endl; }