@@ -105,16 +105,14 @@ std::vector<IndexRange> splitInputRange(const IndexRange& range,
105105inline void ttParallelFor (std::size_t begin, std::size_t end,
106106 Worker& worker, std::size_t grainSize = 1 ) {
107107
108- using namespace tthread ;
109-
110108 // split the work
111109 IndexRange inputRange (begin, end);
112110 std::vector<IndexRange> ranges = splitInputRange (inputRange, grainSize);
113111
114112 // create threads
115- std::vector<thread*> threads;
113+ std::vector<tthread:: thread*> threads;
116114 for (std::size_t i = 0 ; i<ranges.size (); ++i) {
117- threads.push_back (new thread (workerThread, new Work (ranges[i], worker)));
115+ threads.push_back (new tthread:: thread (workerThread, new Work (ranges[i], worker)));
118116 }
119117
120118 // join and delete them
@@ -129,19 +127,17 @@ template <typename Reducer>
129127inline void ttParallelReduce (std::size_t begin, std::size_t end,
130128 Reducer& reducer, std::size_t grainSize = 1 ) {
131129
132- using namespace tthread ;
133-
134130 // split the work
135131 IndexRange inputRange (begin, end);
136132 std::vector<IndexRange> ranges = splitInputRange (inputRange, grainSize);
137133
138134 // create threads (split for each thread and track the allocated workers)
139- std::vector<thread*> threads;
135+ std::vector<tthread:: thread*> threads;
140136 std::vector<Worker*> workers;
141137 for (std::size_t i = 0 ; i<ranges.size (); ++i) {
142138 Reducer* pReducer = new Reducer (reducer, RcppParallel::Split ());
143139 workers.push_back (pReducer);
144- threads.push_back (new thread (workerThread, new Work (ranges[i], *pReducer)));
140+ threads.push_back (new tthread:: thread (workerThread, new Work (ranges[i], *pReducer)));
145141 }
146142
147143 // wait for each thread, join it's results, then delete the worker & thread
0 commit comments