cBench_hc_compute.c

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:23.0
disk size 430 Bytes
downloadable true
type
attribute value
name no_type
processor id 1
description this is the default benchmark type for rejected benchmarks and benchmarks that are not associated with a type.
owning community none
loading contents
//taken from cBench/office_ghostscript/src/shcgen.c

int random();

void hc_compute(int num_values) {
    for (int i = num_values; i > 0;) {
	int j = i;
	--j;// int len = nodes[--j].code_length;
	while (j > 0 && random())
	    --j;
	//qsort(&nodes[j], i - j, sizeof(count_node), compare_values);
	for(int x = i - j; x > 0; x --)//quadratic loop as substitute for qsort 
		for(int y = x; y > 0 && random(); y--); 
	i = j;
    }
}

popout

content may be truncated. 'popout' for larger text window.

actions get anonymous link download benchmark