{"push_id":1463805207,"size":5,"distinct_size":5,"ref":"refs/heads/master","head":"4e6c5bd69a8c24181fee18901ea232084f6ab785","before":"6b3180d4d58cdd6864b762a03cfc9b730d5482d0","commits":[{"sha":"e0bf67094f11803e4fc4e1350d0fda5afdcac123","author":{"name":"Hastings Greer","email":"9ad8cf68c45fcca14c5cee13e035b717a2f58d32@kitware.com"},"message":"BUG: Add test demonstrating Python global timestamp issue\n\nITK-3456\n\nChange-Id: I8deb652f2e117240a2092f96ae376920fd4b57da","distinct":true,"url":"https://api.github.com/repos/Kitware/ITK/commits/e0bf67094f11803e4fc4e1350d0fda5afdcac123"},{"sha":"6ec32244ac386ac61c2936e81f252b328e94eee2","author":{"name":"Matt McCormick","email":"c588c59b494f7a0be6892a9d9b73420da40ad57c@kitware.com"},"message":"BUG: Use random seed with for MersenneTwisterRandomVariateGenerator.\n\nAs reported in ITK-3387:\n\nAccording to the documentation GetInstance() initializes the seed with the wall\nclock. But no seed is set, so it is always 121212 as set in the constructor.\nImageRandomConstIteratorWithIndex, and probably at lot of classes, use\nGetInstance but do not initialize the seed. This means that an\nImageRandomConstIteratorWithIndex will always walk the image in the same order.\nTo get random behaviour it is necessary to explicitly call ReinitializeSeed on\nthe the iterator.\n\nThe \"obvious\" fix is to just let the use call ReinitializeSeed, but this puts\nthe burden of making the random iterator random on the user, which is error\nprone without any benefit. I believe the standard assumption about PRKGs are\nthat they try to use a random seed, unless explicitly asked not to.\n\nChange-Id: I40dc0c7d4d403653c3b4901517be3f74dda8116c","distinct":true,"url":"https://api.github.com/repos/Kitware/ITK/commits/6ec32244ac386ac61c2936e81f252b328e94eee2"},{"sha":"67702504e840a60bc968e2e09804879d9c6c5801","author":{"name":"Matt McCormick","email":"c588c59b494f7a0be6892a9d9b73420da40ad57c@kitware.com"},"message":"BUG: Enable program global timestamp\n\nAs demonstrated by the test in Change-Id:\nI8deb652f2e117240a2092f96ae376920fd4b57da, the GlobalTimeStamp is not a true\nsingleton across the program when ITK is built with static libraries and\nmultiple binaries link to libITKCommon.\n\nA current known configuration that this effects is the Python wrapping with\nstatic ITK libraries. Each CPython extension module will get its own copy of\nthe GlobalTimeStamp used in itk::TimeStamp::Modified().\n\nThis patch addresses the issue by making the GlobalTimeStamp a pointer to a\nstatic member of the itk::TimeStamp class. This pointer can be set and\nobtained via accessor methods. When ITK is built with static libraries, the\nPython module initialization code sets the GlobalTimeStamp pointer to the\npointer used in the _ITKCommonPython module.\n\nA GlobalTimeStampInitializer (inspired by the singleton pattern in CTK's ctkSingleton.h)\nis added to itkTimeStamp.cxx. The purpose of this class is to simply clean up\n(delete) the binary's m_GlobalTimeStamp on program completion when a static\nGlobalTimeStampInitializer's destructor is called.\n\nTo ensure that the global time stamp is created when needed without\nperformance penalty,\n\n  static GlobalTimeStampType * globalTimeStamp  = GetGlobalTimeStamp();\n\nis called in itk::TimeStamp::Modified(). This ensures that a time stamp is\ncreated on demand (which could come from IO factory initialization code), but\nthat this method is only called once. Performance benchmarking with the\nITKPerformanceBenchmarking example benchmarks have shown no significant\ndifference with Linux / GCC 5.2 / Release CMAKE_BUILD_TYPE.\n\nAt the end of itkTimeStamp.cxx,\n\n  static TimeStamp::GlobalTimeStampType * initializedGlobalTimestamp =\n  itk::TimeStamp::GetGlobalTimeStamp();\n\nis called to ensure that even if IO factory initialization code or other\ninitialization code does not initialize m_GlobalTimeStamp, m_GlobalTimeStamp\nhas been initialized once the library is loaded.\n\nWith static libraries, _ITKCommonPython module creates a C API to expose its\nitk::TimeStamp::GetGlobalTimeStamp() method. Modules that link to libITKCommon\ncall their itk::TimeStamp::SetGlobalTimeStamp method with the return value of\nthis function. The PyCapsule mechanism, recommended in the CPython\ndocumentation, is applied.\n\nChange-Id: Ie1d8d2d66c99369b33cb782232bdc0c9bfa6d9a2","distinct":true,"url":"https://api.github.com/repos/Kitware/ITK/commits/67702504e840a60bc968e2e09804879d9c6c5801"},{"sha":"054d54666b31dba35433b40fcb09f4c9a7445c15","author":{"name":"Matt McCormick","email":"c588c59b494f7a0be6892a9d9b73420da40ad57c@kitware.com"},"message":"Merge topic 'GlobalModifiedTimePyCapsule'\n\n67702504 BUG: Enable program global timestamp\ne0bf6709 BUG: Add test demonstrating Python global timestamp issue","distinct":true,"url":"https://api.github.com/repos/Kitware/ITK/commits/054d54666b31dba35433b40fcb09f4c9a7445c15"},{"sha":"4e6c5bd69a8c24181fee18901ea232084f6ab785","author":{"name":"Matt McCormick","email":"c588c59b494f7a0be6892a9d9b73420da40ad57c@kitware.com"},"message":"Merge topic 'MersenneTwisterRandomSeed'\n\n6ec32244 BUG: Use random seed with for MersenneTwisterRandomVariateGenerator.","distinct":true,"url":"https://api.github.com/repos/Kitware/ITK/commits/4e6c5bd69a8c24181fee18901ea232084f6ab785"}]}
{"actor":{"display_login":"kwrobot"}}