Changeset 821 for soft/giet_vm/applications/rosenfeld/src/util.c
- Timestamp:
- May 6, 2016, 3:06:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/rosenfeld/src/util.c
r772 r821 39 39 } 40 40 41 41 42 /* ------------- */ 42 43 uint8 ui8rand(void) … … 47 48 return x; 48 49 } 50 51 49 52 /* --------------- */ 50 53 uint32 ui32rand(void) … … 55 58 return x; 56 59 } 60 61 57 62 /* --------------- */ 58 63 float32 f32rand(void) … … 63 68 return x ; 64 69 } 70 71 65 72 /* --------------------------------------- */ 66 73 void rand_ui8vector(uint8 * X, int i0, int i1) 67 74 /* --------------------------------------- */ 68 75 { 69 int i; 70 71 for(i = i0; i <= i1; i++) { 76 for (int i = i0; i <= i1; i++) { 72 77 X[i] = ui8rand(); 73 78 } 74 79 } 80 81 75 82 /* ----------------------------------------- */ 76 83 void rand_ui32vector(uint32 *X, int i0, int i1) 77 84 /* ----------------------------------------- */ 78 85 { 79 int i; 80 81 for (i = i0; i <= i1; i++) { 86 for (int i = i0; i <= i1; i++) { 82 87 X[i] = ui32rand(); 83 88 } 84 89 } 90 91 85 92 /* ----------------------------------------- */ 86 93 void rand_f32vector(float32 *X, int i0, int i1) 87 94 /* ----------------------------------------- */ 88 95 { 89 int i; 90 91 for(i = i0; i <= i1; i++) { 96 for (int i = i0; i <= i1; i++) { 92 97 X[i] = f32rand(); 93 98 } 94 99 } 100 101 95 102 /* --------------- */ 96 103 int getIter(int size) … … 106 113 return 2; 107 114 } 115 116 108 117 /* ----------------- */ 109 118 int getIterAV(int size) … … 112 121 return 3 * getIter(size); 113 122 } 123 124 114 125 /* --------------------------------- */ 115 126 float32 gauss(float32 sigma, float32 x) … … 130 141 return cpp; 131 142 } 143 144 132 145 // -------------------------- 133 146 void printf_split12(double x) … … 160 173 return; 161 174 } 162 printf("");163 175 } 164 176 … … 199 211 return; 200 212 } 201 printf("");202 213 } 203 214 // -------------------------- … … 243 254 return; 244 255 } 245 printf(""); 246 } 256 } 257 258 247 259 // ------------------------ 248 260 void printf_split(double x) … … 253 265 //printf_split18(x); 254 266 } 255 267 268 // Local Variables: 269 // tab-width: 4 270 // c-basic-offset: 4 271 // c-file-offsets:((innamespace . 0)(inline-open . 0)) 272 // indent-tabs-mode: nil 273 // End: 274 275 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 276
Note: See TracChangeset
for help on using the changeset viewer.