Changeset 147 for trunk/bench/bench.c
- Timestamp:
- 06/07/10 14:21:35 (3 years ago)
- File:
-
- 1 edited
-
trunk/bench/bench.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bench/bench.c
r142 r147 143 143 144 144 145 do_bench(int nthreads, unsigned int size, int elsize, int rshift) {145 void do_bench(int nthreads, unsigned int size, int elsize, int rshift) { 146 146 void *src, *srccpy; 147 147 void **dest[NCHUNKS], *dest2; 148 int nbytes , cbytes;148 int nbytes = 0, cbytes = 0; 149 149 size_t i, j; 150 150 struct timeval last, current; … … 164 164 memcpy(srccpy, src, size); 165 165 for (j = 0; j < nchunks; j++) { 166 dest[j] = malloc(size); 166 /* 16 additional bytes should be enough for encoding everything */ 167 dest[j] = malloc(size+16); 167 168 } 168 169 … … 210 211 for (i = 0; i < niter; i++) { 211 212 for (j = 0; j < nchunks; j++) { 212 cbytes = blosc_compress(clevel, doshuffle, elsize, size, src, dest[j]); 213 cbytes = blosc_compress(clevel, doshuffle, elsize, size, src, 214 dest[j], size); 213 215 } 214 216 } … … 307 309 char *usage = "Usage: bench ['single' | 'suite' | 'hardsuite' | 'extremesuite' | 'debugsuite'] [nthreads [bufsize(bytes) [typesize [sbits ]]]]"; 308 310 311 312 if (argc == 1) { 313 printf("%s\n", usage); 314 exit(1); 315 } 309 316 310 317 if (strcmp(argv[1], "single") == 0) {
Note: See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/images/blosc-logo-small.png)