@@ -268,9 +268,6 @@ class ITKCommon_EXPORT MersenneTwisterRandomVariateGenerator : public RandomVari
268268 void
269269 PrintSelf (std::ostream & os, Indent indent) const override ;
270270
271- /* * Period parameter */
272- static constexpr unsigned int M = 397 ;
273-
274271 /* * Reload array with N new values. */
275272 void
276273 reload ();
@@ -305,6 +302,14 @@ class ITKCommon_EXPORT MersenneTwisterRandomVariateGenerator : public RandomVari
305302 static IntegerType
306303 hash (time_t t, clock_t c);
307304
305+ private:
306+ /* * Only used to synchronize the global variable across static libraries.*/
307+ itkGetGlobalDeclarationMacro (MersenneTwisterGlobals, PimplGlobals);
308+
309+ /* * Internal method to actually create a new object. */
310+ static Pointer
311+ CreateInstance ();
312+
308313 // Internal state
309314 IntegerType state[StateVectorLength];
310315
@@ -317,14 +322,6 @@ class ITKCommon_EXPORT MersenneTwisterRandomVariateGenerator : public RandomVari
317322 // Seed value
318323 std::atomic<IntegerType> m_Seed{};
319324
320- private:
321- /* * Only used to synchronize the global variable across static libraries.*/
322- itkGetGlobalDeclarationMacro (MersenneTwisterGlobals, PimplGlobals);
323-
324- /* * Internal method to actually create a new object. */
325- static Pointer
326- CreateInstance ();
327-
328325 // Local lock to enable concurrent access to singleton
329326 std::mutex m_InstanceMutex{};
330327
@@ -364,6 +361,9 @@ MersenneTwisterRandomVariateGenerator::reload()
364361 // Made clearer and faster by Matthew Bellew
365362 // matthew dot bellew at home dot com
366363
364+ // Period parameter
365+ static constexpr unsigned int M = 397 ;
366+
367367 // get rid of VS warning
368368 constexpr auto index = int { M } - int { MersenneTwisterRandomVariateGenerator::StateVectorLength };
369369
0 commit comments