// // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // random.c -- // // Author : Peter A. Buhr // Created On : Tue Jul 5 21:29:30 2016 // Last Modified By : Peter A. Buhr // Last Modified On : Tue Jul 5 21:29:54 2016 // Update Count : 1 // #include #include // random #include // getpid int main() { rand48seed( getpid() ); // set random seed // test polymorphic calls to random and stream char c = rand48(); sout | c | endl; int i = rand48(); sout | i | endl; unsigned int ui = rand48(); sout | ui | endl; long int li = rand48(); sout | li | endl; unsigned long int uli = rand48(); sout | uli | endl; float f = rand48(); sout | f | endl; double d = rand48(); sout | d | endl; float _Complex fc = rand48(); sout | fc | endl; double _Complex dc = rand48(); sout | dc | endl; long double _Complex ldc = rand48(); sout | ldc | endl; } // main // Local Variables: // // tab-width: 4 // // compile-command: "cfa random.c" // // End: //