<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 31, 2015, at 9:49 PM, Mehdi Amini <<a href="mailto:mehdi.amini@apple.com" class="">mehdi.amini@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Aug 31, 2015, at 9:24 PM, Owen Anderson <<a href="mailto:resistor@mac.com" class="">resistor@mac.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Aug 31, 2015, at 5:57 PM, Mehdi Amini <<a href="mailto:mehdi.amini@apple.com" class="">mehdi.amini@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">if (b) {<br class="">    for (int i = 0; i < 100; ++i) {<br class="">       // do something<br class="">    __syncthreads();<br class="">  }<br class="">} else {<br class="">   for (int i = 0; i < 100; ++i) {<br class="">      __syncthreads();<br class="">  }<br class="">}<br class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">I think it would match your constraint, i.e. "they are be executed in under the same set of execution predicates as where the user wrote them”.<span class="Apple-converted-space"> </span></div></div></blockquote></div><br class=""><div class="">I would not consider this to match the convergent constraint.  Each of the __syncthreads() calls after unswitching executes under a subset of the predicates under which the original executed.</div></div></div></blockquote><div class=""><br class=""></div><div class="">Can you define what you mean by “predicates under which the original executed”?</div></div></div></div></blockquote><div><br class=""></div></div>I think I see what you mean: the syncthreads() call is made control dependent on b while it was not before. Your sentence made me think about something quite different.<div class=""><div class=""><br class=""></div><div class="">— </div><div class="">Mehdi</div><div class=""><br class=""><div class=""><div class=""><div class=""><br class=""></div></div></div></div></div></body></html>