Changeset 0d10090 for doc/generic_types/evaluation/c-bench.c
- Timestamp:
- Apr 12, 2017, 9:36:33 PM (6 years ago)
- Branches:
- aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 50b7e8c, d9dd3d1
- Parents:
- ff178ee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/generic_types/evaluation/c-bench.c
rff178ee r0d10090 1 #include <stdio.h> 1 2 #include <stdlib.h> 2 3 #include "bench.h" 3 4 #include "c-pair.h" 4 5 #include "c-stack.h" 6 #include "c-print.h" 5 7 6 8 _Bool* new_bool( _Bool b ) { … … 89 91 ) 90 92 free_pair_bool_char( max2 ); 93 94 FILE* out = fopen("c-out.txt", "w"); 95 REPEAT_TIMED( "print_int", 96 print( out, "dsds", rand(), ":", rand(), "\n" ); 97 ) 98 99 REPEAT_TIMED( "print_pair", 100 struct pair p1 = ((struct pair){ new_bool(rand() & 0x1), new_char(rand() & 0x7F) }); 101 struct pair p2 = ((struct pair){ new_bool(rand() & 0x1), new_char(rand() & 0x7F) }); 102 print( out, "pbcspbcs", p1, ":", p2, "\n" ); 103 free(p1.first); free(p1.second); 104 free(p2.first); free(p2.second); 105 ) 106 fclose(out); 91 107 }
Note: See TracChangeset
for help on using the changeset viewer.