File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,9 @@ namespace
174
174
double len = wholeRange.end - wholeRange.start ;
175
175
nstripes = cvRound (_nstripes <= 0 ? len : MIN (MAX (_nstripes, 1 .), len));
176
176
177
+ // propagate main thread state
178
+ rng = cv::theRNG ();
179
+
177
180
#ifdef ENABLE_INSTRUMENTATION
178
181
pThreadRoot = cv::instr::getInstrumentTLSStruct ().pCurrentNode ;
179
182
#endif
@@ -195,6 +198,9 @@ namespace
195
198
#endif
196
199
CV_INSTRUMENT_REGION ()
197
200
201
+ // propagate main thread state
202
+ cv::theRNG () = rng;
203
+
198
204
cv::Range r;
199
205
r.start = (int )(wholeRange.start +
200
206
((uint64)sr.start *(wholeRange.end - wholeRange.start ) + nstripes/2 )/nstripes);
@@ -208,6 +214,7 @@ namespace
208
214
const cv::ParallelLoopBody* body;
209
215
cv::Range wholeRange;
210
216
int nstripes;
217
+ cv::RNG rng;
211
218
#ifdef ENABLE_INSTRUMENTATION
212
219
cv::instr::InstrNode *pThreadRoot;
213
220
#endif
You can’t perform that action at this time.
0 commit comments