Fixed the thread pool test

This commit is contained in:
Benoit Steiner
2014-10-10 15:20:37 -07:00
parent 498b7eed25
commit a991f94c0e
4 changed files with 8 additions and 8 deletions

View File

@@ -131,7 +131,7 @@ class TensorExecutor<Expression, ThreadPoolDevice, Vectorizable>
const Index numblocks = size / blocksize;
Index i = 0;
vector<std::future<void> > results;
std::vector<std::future<void> > results;
results.reserve(numblocks);
for (int i = 0; i < numblocks; ++i) {
results.push_back(std::async(std::launch::async, &EvalRange<Evaluator, Index>::run, &evaluator, i*blocksize, (i+1)*blocksize));