/* $Source: /var/local/cvs/gasnet/tests/delay.c,v $ * $Date: 2006/01/23 17:34:13 $ * $Revision: 1.8 $ * Description: * Copyright 2004, Paul Hargrove * Terms of use are as specified in license.txt */ #include #include #include static volatile float x, y; static volatile float z = (1.00001); float test_bogus() { /* ensure the values escape (otherwise x is dead) */ return x+y+z; } void test_delay (int64_t n, int pollcnt) { int64_t i,j; y = z; x = 1.0; if (pollcnt) { /* include pollcnt AMPolls, evenly interspersed */ int64_t n_chunk = n / (pollcnt+1); for (j=0; j